TommyPROM/docs/troubleshooting.md

169 lines
5.8 KiB
Markdown
Raw Normal View History

2020-06-28 18:28:35 +00:00
---
title: Troubleshooting
2020-06-29 23:18:15 +00:00
description: "Troubleshooting TommyPROM hardware"
2020-06-28 18:28:35 +00:00
has_children: false
nav_order: 3
---
## Hardware Verifier Tool
2020-06-29 18:44:14 +00:00
A [Hardware verification Arduino sketch](https://github.com/TomNisbet/TommyPROM/tree/master/HardwareVerify)
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
2020-06-29 15:48:57 +00:00
hardware was assembled correctly.
2020-06-28 18:28:35 +00:00
2020-06-29 18:44:14 +00:00
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.
2020-06-28 18:28:35 +00:00
2020-06-29 15:48:57 +00:00
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 Uno, Nano, and Boarduino. It
2020-06-29 15:48:57 +00:00
WILL NOT WORK on the Micro.
2020-06-28 18:28:35 +00:00
2020-06-29 15:48:57 +00:00
Note that the commands write to the individual 28C control lines with some exceptions to
2020-06-29 18:44:14 +00:00
protect the chip and the host Arduino:
2020-06-28 18:28:35 +00:00
2020-06-29 18:44:14 +00:00
* 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
2020-06-28 18:28:35 +00:00
* The R command sets the output enable (OE) on the chip, but not the chip enable (CE)
2020-06-29 18:44:14 +00:00
* The L and U commands reset CE, OE, and WE back to disabled on completion and change the
data and address
2020-06-28 18:28:35 +00:00
2020-06-29 15:48:57 +00:00
The session below shows how a write fails to a locked chip and then succeeds once the chip
is unlocked.
2020-06-28 18:28:35 +00:00
```
Hardware Verifier - 28C series EEPROM
Valid commands are:
Axxxx - Set Address bus to xxxx
2020-06-28 18:28:35 +00:00
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
```
2020-07-17 15:17:56 +00:00
## 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.
Note that the Dx and Ax commands can be a bit confusing. The command _D5_ means "set the value 05 HEX on the eight data lines". It does not specifically refer to the D<sub>5</sub> data pin on the ROM or the D5 pin on the Arduino. In the example above, 05 HEX is the same as 00000101 BINARY. This would set the ROM D<sub>0</sub> and D<sub>2</sub> pins HIGH and the other six pins would be LOW.
2020-07-17 15:17:56 +00:00
### 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 "D<sub>0</sub> HIGH", verify not only
that D<sub>0</sub> reads HIGH, but that all of the other lines read LOW.**
2020-07-17 15:17:56 +00:00
Data test commands
|Command|Result|
|:--- |:--- |
|D0 |All data lines LOW|
|D1 |D<sub>0</sub> HIGH|
|D2 |D<sub>1</sub> HIGH|
|D4 |D<sub>2</sub> HIGH|
|D8 |D<sub>3</sub> HIGH|
|D10 |D<sub>4</sub> HIGH|
|D20 |D<sub>5</sub> HIGH|
|D40 |D<sub>6</sub> HIGH|
|D80 |D<sub>7</sub> HIGH|
2020-07-17 15:17:56 +00:00
|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 |A<sub>0</sub> HIGH|
|A2 |A<sub>1</sub> HIGH|
|A4 |A<sub>2</sub> HIGH|
|A8 |A<sub>3</sub> HIGH|
|A10 |A<sub>4</sub> HIGH|
|A20 |A<sub>5</sub> HIGH|
|A40 |A<sub>6</sub> HIGH|
|A80 |A<sub>7</sub> HIGH|
|A100 |A<sub>8</sub> HIGH|
|A200 |A<sub>9</sub> HIGH|
|A400 |A<sub>10</sub> HIGH|
|A800 |A<sub>11</sub> HIGH|
|A1000 |A<sub>12</sub> HIGH|
|A2000 |A<sub>13</sub> HIGH|
|A4000 |A<sub>14</sub> HIGH|
2020-07-17 15:17:56 +00:00
|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|
|Od | CE, OE, WE all HIGH|
2020-07-17 15:17:56 +00:00
|We | Write Enable (WE) LOW, others HIGH|
|Wd | CE, OE, WE all HIGH|