TommyPROM/docs/troubleshooting.md
2020-07-17 11:17:56 -04:00

5.2 KiB

title description has_children nav_order
Troubleshooting Troubleshooting TommyPROM hardware false 3

Hardware Verifier Tool

A Hardware verification Arduino sketch is provided to assist with troubleshooting. Loading this sketch onto the TommyPROM hardware allows access to individual control lines from the Arduino to verify that the hardware was assembled correctly.

The verifier sketch can be used without a chip installed to scope out address and data lines. It also offers low-level control when the chip is installed.

THIS TOOL USES DIRECT PORT ACCESS ON THE ARDUINO. CHECK TO MAKE SURE IT IS COMPATIBLE WITH YOUR BOARD BEFORE USING. It will work correctly on the Unu, Nano, and Boarduino. It WILL NOT WORK on the Micro.

Note that the commands write to the individual 28C control lines with some exceptions to protect the chip and the host Arduino:

  • When the O command is used to enable chip output, the Arduino data bus is set to INPUT
  • When the D command is used to write data from the Arduino, the chip output is disabled
  • The R command sets the output enable (OE) on the chip, but not the chip enable (CE)
  • The L and U commands reset CE, OE, and WE back to disabled on completion and change the data and address

The session below shows how a write fails to a locked chip and then succeeds once the chip is unlocked.

Hardware Verifier - 28C series EEPROM

Valid commands are:
  Axxxx         - Set address bus to xxxx
  Dxx           - Set Data bus to xx
  Cs            - Set Chip enable to state (e=enable, d=disable)
  Os            - Set Output enable to state (e=enable, d=disable)
  Ws            - Set Write enable to state (e=enable, d=disable)
  R             - Read and print the value on the data bus
  L             - Send Lock sequence to enable device Software Data Protection
  U             - Send Unlock sequence to disable device Software Data Protection

#l
Writing the lock code to enable Software Write Protect mode.

#a0000

#ce

#r
22

#d55

#we

#wd

#r
22

#u
Writing the unlock code to disable Software Write Protect mode.

#d33

#we

#wd

#r
33

#cd

Troubleshooting

If the programmer seems to be working, but 28C256 EEPROMs cannot be written, the problem may simply be a locked chip. Some chips have been received with the Software Data Protection (SDP) enabled, even though the data sheet states that it should be disabled from the factory. If the chip does not write (try the Zap command in the TommyPROM code), then try an Unlock command and then retry the write.

If the programmer is not working, the most common problem is a simple wiring error. The hardware verify sketch can help to find missing or crossed connections.

The hardware has three sections: an 8-bit read-write data bus connected to the target PROM's data line, a set of write-only address lines generated by shift registers and connected to the target PROM's address lines, and a set of write-only control lines from the Arduino that toggle the PROM's output enable and write lines.

The first step in general testing it to remove the target chip and then toggle single lines from the Arduino. The result should be measured at the target PROM footprint, not at the Arduino. To fully test, use a multimeter to verify that the lines that should be active are active and that any other lines are not.

Testing the data bus

Issue a set of Data commands from the Hardware Verify sketch and measure EACH data line at the PROM footprint. If the expected result is "D0 HIGH", verify not only that D0 reads HIGH, but that all of the other lines read LOW.

Data test commands

Command Result
D0 All data lines LOW
D1 D0 HIGH
D2 D1 HIGH
D4 D2 HIGH
D8 D3 HIGH
D10 D4 HIGH
D20 D5 HIGH
D40 D6 HIGH
D80 D7 HIGH
Dff all data lines HIGH

Testing the address lines

As with the data tests above, verify not only the line with the expected result, but all other address lines as well.

Command Result
A0 All address lines LOW
A1 A0 HIGH
A2 A1 HIGH
A4 A2 HIGH
A8 A3 HIGH
A10 A4 HIGH
A20 A5 HIGH
A40 A6 HIGH
A80 A7 HIGH
A100 A8 HIGH
A200 A9 HIGH
A400 A10 HIGH
A800 A11 HIGH
A1000 A12 HIGH
A2000 A13 HIGH
A4000 A14 HIGH
A7fff all address lines HIGH

Testing the control lines

The PROM control lines are active LOW, so an enable command will set the corresponding control line LOW and a disable will set it HIGH. Try the commands in the following table. Note that they should be done in the order listed, because a test command on one control line will not change the state of any of the other lines.

To begin, issue the following commands: D0, A0, Cd, Od, Wd. Note that the Od command is the letter 'O', not the number zero. All three control lines should read HIGH after these commands are complete.

Command Result
Ce Chip Enable (CE) LOW, others HIGH
Cd CE, OE, WE all HIGH
Oe Output Enable (OE) LOW, others HIGH
Cd CE, OE, WE all HIGH
We Write Enable (WE) LOW, others HIGH
Wd CE, OE, WE all HIGH