Author Topic: Simple Programmer for vintage Intel MCS-48 Microcontroller  (Read 16433 times)

0 Members and 1 Guest are viewing this topic.

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Simple Programmer for vintage Intel MCS-48 Microcontroller
« on: July 03, 2016, 10:33:20 pm »
Because my PM6654C counter stopped working just about a week after I installed a self-made OCXO-Module, I spent basically the whole saturday trying to pin down the problem, which led me to believe that the Intel 8741 processor is the cause (see my thread in the repair-forum for more details).
A bad 8741 is rather problematic, because I only have a TL866-Programmer here, which cannot program the MCS-48/UPI-41 Microcontroller-Series. Aside from really expensive programmers, only the Willem Programmer with the LPT-Connector seems to be compatible, but investing 50+ Euros for a programmer that would arrive in about 4 weeks was out of the question. The same obviously goes for the expensive ones.
So I decided to make my own.

The MCS-48 Microcontroller-Series is controlled by first latching the Address into the processor, then applying the data, providing 21V to VDD and then pulsing the PROG-Pin with +18V for 50ms. Repeat that 1024 or 2048 times and the program is transferred to the internal memory.

For the controller I chose to use one of the many Arduino Nanos I bought some time ago on ebay for 3€ a piece.
To make the Power-Supply simpler, the required input-voltage is 21,5V and the +18,5V and +6V (Supply-Voltages slightly higher to account for Vdrop in the Diodes) are provided by LM317s.
BC327 PNP Transistors are used to toggle between 5V and the higher voltages, pins that require +5V max are directly connected to the Arduino Nano.

Because I was extra-lazy, I wrote the Software in a way that the program that is about to be programmed into the Micro is stored inside the Arduino Sketch. To make sending the data and getting program-messages via Serial Connection possible, I wired the Nano in a way that requires some bit-shifting in the software, but keeps the Serial IN/OUT-Pins free (Pins 0 and 1 of PORT D).
Care must be taken when building this thing though, because PB4 and PB3 are switched around (see Arduino Nano Pinout: https://bigdanzblog.wordpress.com/2015/01/30/cant-get-i2c-to-work-on-an-arduino-nano-pinout-diagrams/).
It should also be possible to build this thing with other Arduinos and put it together on a breadboard.

Btw. If you start messing around with these devices, a UV-Eraser is a must! :)

I hope this helps other people who came across these Micros, which seem to have been quite popular in the 80s - at least with Philips engineers :)

Datasheet for the UPI-41 - including the programming-procedure and the same for the MCS-48: http://www.intel.com/design/archives/periphrl/docs/29025601.pdf

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #1 on: July 04, 2016, 12:28:37 am »
The PNPs switching the higher programming voltages looks conducting all the time.
 

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #2 on: July 04, 2016, 12:35:27 am »
Yes. I was hoping that with 1k or 10k resistors the current flowing through them and the ESD-Diodes of the Arduino would be low enough to have no effect (these old chips are power-hungry). If that is not the case, I probably need pull-up resistors at the bases of the transistors, or an NPN inverter-stage to control the PNPs.

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #3 on: July 04, 2016, 01:09:59 am »
Just add the three NPNs with 2k base resistors for a robust design and you will save yourself from a lots of grief. :)
 

Offline bktemp

  • Super Contributor
  • ***
  • Posts: 1616
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #4 on: July 04, 2016, 07:00:12 am »
Yes. I was hoping that with 1k or 10k resistors the current flowing through them and the ESD-Diodes of the Arduino would be low enough to have no effect (these old chips are power-hungry). I
That does not work. I/O pins can only output or float to a higher voltage than Vcc or lower voltage than GND. In both cases there is a high enough current flowing turning the transistors on.
You could try adding 16V and 19V zener diodes to level shift the logic levels, but the best way is adding three NPNs as already suggested.

I would also add pulldowns on EA and PROG to make the turn off slewrate a bit faster because there is not much current flowing into the pins.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #5 on: July 04, 2016, 07:13:26 am »
or buy a pin-compatable flash based device with ICP interface :)
 

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #6 on: July 04, 2016, 03:17:40 pm »
or buy a pin-compatable flash based device with ICP interface :)

