TRS80 Model 100 - TC40H157P Replacement - Page 1
Forum section: electronics / projects

author: rstor22
author_rank: Regular Contributor
timestamp: November 09, 2014, 01:49:56 am
content: I was hoping if someone could advise of the modern equivalent to the Toshiba TC40H157P.Background:My TRS80 Model 100 was having issues with receiving serial data. In the process of troubleshooting I ended up cutting the pins on my TC40H157P, installing a socket, and replacing it with a MC74HC157AN. I found that the actual problem was with the 6402 UART and replacing it solved the issue. I can now send and receive data via the serial port.There are a couple websites which show a modification done on the TRS80 Model 100 where a Bluetooth module is interfaced to the TTL receive and transmit directly off the 6402 UART. I tried interfacing a TTL signal directly to the UART: I am able to transmit data directly off pin 25 of the 6402 however receiving data on pin 20 of the 6402 UART does not work. Looking at the TTL waveform on the scope when applied to pin 20 shows it going from 5V to 2V (instead of 0V). Pin 20 of the 6402 is connected to the MC74HC157AN (formally TC40H157P) [see attached circuit]. After removing the ‘157 I was successfully able to receive data when a TTL signal is fed directly to pin 20 of the 6402.Though I cut the pins off my TC40H157P I was able to solder something up and temporarily installed it back again. With the TC40H157P installed I can also feed a TTL signal directly to pin 20 of the 6402 successfully.Would someone be able to explain why this is? What is the difference between the MC74HC157AN and the TC40H157P which would cause this (i.e. unsuccessful with the MC74HC157AN and success with the TC40H157P)?Is there a modern substitute for the TC40H157P? (I also tried a SN74LS157N and DM74157N however data is not received via the serial port).Thank you

author: amyk
author_rank: Super Contributor
timestamp: November 09, 2014, 02:28:11 am
content: Comparing the datasheets for the TC40H157P and MC74HC157AN one difference I can see is the propagation times - the newer IC is roughly twice as fast as the old one. The input/output voltages are also slightly different. You'd need to use a scope to see the exact differences.

author: oPossum
author_rank: Super Contributor
timestamp: November 09, 2014, 05:05:32 am
content: 4000 series outputs are generally much weaker then 74HC series outputs, so it is much easier to force the logic level with newer stronger CMOS outputs.

author: SL4P
author_rank: Super Contributor
timestamp: November 09, 2014, 07:33:52 am
content: To solve your problem on other platforms, I usually punch in two schottky diodes to isolate the two incoming signals - then let the logic do it's thing. You could add a 10K pull-up, but this often isn't needed.

author: PA0PBZ
author_rank: Super Contributor
timestamp: November 09, 2014, 10:00:23 am
content: Did you try another MC74HC157AN? It could just be damaged.

author: voltz
author_rank: Frequent Contributor
timestamp: November 09, 2014, 12:14:43 pm
content: Replacing the chip with your MC74HC157AN should be fine.The problem you are seeing is actually a problem of what you are trying to do with the circuit, ie. not its intended purpose.What i mean is, you are trying to 'pull down' the active high output of the chip (so it only goes to 2, not 0). This is going to damage the chip output or the device doing the forcing down.Removing the chip allows the UART input to swing from 5 to 0. But placing the chip in circuit is trying to pull the UART input high again. What you are doing is not the correct way of interfacing a 5v signal to the UART. The fact that the old CMOS chip allows this to work is just a fluke, its output current is too low to hold the pin up, but it is trying its best to and will probably break in time.The best way to do this (as SL4P said) is use diodes from both sources and a pull up resistor. Basically you are making an OR gate. Then, both TTL signals will operate the UART input without trying to pull one another down.Hope that helps. And Cudos for the TRS-80!

author: rstor22
author_rank: Regular Contributor
timestamp: November 10, 2014, 03:19:04 am
content: Thanks everyone for all your help!After the suggestions to use diodes I was looking at the following site:http://www.play-hookey.com/digital_electronics/dl_gates.htmlI am thinking that a diode AND gate would be needed (instead of an OR gate). As the '157 output to the UART is always high during idle, if I apply another TTL signal to the UART then when that signal is high it will be passed as a logic one and when it is low it would be a logic zero (when ANDed with the '157 always high output during idle). If the TTL signal I am applying is idle, the same would hold true for the '157.Please advise if a diode AND circuit would be needed in this case (see attached circuit)Thanks again!

author: voltz
author_rank: Frequent Contributor
timestamp: November 10, 2014, 11:14:49 am
content: Yes, your circuit is correct. And yes it is an AND gate.They usually refer to diode arrangements like this as 'ORing' TTL signals because one OR the other signal are combined.That may have been misleading. But the circuit is correct where both sources can pull the level Low, and the Hi state is pulled hi by the pull up when idle.