Author Topic: Replacing Obsolete micro?  (Read 4423 times)

0 Members and 1 Guest are viewing this topic.

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Replacing Obsolete micro?
« on: July 19, 2020, 04:51:17 pm »
I have an interesting project.

I have a PCB that uses an old MCHC705B16NCFNE micro, which is obsolete.
Data link here: https://www.nxp.com/docs/en/data-sheet/MC68HC05B6.pdf

I have access to the PCB build files, but not the original files for compiling the micro's program, so all I could do is copy the program directly. I was able to find a small supply of "NOS" from an Asian source, but so far only about 25% of the micro's I've ordered actually function. The customer would like between 100 and 200 finished PCBs if this is possible, and neither he nor I are happy about using likely counterfeit/faulty micros, and would like something new from a reputable parts house.

I've never attempted such a thing before, but is anybody aware of a micro that is still in active status that could accept the copied program? Package difference is no problem, as I can re-configure the PCB to accept whatever.

Thoughts?
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Replacing Obsolete micro?
« Reply #1 on: July 19, 2020, 05:11:48 pm »
Just out of curiosity I looked up this micro, which I have seen but never used. The wiki page claims that the HC08 is code compatible with the HC05 but I have no idea if that means assembly code compatible or binary code compatible. Maybe this can be a starting point for further searching?

https://en.wikipedia.org/wiki/Motorola_68HC08
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3368
  • Country: de
Re: Replacing Obsolete micro?
« Reply #2 on: July 19, 2020, 07:51:59 pm »
Usually Rochester is a serious source:
https://www.rocelec.com/search?q=705B16

Sometimes they also re-built devices with the orignal masks from the previous supplier.

with best regards

Andreas

 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6618
  • Country: nl
Re: Replacing Obsolete micro?
« Reply #3 on: July 19, 2020, 08:19:19 pm »
How large is the source code?
If <4kB you could Reverse engineer the disassembly code or reverse engineer the functionality with logic probes.
You have to do that anyway unless you find a 1:1 mapped compatible cpu.
I did this in the late 80s with a 8048 eprom of 2kB.
Within two weeks you can get this done and you can write new code in C on any uC you like.
Even if you find a code compatible cpu you still have to retest each and every functionality.
Without the code, how do you know you tested everything ?
 
The following users thanked this post: Ian.M

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Re: Replacing Obsolete micro?
« Reply #4 on: July 19, 2020, 09:33:00 pm »
How large is the source code?
If <4kB you could Reverse engineer the disassembly code or reverse engineer the functionality with logic probes.
You have to do that anyway unless you find a 1:1 mapped compatible cpu.
I did this in the late 80s with a 8048 eprom of 2kB.
Within two weeks you can get this done and you can write new code in C on any uC you like.
Even if you find a code compatible cpu you still have to retest each and every functionality.
Without the code, how do you know you tested everything ?

The idea (hopefully) was find a compatable micro, clone the code over, make an adapter PCB (for testing purposes), solder it on and see if it functions  ;D

Reverse engineering the functionality is more likely, TBH. I may have to get with someone who far more software savvy than me and see if we can do something. It would be less than ideal, but maybe the last resort?
 

Offline up8051

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: pl
Re: Replacing Obsolete micro?
« Reply #5 on: July 19, 2020, 09:45:15 pm »
First check how many pins are used and what functions they have.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Replacing Obsolete micro?
« Reply #6 on: July 19, 2020, 09:53:00 pm »
A more extreme approach would be to emulate the original microcontroller on a more capable device.

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 5085
  • Country: nz
Re: Replacing Obsolete micro?
« Reply #7 on: July 19, 2020, 10:48:19 pm »
A more extreme approach would be to emulate the original microcontroller on a more capable device.

That's probably the smallest amount of work, to be honest.

I haven't checked how close it is to vanilla 6800, but I can write a cycle-accurate purely interpretive emulator for that class of CPU core in a couple of days if I have a significantly faster CPU to run it on. If it's running at 1-2 MHz with multiple clock cycles per instruction you might just about be able to emulate it with a 16 or 20 MHz AVR (it might be a challenge). With a 48 MHz or something ARM it would be cake.

Mapping the timers and I/O would be more work. You'd have to figure that out if you went the hand-disassembly-to-C route anyway.