Even if there is a pin-compatible replacement for the 8741, I would have to port the Software (which I would have to disassemble and then understand) to restore the functionality to my PM6654C counter (which is the primary reason why I'm building this). I guess that would be quite a bit harder to do. :)
Do you know of any pin-compatible devices?

Offline batteksystem

  • Regular Contributor
  • *
  • Posts: 167
  • Country: hk
    • My ebay store
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #7 on: July 04, 2016, 04:30:23 pm »
Because my PM6654C counter stopped working just about a week after I installed a self-made OCXO-Module, I spent basically the whole saturday trying to pin down the problem, which led me to believe that the Intel 8741 processor is the cause (see my thread in the repair-forum for more details).
A bad 8741 is rather problematic, because I only have a TL866-Programmer here, which cannot program the MCS-48/UPI-41 Microcontroller-Series. Aside from really expensive programmers, only the Willem Programmer with the LPT-Connector seems to be compatible, but investing 50+ Euros for a programmer that would arrive in about 4 weeks was out of the question. The same obviously goes for the expensive ones.
So I decided to make my own.

The MCS-48 Microcontroller-Series is controlled by first latching the Address into the processor, then applying the data, providing 21V to VDD and then pulsing the PROG-Pin with +18V for 50ms. Repeat that 1024 or 2048 times and the program is transferred to the internal memory.

For the controller I chose to use one of the many Arduino Nanos I bought some time ago on ebay for 3€ a piece.
To make the Power-Supply simpler, the required input-voltage is 21,5V and the +18,5V and +6V (Supply-Voltages slightly higher to account for Vdrop in the Diodes) are provided by LM317s.
BC327 PNP Transistors are used to toggle between 5V and the higher voltages, pins that require +5V max are directly connected to the Arduino Nano.

Because I was extra-lazy, I wrote the Software in a way that the program that is about to be programmed into the Micro is stored inside the Arduino Sketch. To make sending the data and getting program-messages via Serial Connection possible, I wired the Nano in a way that requires some bit-shifting in the software, but keeps the Serial IN/OUT-Pins free (Pins 0 and 1 of PORT D).
Care must be taken when building this thing though, because PB4 and PB3 are switched around (see Arduino Nano Pinout: https://bigdanzblog.wordpress.com/2015/01/30/cant-get-i2c-to-work-on-an-arduino-nano-pinout-diagrams/).
It should also be possible to build this thing with other Arduinos and put it together on a breadboard.

Btw. If you start messing around with these devices, a UV-Eraser is a must! :)

I hope this helps other people who came across these Micros, which seem to have been quite popular in the 80s - at least with Philips engineers :)

Datasheet for the UPI-41 - including the programming-procedure and the same for the MCS-48: http://www.intel.com/design/archives/periphrl/docs/29025601.pdf

Where can you buy such old IC anyway?

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #8 on: July 04, 2016, 05:31:21 pm »
Even if there is a pin-compatible replacement for the 8741, I would have to port the Software (which I would have to disassemble and then understand) to restore the functionality to my PM6654C counter (which is the primary reason why I'm building this). I guess that would be quite a bit harder to do. :)

An AVR or ARM is probably fast enough to run a MCS48 emulator :)

Where can you buy such old IC anyway?

eBay or Utsource.

Vintage erasable parts like this are easy to find, since they were almost always socketed.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2277
  • Country: gb
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #9 on: July 06, 2016, 07:45:23 am »

There is a very nice German device programmer called the Galep 5 which lists D8741A as supported:

http://www.conitec.com/english/galep5device_list.htm

I have access to one so if you are stuck you could send it to me. I don't have a UV eraser though!
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6459
  • Country: nl
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #10 on: July 06, 2016, 08:04:15 am »
Can you read/extract the software ?
Could it be an option to make an adapterpcb with a romless version of the 8741 such as the 8039 with an external eprom (2732 or modern eeprom version) ?

 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #11 on: July 06, 2016, 03:40:26 pm »
Can you read/extract the software ?
Could it be an option to make an adapterpcb with a romless version of the 8741 such as the 8039 with an external eprom (2732 or modern eeprom version) ?

The 8041 doesn't really support external ROM.
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #12 on: July 06, 2016, 09:13:20 pm »
80c41/42 from NEC do.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #13 on: July 06, 2016, 10:27:51 pm »
80c41/42 from NEC do.

