Dead Dinosaur (animatronic).

JohnInTX

Joined Jun 26, 2012
4,787
Scope results: first pic is oscillator
Second is ALE.
OK, so the oscillator is running at around the correct frequency - 11.059MHz.
It appears ALE is working with good logic levels so at least the processor is running. While you are on ALE, change the scope triggering from AUTO to NORM then adjust the trigger level for a stable trace. You may have to adjust the horizontal speed. ALE will pulse roughly every 12 or 6 oscillator cycles so at a rep rate of about 1-4MHz depending on what the program is doing.

With the scope:
Probe around at all of the STC 899C52 inputs and outputs to ensure that they are all at solid logic levels. Physically operate the inputs. For example, if one is connected to a microswitch on the dino's elbow, toggle the switch and make sure the signal gets to the input port at good logic levels.

Check logic levels into and from the 'HC373.
You will probably find ALE/ connected to pin 11 of the 373. I think the 373 latches A1-A0 and CS/ for the 8255s so it needs to be working too.
https://www.ti.com/product/SN74HC373

The 8255 IO requires RD/ (Pin 17) and WR/ (Pin 16) signals from the 89C52 to the corresponding pins on the 8255s (RD/ on pin 5, WR/on pin 36). Probe these. They will be sporadic, pulsing LOW only when the external 8255 IO is read or written. Also probe chip select CS/ Pin 6) on each 82C55. CS/ will pulse low to enable data transfer concurrent with RD/ or WR/ on each chip. CS/ will be sporadic as well.

8255 pins A1-A0 (8-9) select the port. I think these would be latched by the 373 but check that out.

Get some sleep if you can.

Good luck!
 

Thread Starter

v-8 volvo

Joined Mar 29, 2011
41
OK, so the oscillator is running at around the correct frequency - 11.059MHz.
It appears ALE is working with good logic levels so at least the processor is running. While you are on ALE, change the scope triggering from AUTO to NORM then adjust the trigger level for a stable trace. You may have to adjust the horizontal speed. ALE will pulse roughly every 12 or 6 oscillator cycles so at a rep rate of about 1-4MHz depending on what the program is doing.

With the scope:
Probe around at all of the STC 899C52 inputs and outputs to ensure that they are all at solid logic levels. Physically operate the inputs. For example, if one is connected to a microswitch on the dino's elbow, toggle the switch and make sure the signal gets to the input port at good logic levels.

Check logic levels into and from the 'HC373.
You will probably find ALE/ connected to pin 11 of the 373. I think the 373 latches A1-A0 and CS/ for the 8255s so it needs to be working too.
https://www.ti.com/product/SN74HC373

The 8255 IO requires RD/ (Pin 17) and WR/ (Pin 16) signals from the 89C52 to the corresponding pins on the 8255s (RD/ on pin 5, WR/on pin 36). Probe these. They will be sporadic, pulsing LOW only when the external 8255 IO is read or written. Also probe chip select CS/ Pin 6) on each 82C55. CS/ will pulse low to enable data transfer concurrent with RD/ or WR/ on each chip. CS/ will be sporadic as well.

8255 pins A1-A0 (8-9) select the port. I think these would be latched by the 373 but check that out.

Get some sleep if you can.

Good luck!
Very encouraging indeed! I don't have easy access to the actual dinosaur. It's in a man-made cave, and I believe the only thing that triggers its operation is a PIR motion sensor mounted in a metal mushroom. I need to trace the trigger line on the processor board and see what IC it is connected to.
Regarding Logic levels. I can do some research at lunch if needed, but could you elaborate a little on that? Having zero experience in this realm intimidates me a bit. Maybe some pointers on scope settings or examples of actual logic levels?
I forgot if it was you, Y'ackov, or Mr Chips that said have a replacement '373 chip to swap out.
I will try to print the data sheets for the major chips. I should have a good block of time after work tomorrow to hit this hard.
Many thanks!
 

Poyntat

Joined May 24, 2022
60
There is also a serial eeprom on the control board. The silk screen says 24C64 but it looks like the actual device is a 24C512.
I would expect some activity on pins 5 & 6 (SDA & SCL) when the processor starts as this device is likely to hold non Volatile data required to run the dinosaur system.
Great work by @JohnInTX.
 

Thread Starter

v-8 volvo

