RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » Arduino 'Is it an HD1-6120?' Tester
Arduino 'Is it an HD1-6120?' Tester [message #5245] Sun, 30 September 2018 10:48
Andrew B is currently offline  Andrew B
Messages: 438
Registered: October 2015
Location: Hawthorne, CA
Senior Member
Administrator
Attached is an Arduino sketch to check if a chip is actually an HD1-6120. This supplies a clock and twiddles some pins while watching for the response of /RUN - a full check would require a much more complicated setup. A chip which passes this is almost certainly an actual 6120, since it tests 4 inputs (clock in, /RESET, /DMAREQ, RUN-/HLT) and 1 output (/RUN) in addition to VCC/GND, and it's very unlikely that another chip would respond the same way.

This should work with any Arduino board that uses a 5V I/O voltage CPU - I'm using an Arduino Uno:
index.php?t=getfile&id=1073&private=0

Pin connections:
Check resistance between Pin 20 (GND) and Pin 40 (VCC) on the IC to be tested, and make sure they aren't shorted.
Arduino Pin 2 -> Resistor 270-1K Ohms -> 6120 Pin 7 /RESET
Arduino Pin 3 -> Resistor 270-1K Ohms -> 6120 Pin 9 OSCIN
Arduino Pin 4 -> Resistor 270-1K Ohms -> 6120 Pin 3 /DMAREQ
Arduino Pin 5 -> Resistor 270-1K Ohms -> 6110 Pin 5 RUN-/HLT
Arduino Pin 6 -> 6120 Pin 6 /RUN (this is an input so no resistor needed)
Arduino GND -> 6120 Pin 20 GND
Arduino +5V -> 6120 Pin 40 +5V
Arduino +5V -> Resistor 270-1K Ohms -> 6120 Pin 8 ACK
Resistors are sized to stay below 20 mA max current into an Ardino pin, in case the IC isn't a 6120

Procedure:
-Load sketch in Arduino IDE and compile/upload to Arduino
-Disconnect Arduino from USB
-Make connections above to 6120 using your method of choice - I used a breadboard as shown in the attached photo
-Reconnect Arduino, go to the Tools -> Serial Monitor in the Arduino IDE or connect to the COM port for the Arduino in a terminal like TeraTerm, 9600 baud
-After the sign-on menu prints, press 't' (or send a 't' using the Arduino Serial Monitor) to start the tests

Results should be something like this:
Press 't' to start HD1-6120 Alive-ness tests
Tests watch for response of /RUN
T1 - /RESET L - /RUN should be H
T2 - /RESET H - /RUN should be L
T3 - /DMAREQ L - /RUN should be L
T4 - /DMAREQ H - /RUN should be L
T5 - RUN-/HLT PULSE - /RUN should be H
T6 - RUN-/HLT PULSE - /RUN should be L
Test will run for 24 iterations
Itr 0 T1 T2 T3 T4 T5 T6
Itr 1 T1 T2 T3 T4 T5 T6
Itr 2 T1 T2 T3 T4 T5 T6
Itr 3 T1 T2 T3 T4 T5 T6
Itr 4 T1 T2 T3 T4 T5 T6
Itr 5 T1 T2 T3 T4 T5 T6
Itr 6 T1 T2 T3 T4 T5 T6
Itr 7 T1 T2 T3 T4 T5 T6
Itr 8 T1 T2 T3 T4 T5 T6
Itr 9 T1 T2 T3 T4 T5 T6
Itr 10 T1 T2 T3 T4 T5 T6
Itr 11 T1 T2 T3 T4 T5 T6
Itr 12 T1 T2 T3 T4 T5 T6
Itr 13 T1 T2 T3 T4 T5 T6
Itr 14 T1 T2 T3 T4 T5 T6
Itr 15 T1 T2 T3 T4 T5 T6
Itr 16 T1 T2 T3 T4 T5 T6
Itr 17 T1 T2 T3 T4 T5 T6
Itr 18 T1 T2 T3 T4 T5 T6
Itr 19 T1 T2 T3 T4 T5 T6
Itr 20 T1 T2 T3 T4 T5 T6
Itr 21 T1 T2 T3 T4 T5 T6
Itr 22 T1 T2 T3 T4 T5 T6
Itr 23 T1 T2 T3 T4 T5 T6
All iterations passed!


I tested this with 1 6120 from the lot that I bought for the kits I sold, and the 6120 from my original STG SBC6120 board. I also tried a random VIA keyboard controller that had VCC and GND on the same pins as a 6120, which tossed errors all over the place.

The RUN-/HLT test is a little sensitive and you may see a handful of failures on T5/T6 which is why the tests run multiple times. I played with the pulse lengths to try to eliminate this but it seemed intermittent.

If you do get a failure, double-check all the wiring and you can also try uncommenting the #define line in the code which causes it to print the state of /RUN every time it is sampled. Please report back here so we can discuss and make sure nothing was missed.

Let me know if this is useful.

[Updated on: Sun, 30 September 2018 11:52]

Report message to a moderator

Previous Topic: Zeta v2 sbc and gotek floppy emulator
Next Topic: SBC6120 <--> IOB6120 ramdisk question


Current Time: Wed Dec 11 03:05:51 PST 2019

Total time taken to generate the page: 0.01053 seconds