I don't see anything about that in the NEC uPD80C42 datasheet: http://www.mess.org/_media/datasheets/nec/upd80c42c-306.pdf

Do you have a schematic for an external ROM system?
 

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #14 on: July 07, 2016, 01:16:12 am »

There is a very nice German device programmer called the Galep 5 which lists D8741A as supported:

http://www.conitec.com/english/galep5device_list.htm

I have access to one so if you are stuck you could send it to me. I don't have a UV eraser though!

Thanks for the offer, I'll send one or two chips to you if I can't get my device to program the chips.
I have a UV-Eraser here (cheap ebay-thingie - just 15€ including shipping, but works and is basically the same device you can buy here for almost 70€).

Can you read/extract the software ?
Could it be an option to make an adapterpcb with a romless version of the 8741 such as the 8039 with an external eprom (2732 or modern eeprom version) ?



Unfortunately not (i have an 8039, as well as an 8041 here which I got when I bought a large set of old chips on ebay).
The 8741 is a Slave-Processor with the bi-directional data-bus, where the external EPROM is connected to, equipped with directly accessible input/output-buffers.
In the PM6654C, these Buffers are read and written to by the 8085 CPU and are directly connected to the main data-bus, which also connects the 3 EPROMs to the CPU. That's why the 8741 or 8742 has to be used there.

About my programmer:
It kinda works. I get nice clean waveforms on the socket-pins and the voltages are okay.
The chip is quite power-hungry though: I measured almost 60mA without any input, not even a clock, which puts the LM317LZ for the 6V-Rail right at the very edge of what is acceptable/survivable (it has to burn away 15V). Over the course of about 1 minute it didn't cut out, but it was REALLY hot!
The problem I was kind of expecting with my first design (without NPN transistors) didn't fully vanish though: The lowest voltage on the pins that are supposed to have +18V maximum Voltage is 7,6V and on the VDD-Pin the lowest voltage I could see was about 10V. Adding a 10mA load did manage to eat away a few hundred millivolts, but that's still too much.
Would a PullUp-Resistor from the Base to the Emitter of the PNPs help reduce that voltage? There are 1k PullDown-Resistors connected directly to the pins of the chip-socket.
The 5V-Rail does have an almost perfect +5V btw. :)

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #15 on: July 07, 2016, 01:31:39 am »
80c41/42 from NEC do.

I don't see anything about that in the NEC uPD80C42 datasheet: http://www.mess.org/_media/datasheets/nec/upd80c42c-306.pdf

Do you have a schematic for an external ROM system?

use the EA pin to redirect rom accesses to an external multiplexed eprom.

the 8048 family databook probably has example schematics.
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #16 on: July 07, 2016, 02:50:21 am »
80c41/42 from NEC do.

I don't see anything about that in the NEC uPD80C42 datasheet: http://www.mess.org/_media/datasheets/nec/upd80c42c-306.pdf

Do you have a schematic for an external ROM system?

use the EA pin to redirect rom accesses to an external multiplexed eprom.
It's more difficult than with the 8048, because of the need to multiplex the data bus.  I'm not sure it can be made to work in all cases.

Quote
the 8048 family databook probably has example schematics.
The UPI-41 databook is separate, and has no such schematic.
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #17 on: July 07, 2016, 05:58:20 pm »
The chip is quite power-hungry though: I measured almost 60mA without any input, not even a clock, which puts the LM317LZ for the 6V-Rail right at the very edge of what is acceptable/survivable (it has to burn away 15V). Over the course of about 1 minute it didn't cut out, but it was REALLY hot!
60mA is not unexpected for NMOS. You should change the regulator to a TO220 type, and put a heatsink on it.

Quote
The problem I was kind of expecting with my first design (without NPN transistors) didn't fully vanish though: The lowest voltage on the pins that are supposed to have +18V maximum Voltage is 7,6V and on the VDD-Pin the lowest voltage I could see was about 10V. Adding a 10mA load did manage to eat away a few hundred millivolts, but that's still too much.
The transistors are not turning off properly. Here is a circuit which uses an NPN transistor in Common Base mode to translate the voltage level without inverting the signal or amplifying the PNP transistor's Base current. R2 provides a discharge path for Base charge, to ensure that Q2 turns off quickly. 
« Last Edit: July 07, 2016, 06:00:21 pm by Bruce Abbott »
 

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #18 on: July 07, 2016, 11:47:28 pm »
ARGH! /me = Idiot! I connected Collector and Emitter of the PNP the other way around  :palm:
Now the voltages are exactly what they are supposed to be and I am definitely programming something into the chip - Output-Waveforms change and I can see on the scope that the chip outputs some data when it is asked to present the data at the requested address.