I'm free at the moment and enjoy doing this kind of perverse thing so HMU if you're interested (on a commercial basis).
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 5085
  • Country: nz
Re: Replacing Obsolete micro?
« Reply #8 on: July 19, 2020, 11:00:31 pm »
There's a 6805 emulator here https://github.com/forthnutter/6805

Written in some kind of wacky FORTH that runs on the Java VM, so probably not useful except maybe as a reference. Seems to be BSD license.
 

Offline JXL

  • Regular Contributor
  • *
  • Posts: 64
  • Country: us
Re: Replacing Obsolete micro?
« Reply #9 on: July 19, 2020, 11:12:18 pm »
 
The following users thanked this post: edavid

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 5085
  • Country: nz
Re: Replacing Obsolete micro?
« Reply #10 on: July 19, 2020, 11:12:58 pm »
The MAME project has a 6805 emulator at https://github.com/mamedev/mame/tree/master/src/devices/cpu/m6805

That might be more useful. GPL license.
 

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Re: Replacing Obsolete micro?
« Reply #11 on: July 19, 2020, 11:26:16 pm »
These guys may be able to supply your needs:
https://www.tekmos.com/products/microprocessors/68hc705-microcontrollers

OOOOOOOOHHHHHHHHH

I will call on Monday!
 

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Re: Replacing Obsolete micro?
« Reply #12 on: July 20, 2020, 05:14:43 pm »
Got a reply back from Tekmos.

They have a MOQ of 100 units $30/unit. Just an FYI for anybody else interested in this particular micro.

Since I no longer have access to the source code, and can only read the micro with a programmer, that limits programming.

Tekmos specified they need the program in HEX of S19 format.

Usually, I'm just straight cloning memory ICs and run PCB layout and population, programming is out of my area of expertise. Any idea if from just reading the OEM micro I can get the program to Tekmos in the format they require?
 

Offline Jay1011

  • Contributor
  • Posts: 32
  • Country: us
Re: Replacing Obsolete micro?
« Reply #13 on: July 20, 2020, 06:48:19 pm »
Perhaps try also: https://octopart.com/search?q=mc68hc705b16&currency=USD&specs=0&in_stock_only=1

The results show several distributors with stock, including "GreenTree Electronics" with >22K in stock.  I have no idea if that's true or if GreeTree is a reputable company, but might be worth a check.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6618
  • Country: nl
Re: Replacing Obsolete micro?
« Reply #14 on: July 20, 2020, 08:27:07 pm »
Got a reply back from Tekmos.

They have a MOQ of 100 units $30/unit. Just an FYI for anybody else interested in this particular micro.

What is the definition of unit ? Not 1 piece I hope ?  :o
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 5085
  • Country: nz
Re: Replacing Obsolete micro?
« Reply #15 on: July 20, 2020, 10:44:35 pm »
Got a reply back from Tekmos.

They have a MOQ of 100 units $30/unit. Just an FYI for anybody else interested in this particular micro.

Interesting. What's the lead time?

For a small and simple chip like a 6805, that price would give a very healthy margin over the cost of making a batch (usually 100) on a shuttle run aka MPW (Multi Project Wafer).
 

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Re: Replacing Obsolete micro?
« Reply #16 on: July 20, 2020, 11:10:01 pm »
Got a reply back from Tekmos.

They have a MOQ of 100 units $30/unit. Just an FYI for anybody else interested in this particular micro.

What is the definition of unit ? Not 1 piece I hope ?  :o

Yes, $30 per piece.
 

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Re: Replacing Obsolete micro?
« Reply #17 on: July 20, 2020, 11:10:41 pm »
Got a reply back from Tekmos.

They have a MOQ of 100 units $30/unit. Just an FYI for anybody else interested in this particular micro.

Interesting. What's the lead time?

For a small and simple chip like a 6805, that price would give a very healthy margin over the cost of making a batch (usually 100) on a shuttle run aka MPW (Multi Project Wafer).

I did not get a lead time, but their website mentioned the 100 MOQ for in-stock items, 3k for new runs.
 

Offline srb1954

  • Super Contributor
  • ***
  • Posts: 1144
  • Country: nz
  • Retired Electronics Design Engineer
