You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-11Lines changed: 38 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,15 @@ ParallelEEPROM Library
3
3
4
4
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.
5
5
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.
7
7
8
8
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.
9
9
10
10
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.
11
11
12
12
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.
13
13
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.
17
15
18
16
Usage
19
17
-----
@@ -24,15 +22,43 @@ First, **include** the library header file:
24
22
25
23
#include <ParallelEEPROM.h>
26
24
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:
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.
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.
36
62
37
63
Then **initialize** the object (typically within `setup()`):
38
64
@@ -70,7 +96,6 @@ Each chip should have a 0.1 uF decoupling capacitor connected between Vcc and GN
70
96
71
97
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.
72
98
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.
74
99
75
100
In other words, connect as follows:
76
101
```
@@ -86,6 +111,8 @@ EEPROM Pin 74LVC245 Pin Chip Signal Name
86
111
11 9 I/O0 <-> A8
87
112
```
88
113
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.
0 commit comments