Unfortunately, I don't know what I have programmed: When I try to read the chip I almost always get the value 71 and sometimes 73, so I'm guessing that there is something wrong with my code (newest version attached - it runs automatically, because I accidentally fried 2 pins of the Arduino when I connected them to +21V  |O ).

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #19 on: July 08, 2016, 12:55:20 pm »
I've just fired up my recently arrived PM3585 Logic Analyzer and checked the output of the Arduino - thanks again to KJDS for sending me the Disk-Images. It seems that the Arduino is sending the correct data to the 8742 (see attached screenshots).
But I still can't get the Arduino to verify the results and when I put the programmed chip into the PM6654 Counter, the reed-relays start clicking like crazy, but there is nothing on the display.

I'm now modifying my programmer-board so I can connect the Logic Analyzer to it.

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #20 on: July 08, 2016, 10:01:23 pm »
It seems to be working now.
I've managed to program one of the 8742 and it verified completely. I then put it in my PM6654C Counter and it is now apparently working again (I'm letting it run the internal test-program currently).
To achieve this, I increased the Programming-Pulse width to 57ms and increased the supply-voltage to 21,5V.

I can't program the other chip though (I ordered 3, one blew up when the Multimeter-probe slipped and short-circuited Supply and GND). When I try, the Arduino only reads blank memory-cells. So I'm either not giving it enough voltage, or the chip is blown.

I've attached the latest version of the Arduino-Firmware for this thing and an updated Schematic (my circuit had an additional 7805 in there to supply the MCS-48 Chip because I don't have the big TO-220 LM317 in my part-box at the moment and the Arduino was connected via a bunch of short cabled coming over from the breadboard).

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #21 on: July 08, 2016, 10:47:29 pm »
Congratulations!

Sorry if I missed something, but where did you find the PM6654C firmware?
 

Offline SaabFANTopic starter

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #22 on: July 09, 2016, 01:05:51 am »
It is available on the KO4BB-Website, where I also got the Manuals, which are really good scans and the schematics even come in color! :)

There is also the Firmware available that goes into the GPIB-Board inside the counter.

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #23 on: May 06, 2018, 01:08:54 pm »
It seems to be working now.
I've managed to program one of the 8742 and it verified completely. I then put it in my PM6654C Counter and it is now apparently working again (I'm letting it run the internal test-program currently).
To achieve this, I increased the Programming-Pulse width to 57ms and increased the supply-voltage to 21,5V.

I can't program the other chip though (I ordered 3, one blew up when the Multimeter-probe slipped and short-circuited Supply and GND). When I try, the Arduino only reads blank memory-cells. So I'm either not giving it enough voltage, or the chip is blown.

I've attached the latest version of the Arduino-Firmware for this thing and an updated Schematic (my circuit had an additional 7805 in there to supply the MCS-48 Chip because I don't have the big TO-220 LM317 in my part-box at the moment and the Arduino was connected via a bunch of short cabled coming over from the breadboard).
The BC237 transistors (PNP) are drawn backwards in the schematics.  Emitter goes to the +18V and +23V rail.  If you assemble the circuit like it is currently shown in the schematics, the voltage will switch from +23V and +11V (+18V and +9V) and not +5V which can destroy the microcontroller.
 
The following users thanked this post: edavid

Offline djsb

  • Frequent Contributor
  • **
  • Posts: 886
  • Country: gb
Re: Simple Programmer for vintage Intel MCS-48 Microcontroller
« Reply #24 on: May 21, 2023, 10:14:46 am »
Has the schematic above been updated? Is it correct?
David
Hertfordshire,UK
University Electronics Technician, London PIC,CCS C,Arduino,Kicad, Altium Designer,LPKF S103,S62 Operator, Electronics instructor. Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Credited Kicad French to English translator.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf