Skip to content

Commit c59e377

Browse files
committed
README cleanup and add info for all supported constructors.
1 parent 94a4c5a commit c59e377

File tree

1 file changed

+38
-11
lines changed

1 file changed

+38
-11
lines changed

README.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ ParallelEEPROM Library
33

44
This is a parallel EEPROM programmer library. It currently supports 32Kx8 (28C256 and X28256) and 2Kx8 (28C16) EEPROMs. Other sizes may be supported in the future.
55

6-
It has been tested with a 3.3V MSP432 microcontroller, and therefore also supports an optional 74LVC245 transceiver to level-shift the data signals between the EEPROM and the MSP432.
6+
The library has been tested with a 3.3V MSP432 microcontroller, and therefore also supports an optional 74LVC245 transceiver to level-shift the data signals between the EEPROM and the MSP432.
77

88
Since this is intended for a parallel EEPROM device, a large number of I/O pins are required. For example, with 28C256 devices and a 74LVC245 transceiver, a total of 28 I/O pins are required (15 address, 8 data, and 5 control pins). In addition, a large amount of program memory is required to hold to EEPROM program data. For this reason, this library was only tested on MPS432, but may work with other microcontrollers with sufficient program memory and I/O.
99

1010
After a write operation, reads and writes will not return valid data until the write cycle has completed. The library supports both DATA polling and TOGGLE polling to detect the completion of a write cycle so that hard-coded delays are not required. Since not all chips support the different polling types, methods are provided which support no polling (requiring a hard-coded delay after writes), DATA polling, or TOGGLE polling.
1111

1212
DATA polling uses the most significant data bit (IO7) to signal when a write operation has completed. TOGGLE polling uses IO6. For details on how polling works and which polling method is supported, see the specific device datasheet.
1313

14-
The library currently supports single-byte reads and writes.
15-
16-
Future updates may include support for multi-byte reads and page writes.
14+
The library currently supports single-byte reads and writes. Future updates may include support for multi-byte reads and page writes.
1715

1816
Usage
1917
-----
@@ -24,15 +22,43 @@ First, **include** the library header file:
2422

2523
#include <ParallelEEPROM.h>
2624

27-
Next, **instantiate** an ParallelEEPROM object:
25+
Next, **instantiate** an ParallelEEPROM object. The constructor used depends on the EEPROM type and whether you are using a 74LVC245 or similar transceiver on the data lines:
26+
27+
1. 28C256/X28256 with 74LVC245:
28+
```
29+
ParallelEEPROM eep(byte A14, byte A13, byte A12, byte A11, byte A10, byte A9, byte A8,
30+
byte A7, byte A6, byte A5, byte A4, byte A3, byte A2, byte A1, byte A0,
31+
byte D7, byte D6, byte D5, byte D4, byte D3, byte D2, byte D1, byte D0,
32+
byte EEPROM_CE, byte EEPROM_OE, byte EEPROM_WE,
33+
byte 245_OE, byte 245_DIR);
34+
```
35+
36+
2. 28C16 with 74LVC245:
37+
```
38+
ParallelEEPROM eep(byte A10, byte A9, byte A8,
39+
byte A7, byte A6, byte A5, byte A4, byte A3, byte A2, byte A1, byte A0,
40+
byte D7, byte D6, byte D5, byte D4, byte D3, byte D2, byte D1, byte D0,
41+
byte EEPROM_CE, byte EEPROM_OE, byte EEPROM_WE,
42+
byte 245_OE, byte 245_DIR);
43+
```
2844

45+
3. 28C256/X28256 without 74LVC245:
46+
```
2947
ParallelEEPROM eep(byte A14, byte A13, byte A12, byte A11, byte A10, byte A9, byte A8,
30-
byte A7, byte A6, byte A5, byte A4, byte A3, byte A2, byte A1, byte A0,
31-
byte D7, byte D6, byte D5, byte D4, byte D3, byte D2, byte D1, byte D0,
32-
byte EEPROM_CE, byte EEPROM_OE, byte EEPROM_WE,
33-
byte 245_OE, byte 245_DIR);
48+
byte A7, byte A6, byte A5, byte A4, byte A3, byte A2, byte A1, byte A0,
49+
byte D7, byte D6, byte D5, byte D4, byte D3, byte D2, byte D1, byte D0,
50+
byte EEPROM_CE, byte EEPROM_OE, byte EEPROM_WE);
51+
```
3452

35-
The constructor parameters are the pin numbers for the 15 address pins on the EEPROM, 8 data pins (B side) on the 74LVC245, control pins for the EEPROM (CE, OE, WE), and control pins for the 74LVC245 (OE and DIR). Note that the library assumes that the A side of the 74LVC245 is connected to the EEPROM, and the B side is connected to the MSP432.
53+
4. 28C16 without 74LVC245:
54+
```
55+
ParallelEEPROM eep(byte A10, byte A9, byte A8,
56+
byte A7, byte A6, byte A5, byte A4, byte A3, byte A2, byte A1, byte A0,
57+
byte D7, byte D6, byte D5, byte D4, byte D3, byte D2, byte D1, byte D0,
58+
byte EEPROM_CE, byte EEPROM_OE, byte EEPROM_WE);
59+
```
60+
61+
The constructor parameters are the pin numbers for up to 15 address pins on the EEPROM, 8 data pins 74LVC245 (B side) or directly connected to EEPROM, control pins for the EEPROM (CE, OE, WE), and control pins for the 74LVC245 (OE and DIR) if used. Note that the library assumes that the A side of the 74LVC245 is connected to the EEPROM, and the B side is connected to the MSP432.
3662

3763
Then **initialize** the object (typically within `setup()`):
3864

@@ -70,7 +96,6 @@ Each chip should have a 0.1 uF decoupling capacitor connected between Vcc and GN
7096

7197
When using a 74LVC245 or other transceiver, the library assumes that the A side of the 74LVC245 is connected to the EEPROM data lines, and the B side is connected to the microcontroller.
7298

73-
In order to support both 28C256 and 28C16, the programming hardware needs to account for slightly different pinouts between the chips. In particular, the 28C256/X28256 has 28 pins and the 28C16 has 24. Pin 26 is an address pin on the 28C256/X28256, which corresponds to Vcc pin 24 on the 28C16. The programming hardware therefore has a jumper at pin 26/24 so that A13 can be selected when using a 28 pin device, and Vcc can be selected when using a 24 pin device.
7499

75100
In other words, connect as follows:
76101
```
@@ -86,6 +111,8 @@ EEPROM Pin 74LVC245 Pin Chip Signal Name
86111
11 9 I/O0 <-> A8
87112
```
88113

114+
In order to support both 28C256 and 28C16, the programming hardware needs to account for slightly different pinouts between the chips. In particular, the 28C256/X28256 has 28 pins and the 28C16 has 24. Pin 26 is an address pin on the 28C256/X28256, which corresponds to Vcc pin 24 on the 28C16. The programming hardware therefore has a jumper at pin 26/24 so that A13 can be selected when using a 28 pin device, and Vcc can be selected when using a 24 pin device.
115+
89116
References
90117
---------------------
91118

0 commit comments

Comments
 (0)