Joined Mar 29, 2011
41
There is also a serial eeprom on the control board. The silk screen says 24C64 but it looks like the actual device is a 24C512.
I would expect some activity on pins 5 & 6 (SDA & SCL) when the processor starts as this device is likely to hold non Volatile data required to run the dinosaur system.
Great work by @JohnInTX.
Well, after a bit of a hiatus, I'm back on this project. I ordered a replacement EEPROM as well as the
74HC373 chip.
I realize it has no bearing on this particular project, but some years ago, I picked up a dead 22 inch Visio TV. Sniffing around some forums, I read that there had been an issue with failing EEPROMS, and replacement cured the problem in many cases. Luckily, that approach was successful for me.
Back to the Dino box, I checked operation of the motion sensor, and the trigger line went low when waving something in front of the sensor.
At this point is it OK to plug in the new IC's, (with a ground strap), one at a time with a power-up test on each?
I feel like an idiot asking these kinds of questions, but I want to spare myself of any extra heartburn if I can help it!
 

Poyntat

Joined May 24, 2022
60
Did you get anywhere with the serial port?
The connection from the processor to the MAX232 is direct and initialisation of the USARtT is usually carried out early in the programme.
It’s very likely that this port handles a simple user interface when the processor is running and may give you some idea of the issue. It is probably also used to load the contents of the EEPROM under the control of a technician during manufacture or repair.
I would expect the system to perform a ‘cold start’ if it detects a blank EEPROM and output a prompt over the serial port.
May be worthwhile spending some time on testing this link.
 

Thread Starter

v-8 volvo

Joined Mar 29, 2011
41
Sure, try the 373. The EEPROM can be changed but it is possible that the old one has configuration data that the new one wouldn’t have.
Well, nothing changed after swapping in the new 373 chip. I guess I'll revisit the serial port troubleshooting. Been keeping busy with the Grandkids and the aftermath of someone thinking they needed my identity more than I did.
Is it worth testing the row of diodes next to the processor? Do I need to lift a diode leg and test out of circuit?
I heard that the owner said the season is almost over, and when that happens, he gets cheap. At this point, I would still rather figure it out to have the satisfaction and build some confidence to do more work like this.
A few bucks to put in the oil tank would still be nice too.
 

Poyntat

Joined May 24, 2022
60
Why not connect your oscilloscope to the serial port as a quick check for any activity when the cpu powers up.
Use a 9 pin male connector with wires connected to pins 2, 3 & 5.
Connect the oscilloscope probe ground of channel 1 to pin 5 and the tip to pin 2, the wire on Pin 3 is not required for this test.Make sure that channel 1 is set for DC coupling.
Set the oscilloscope to auto trigger, horizontal to say 1mS per division and vertical to 5v per division.
Set the trace to the centre of the display.
Power up the controller and simultaneously check for any activity on the oscilloscope.
If the controller transmits on pin 2 then you should see a stream of pulses with levels going from something like -9V to +9V. With the quiescent level (when nothing is being transmitted) at around -9V.
If the quiescent level is not at -9 but near 0v then remove the probe from pin 2 and connect it to pin 3 and repeat the power up sequence.
Note that the above assumes that the link is designed to operate with no hardware handshake which is normally the case for simple terminal connections.
 

JohnInTX

Joined Jun 26, 2012
4,787
Another approach:
These chips get programmed over the RS-232 link talking to an on-chip bootloader. A link to a zipped downloadable executable (eek!) is on this page at 'ISP Programming Software'.
https://www.stcmicro.com/STC/STC89C52RC.html

Fire up the program and familiarize yourself with the commands before connecting the chip. It may be in Chinese..
If it connects up and reports that it found the chip then you at least know that the chip is executing the bootloader.
Try to read the code in the chip. Hopefully it will fail saying that the chip is code protected - indicating that the load is still probably OK.
If it reads back all 1's or 0's, the chip has been bulk-erased. I don't know specifically about this chip but I've seen others that get hammered with power supply transients/droops etc. In that case, you're done.
In any case be very careful. Besides the obvious risk of running an executable from the inter-toobs, there will be a function to 'Erase and prepare for download of new code.' Since you don't have new code.
That's as far as I'd go with the serial link.
Google stc89c52rc bootloader for some links to articles and the like re: the bootloader.

An easier way to test inputs would be to apply voltage at the connector pin and see if the logic level changes on the corresponding processor's pin. Given that the whole dino is dead though, I'd think it unlikely that a single IO would be to blame unless it was a safety interlock or something like that. More likely it would be bad power supply, broken processor, bad power/gnd wires to the dino.. something where a single point of failure would down the whole thing.

Good luck!
 
Top