2020-06-29 15:48:57 +00:00
|
|
|
---
|
2023-09-17 23:29:21 +00:00
|
|
|
title: "Hardware Design"
|
|
|
|
permalink: /docs/hardware
|
2023-09-18 01:56:05 +00:00
|
|
|
exerpt: "TommyPROM Arduino EEPROM programmer hardware design"
|
2020-06-29 15:48:57 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
The hardware uses an Arduino to write data and to toggle control lines with the
|
2023-09-18 01:56:05 +00:00
|
|
|
appropriate timing to access the PROM. A pair of 74LS164 serial-to-parallel shift
|
2020-06-29 15:48:57 +00:00
|
|
|
registers latch the address lines. Use of the shift registers allows the Arduino to
|
2020-08-24 16:14:20 +00:00
|
|
|
control up to 16 address lines using only 3 output ports. This design will read and
|
|
|
|
program the 28C series chips and can read most other parallel ROM chip families.
|
2020-06-29 15:48:57 +00:00
|
|
|
|
|
|
|
The basic circuit is as follows:
|
|
|
|
* Pins D2..D9 are wired to the data lines on the target PROM.
|
|
|
|
* Pins A0..A2 are wired to the WE, CE, and OE control lines on the target PROM.
|
|
|
|
* Pins A3..A5 control shift registers to produce the address lines.
|
2022-08-15 17:48:49 +00:00
|
|
|
* Pins D10..D12 control A<sub>16</sub>..A<sub>18</sub> for chips larger than 64K bytes.
|
2020-06-29 15:48:57 +00:00
|
|
|
|
|
|
|
Note that the existing design uses 74LS164 shift registers, but another 8-bit parallel out
|
2022-08-15 17:48:49 +00:00
|
|
|
shift register, like the 74LS595, can be used instead with some pin changes. See the
|
2020-11-27 19:17:58 +00:00
|
|
|
[74LS595 Shift Registers](#74ls595-shift-registers) section below for details.
|
|
|
|
|
|
|
|
The two shift registers can produce a sixteen bit address, although the 28C256 only needs
|
|
|
|
15 addresses. Chips larger than 64K are supported by using the shift registers for
|
|
|
|
A<sub>0</sub>..A<sub>15</sub> and connecting Arduino pins D10..D12 to the chip's
|
|
|
|
A<sub>16</sub>..A<sub>18</sub>
|
|
|
|
|
2023-09-17 23:29:21 +00:00
|
|
|
[![TommyPROM Nano Schematic](images/TommyPROM-nano-sch.png)](images/TommyPROM-nano-sch.png)
|
2020-11-27 19:17:58 +00:00
|
|
|
|
|
|
|
## 74LS595 Shift Registers
|
2020-08-24 16:14:20 +00:00
|
|
|
|
2021-05-27 14:17:14 +00:00
|
|
|
When using the [74LS595](images/TommyPROM-595.jpg) instead of the 74LS164, there is
|
2022-08-15 17:48:49 +00:00
|
|
|
an additional output latch that is pulsed to put the contents of the shift register on the
|
|
|
|
output lines. The code supports the 164s or the 595s by default. No code changes are
|
|
|
|
needed to use either version of the shift register hardware.
|
2020-11-27 19:17:58 +00:00
|
|
|
|
|
|
|
The table below shows the connections when using either the 74LS164 or the 74LS595 for the
|
|
|
|
address shift registers. USR refers to the Upper Shift Register
|
|
|
|
(A<sub>8</sub>..A<sub>15</sub>) and LSR refers to the Lower Shift Register
|
|
|
|
(A<sub>0</sub>..A<sub>7</sub>).
|
|
|
|
|
|
|
|
|Arduino |74LS164 |74LS595|
|
|
|
|
|:---: |:---: |:---: |
|
|
|
|
|A0 |ROM WE |ROM WE|
|
|
|
|
|A1 |ROM CE |ROM CE|
|
|
|
|
|A2 |ROM OE |ROM OE|
|
|
|
|
|A3 |USR CLK |USR SRCLK|
|
|
|
|
|A4 |LSR CLK |LSR SRCLK|
|
|
|
|
|A5<sup>1</sup> |LSR+USR A |LSR+USR SER|
|
|
|
|
|D2..D9 |ROM D<sub>0</sub>..D<sub>7</sub> |ROM D<sub>0</sub>..D<sub>7</sub> |
|
|
|
|
|D10..D12<sup>2</sup>|ROM A<sub>16</sub>..A<sub>18</sub>|ROM A<sub>16</sub>..A<sub>18</sub>|
|
|
|
|
|D13<sup>3</sup> |-- |LSR+USR RCLK|
|
2020-08-24 16:14:20 +00:00
|
|
|
|
|
|
|
Notes:
|
2020-11-27 19:17:58 +00:00
|
|
|
1. The data pin on A5 is connected to both the Upper Shift Register (USR) and the Lower
|
|
|
|
Shift Register (LSR).
|
2020-08-24 16:14:20 +00:00
|
|
|
2. The upper address lines are not needed for 28C64 and 28C256 chips, but are used for
|
|
|
|
larger chips like the 27C040.
|
2020-11-27 19:17:58 +00:00
|
|
|
3. The D13 pin controls the output register on the '595 shift registers. This pin is not
|
|
|
|
connected when using the 74LS164.
|
2020-06-29 15:48:57 +00:00
|
|
|
|
2020-11-27 19:17:58 +00:00
|
|
|
Note that the 74LS595s have two additional pins that need to be connected.
|
|
|
|
* An output enable pin, labeled as either G or OE in the datasheet, must be tied LOW for
|
|
|
|
both chips or else they will not produce any signal on their output lines.
|
2020-11-27 19:20:57 +00:00
|
|
|
* A reset pin, labeled as RESET or SRCLR, must be tied HIGH for both chips or else the
|
2020-11-27 19:17:58 +00:00
|
|
|
shift registers will be held in a reset state.
|
2020-08-24 16:14:20 +00:00
|
|
|
|
|
|
|
## Ben Eater EEPROM Programmer
|
|
|
|
|
|
|
|
If you are here because you built the [Ben Eater EEPROM
|
|
|
|
Programmer](https://github.com/beneater/eeprom-programmer), note that the designs are
|
|
|
|
similar, but the TommyPROM code will not run on that hardware without some significant
|
|
|
|
changes. If you just need to unlock the Software Data Protection (SDP) on a chip, then
|
|
|
|
see the
|
2020-11-27 19:17:58 +00:00
|
|
|
[unlock-ben-eater-hardware sketch](https://github.com/TomNisbet/TommyPROM/tree/master/unlock-ben-eater-hardware)
|
|
|
|
for a solution. That sketch is purpose-built to run on the Ben Eater hardware directly
|
|
|
|
and it **will not work** with the TommyPROM hardware.
|
2020-08-24 16:14:20 +00:00
|
|
|
|
|
|
|
If you want the functionality of the TommyPROM software on the Ben Eater hardware, the
|
|
|
|
easiest path is probably to modify the hardware to match the TommyPROM software rather
|
|
|
|
than trying to change the pin assignments in software. There are a few reasons for this:
|
|
|
|
|
|
|
|
* The Ben Eater hardware uses D13 to control the ROM's Write Enable pin and it ties the
|
|
|
|
Chip Enable pin to always be active. The D13 pin is connected to the Arduino's built-in
|
2020-08-24 16:23:39 +00:00
|
|
|
LED, which blinks at boot. This means that the chip is likely writing some random data at
|
2020-08-24 16:14:20 +00:00
|
|
|
boot time. This isn't a problem for the Ben Eater sketches, because they always write
|
|
|
|
their own data to the chip anyway. One use of TommyPROM is to just read data from a chip,
|
|
|
|
so a random write on boot would be bad.
|
|
|
|
* The OE pin is controlled by the Address shift registers. This doesn't work well with
|
|
|
|
the modular architecture of TommyPROM and it definitely would not work with 74LS164s
|
|
|
|
because it would toggle the OE pin as new addresses are shifted in.
|
2020-11-27 19:17:58 +00:00
|
|
|
* The direct port write software is a bit complicated and is more difficult to modify than
|
2020-08-24 16:14:20 +00:00
|
|
|
just renaming a few pin #defines. This was done for performance reasons, particularly
|
|
|
|
for the SDP timing, but it means that the code is not easy to change.
|
|
|
|
|
|
|
|
Changing the hardware is fairly straightforward. The data lines move 3 pins from D5..D12
|
|
|
|
down to D2..D9. Most of the ROM and shift register control lines move over to the A0..A5
|
|
|
|
pins. The upper shift register is controlled directly from the Arduino instead of being
|
|
|
|
connected to the overflow of the lower shift register. All of the connections are in the
|
|
|
|
chart in the section above.
|