# HG changeset patch # User Paul Boddie # Date 1421537875 -3600 # Node ID 1b3978439bdb120fe0b13bf43108a0e63b2d7edb An initial design using four 74HC273 ICs: three for output, one for input. diff -r 000000000000 -r 1b3978439bdb README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.txt Sun Jan 18 00:37:55 2015 +0100 @@ -0,0 +1,182 @@ +Pins +==== + +A0-A16 17-bit addressing +DQ0-DQ7 8-bit data transfer +CE# chip enable +OE# output enable +WE# write enable +VCC 5V +VSS ground +NC (not connected) + +Low-Level Operations +==================== + +CE# high standby +CE# low read, write or output disable + +OE# high, WE# high output disable +OE# low, WE# high read +OE# high, WE# low write + +Thus, for reading and writing: + +OE# = not WE# + +Timing +====== + +Addresses are latched on the falling edge of the latest of WE# and CE# +Data is latched on the rising edge of the latest of WE# and CE# + +Strategy: + + 1. Start with CE#, OE#, WE# high (standby, output disable) + 2. Bring CE# low (output disable) + 3. Set addresses + 4. Bring WE# or OE# low for operation (write or read) + 5. Read or write data + 6. Bring WE# or OE# high (output disable) + +Operation Modes +=============== + +By default, the device is in read mode, meaning that merely bringing OE# low +will produce data for the asserted address. + +To issue commands to change the mode involves write operations with specific +address and data arguments. + +Sectors +======= + +A[16...14] selects each 16KB sector. + +Commands +======== + +Reset (A=$555; D=$AA); (A=$2AA; D=$55); (A=$555; D=$F0) +Autoselect (manufacturer) (A=$555; D=$AA); (A=$2AA; D=$55); (A=$555; D=$90); (A=$X00; D=$XX) + => D=$01 +Autoselect (device) (A=$555; D=$AA); (A=$2AA; D=$55); (A=$555; D=$90); (A=$X01; D=$XX) + => D=$20 + +Simple reset (A=$XXX; D=$F0) + +Arduino Interfacing +=================== + +Arduino can employ at most 14 digital pins, whereas the Am29F010B requires 17 +address pins, 8 data pins, plus 3 control pins to be utilised. + +One solution is to map the 3 control pins directly to the Arduino, then to +channel address and data via 8 common pins to latches, and then employ the +remaining pins to control the latches. + +Two pins can be used to select the latches: + +Pin A Pin B Latch select +----- ----- ------------ +0 0 0 +0 1 1 +1 0 2 +1 1 3 + +Thus, the following logic is required: + +CP (latch 1) = ~A & B +CP (latch 2) = A & ~B +CP (latch 3) = A & B +CP (latch 0) = ~A & ~B + +Selector (in) 74HC04 (NOT) 74HC08 (AND) Selector (out) +------------- ------------ ------------ -------------- +A 1A (*) + 1Y 1A 4A +B 1B (*) + 1Y LS1 +A 2A (*) +B 2A (*) + 2Y 2B 4B + 2Y LS2 +A 3A (*) +B 3B (*) + 3Y LS3 + 4Y LS0 + +(*) Apply pull-down resistor to 74HC04 1A, 2A, 3A, 3B when driving using switches. + +As a result, only 13 pins are needed on the Arduino. + +Arduino Selector 74HC273 #1 74HC273 #2 74HC273 #3 74HC273 #0 Am29F010B +------- -------- ---------- ---------- ---------- ---------- --------- +1 CE# +2 OE# +3 WE# +4 A +5 B + LS1 CP + LS2 CP + LS3 CP + LS0 CP +6 D0 (*) D0 (*) D0 (*) Q0 +7 D1 (*) D1 (*) D1 (*) Q1 +8 D2 (*) D2 (*) D2 (*) Q2 +9 D3 (*) D3 (*) D3 (*) Q3 +10 D4 (*) D4 (*) D4 (*) Q4 +11 D5 (*) D5 (*) D5 (*) Q5 +12 D6 (*) D6 (*) D6 (*) Q6 +13 D7 (*) D7 (*) D7 (*) Q7 + Q0 A0 + Q1 A1 + Q2 A2 + Q3 A3 + Q4 A4 + Q5 A5 + Q6 A6 + Q7 A7 + Q0 A8 + Q1 A9 + Q2 A10 + Q3 A11 + Q4 A12 + Q5 A13 + Q6 A14 + Q7 A15 +GND A16 (not used) + Q0 D0 (*) DQ0 + Q1 D1 (*) DQ1 + Q2 D2 (*) DQ2 + Q3 D3 (*) DQ3 + Q4 D4 (*) DQ4 + Q5 D5 (*) DQ5 + Q6 D6 (*) DQ6 + Q7 D7 (*) DQ7 +5V MR# (**) MR# (**) MR# (**) MR# (**) +5V VCC VCC VCC VCC VCC +GND VSS + +(*) Apply pull-down resistor to 74HC273 D inputs when driving using switches. +(**) Apply pull-up resistor to 74HC273 MR# inputs to preserve state. + +74HC273 Q outputs may initially be high and should be reset, either driving +MR# low or by explicitly latching values onto each device. + +Set Address +----------- + +Selector A = 0; Selector B = 1; 74HC273 #1 D[7...0] = A[7...0] +Selector A = 1; Selector B = 0; 74HC273 #2 D[7...0] = A[15...8] + +Write Data +---------- + +Configure pins as D[7...0] +Selector A = 1; Selector B = 1; 74HC273 #3 D[7...0] = D[7...0] + +Read Data +--------- + +Configure pins as Q[7...0] +Selector A = 0; Selector B = 0; Q[7...0] = 74HC273 #0 Q[7...0]