Re: Replacing Obsolete micro?
« Reply #18 on: July 20, 2020, 11:33:50 pm »
If you can read from the micro as a binary file it should be pretty straight-forward to convert to an S19 file. Any decent EPROM programmer should be able to save the binary file to an S19 format. Failing that you could write a program on your PC to convert a binary file to S19 format - it is a very simple format to convert.

You might to consider converting to a more recent Freescale processor like the RS08 family. This will be largely compatible at an assembly language level but probably not at a binary level. To get the assembly language source code from your existing program you will need to disassemble the binary but this shouldn't be too hard - the 6805 series has a very simple processor architecture.

If you are changing processors one of the most important factors will be to get a processor that has a similar peripheral set to the original. You are more likely to get this match if you stick with something from the Freescale repertoire as most of their 8-bit processors share a similar peripheral set.

As a lot of the code in a typical low-end embedded application is I/O intensive so changing to another processor family could involve considerable rewriting of code to drive the new peripherals to obtain the necessary I/O functions.
« Last Edit: July 20, 2020, 11:36:57 pm by srb1954 »
 

Online brucehoult

  • Super Contributor
  • ***
  • Posts: 5085
  • Country: nz
Re: Replacing Obsolete micro?
« Reply #19 on: July 20, 2020, 11:44:10 pm »
Got a reply back from Tekmos.

They have a MOQ of 100 units $30/unit. Just an FYI for anybody else interested in this particular micro.

Interesting. What's the lead time?

For a small and simple chip like a 6805, that price would give a very healthy margin over the cost of making a batch (usually 100) on a shuttle run aka MPW (Multi Project Wafer).

I did not get a lead time, but their website mentioned the 100 MOQ for in-stock items, 3k for new runs.

That's pretty exorbitant, but if you only want 200 boards then you're probably best off to just suck up that $6k, especially given you don't have to redesign the board.

I hope they charge a lot less for the 3000 chip runs. For $90k you could get someone to emulate it in a $10 FPGA or a $1 or $2 ARM. I don't know if you could get the same package -- it looks like it's also obsolete.
 

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Re: Replacing Obsolete micro?
« Reply #20 on: July 21, 2020, 10:51:23 pm »
Got a reply back from Tekmos.

They have a MOQ of 100 units $30/unit. Just an FYI for anybody else interested in this particular micro.

Interesting. What's the lead time?

For a small and simple chip like a 6805, that price would give a very healthy margin over the cost of making a batch (usually 100) on a shuttle run aka MPW (Multi Project Wafer).

I did not get a lead time, but their website mentioned the 100 MOQ for in-stock items, 3k for new runs.

That's pretty exorbitant, but if you only want 200 boards then you're probably best off to just suck up that $6k, especially given you don't have to redesign the board.

I hope they charge a lot less for the 3000 chip runs. For $90k you could get someone to emulate it in a $10 FPGA or a $1 or $2 ARM. I don't know if you could get the same package -- it looks like it's also obsolete.

Yup, spendy, but we we are still discussing options. These are control boards for some old industrial equipment that is still popular/in use, so it is may be better money (and a biz opportunity) to make some PCB re-designs and updates, and run on an emulator and make a couple thousand boards.

The emulating one micro on another micro is something new for me, that will take some investigation, but we would likely job that out. Any idea what we may expect to pay for someone to make that work?
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Replacing Obsolete micro?
« Reply #21 on: July 22, 2020, 06:24:05 am »
If you haven't already, also try to estimate the cost of reimplementing the software from scratch.

Offline Wiljan

  • Regular Contributor
  • *
  • Posts: 230
  • Country: dk
Re: Replacing Obsolete micro?
« Reply #22 on: July 22, 2020, 11:08:32 am »
Maybe you could use a MC68HC05 clone for a FPGA with the bin dump file https://opencores.org/projects/68hc05
 

Offline up8051

  • Frequent Contributor
  • **
  • Posts: 330
  • Country: pl
Re: Replacing Obsolete micro?
« Reply #23 on: July 22, 2020, 11:22:55 am »
Do you have access to the code binary/hex file?
Microcontroller can be protected to readout.
 

Offline Rat_PatrolTopic starter

  • Frequent Contributor
  • **
  • Posts: 332
  • Country: us
Re: Replacing Obsolete micro?
« Reply #24 on: July 22, 2020, 02:38:35 pm »
Do you have access to the code binary/hex file?
Microcontroller can be protected to readout.

Yes, we can pull the the program from the micro.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf