paul@6 | 1 | The Am29F010-90PC product has been used to test the software and hardware
|
paul@6 | 2 | design described here.
|
paul@6 | 3 |
|
paul@17 | 4 | Device Compatibility
|
paul@17 | 5 | ====================
|
paul@17 | 6 |
|
paul@17 | 7 | For use with an Acorn Electron ROM cartridge or other board providing a ROM
|
paul@17 | 8 | socket, the compatibility of the Am29F010 needs to be assessed in the context
|
paul@17 | 9 | of the ROM sockets likely to be provided.
|
paul@17 | 10 |
|
paul@17 | 11 | Original ROM Pinout Am29F010 Pinout
|
paul@17 | 12 | ------------------- ---------------
|
paul@17 | 13 |
|
paul@17 | 14 | 1 \/ 32 VCC
|
paul@17 | 15 | A16 2 31 WE#
|
paul@17 | 16 | 1 \/ 28 VCC A15 3 30
|
paul@17 | 17 | A12 2 27 A14 A12 4 29 A14
|
paul@17 | 18 | A7 3 26 A13 A7 5 28 A13
|
paul@17 | 19 | A6 4 25 A8 A6 6 27 A8
|
paul@17 | 20 | A5 5 24 A9 A5 7 26 A9
|
paul@17 | 21 | A4 6 23 A11 A4 8 25 A11
|
paul@17 | 22 | A3 7 22 OE# A3 9 24 OE#
|
paul@17 | 23 | A2 8 21 A10 A2 10 23 A10
|
paul@17 | 24 | A1 9 20 CS# A1 11 22 CE#
|
paul@17 | 25 | A0 10 19 D7 A0 12 21 DQ7
|
paul@17 | 26 | D0 11 18 D6 DQ0 13 20 DQ6
|
paul@17 | 27 | D1 12 17 D5 DQ1 14 19 DQ5
|
paul@17 | 28 | D2 13 16 D4 DQ2 15 18 DQ4
|
paul@17 | 29 | GND 14 15 D3 GND/VSS 16 17 DQ3
|
paul@17 | 30 |
|
paul@17 | 31 | Superimposing the Am29F010 onto a ROM socket would provide compatibility for
|
paul@17 | 32 | all pins from A12 to GND/VSS and from A14 to D3/DQ3.
|
paul@17 | 33 |
|
paul@17 | 34 | Pin 1 in a ROM socket would correspond to A15 but is not necessarily
|
paul@17 | 35 | connected, nor, perhaps, is A14 since only 14 bits are required to address 16
|
paul@17 | 36 | kilobytes, although there may be 32 kilobyte sockets connecting A14 and using
|
paul@17 | 37 | 15 bits to address 32K.
|
paul@17 | 38 |
|
paul@17 | 39 | Pin 28 is a ROM socket would provide power, but the corresponding pin 30 on an
|
paul@17 | 40 | Am29F010 is not connected. Thus pin 30 would need routing to pin 32 for the
|
paul@17 | 41 | flash device socket.
|
paul@17 | 42 |
|
paul@17 | 43 | Pin 31 for the Am29F010 would need to be asserted. Thus pin 30 might also be
|
paul@17 | 44 | routed to pin 31, so that the device would remain read-only at all times.
|
paul@17 | 45 |
|
paul@0 | 46 | Pins
|
paul@0 | 47 | ====
|
paul@0 | 48 |
|
paul@0 | 49 | A0-A16 17-bit addressing
|
paul@0 | 50 | DQ0-DQ7 8-bit data transfer
|
paul@0 | 51 | CE# chip enable
|
paul@0 | 52 | OE# output enable
|
paul@0 | 53 | WE# write enable
|
paul@0 | 54 | VCC 5V
|
paul@0 | 55 | VSS ground
|
paul@0 | 56 | NC (not connected)
|
paul@0 | 57 |
|
paul@0 | 58 | Low-Level Operations
|
paul@0 | 59 | ====================
|
paul@0 | 60 |
|
paul@0 | 61 | CE# high standby
|
paul@0 | 62 | CE# low read, write or output disable
|
paul@0 | 63 |
|
paul@0 | 64 | OE# high, WE# high output disable
|
paul@0 | 65 | OE# low, WE# high read
|
paul@0 | 66 | OE# high, WE# low write
|
paul@0 | 67 |
|
paul@0 | 68 | Thus, for reading and writing:
|
paul@0 | 69 |
|
paul@0 | 70 | OE# = not WE#
|
paul@0 | 71 |
|
paul@0 | 72 | Timing
|
paul@0 | 73 | ======
|
paul@0 | 74 |
|
paul@0 | 75 | Addresses are latched on the falling edge of the latest of WE# and CE#
|
paul@0 | 76 | Data is latched on the rising edge of the latest of WE# and CE#
|
paul@0 | 77 |
|
paul@0 | 78 | Strategy:
|
paul@0 | 79 |
|
paul@0 | 80 | 1. Start with CE#, OE#, WE# high (standby, output disable)
|
paul@0 | 81 | 2. Bring CE# low (output disable)
|
paul@0 | 82 | 3. Set addresses
|
paul@0 | 83 | 4. Bring WE# or OE# low for operation (write or read)
|
paul@0 | 84 | 5. Read or write data
|
paul@0 | 85 | 6. Bring WE# or OE# high (output disable)
|
paul@0 | 86 |
|
paul@0 | 87 | Operation Modes
|
paul@0 | 88 | ===============
|
paul@0 | 89 |
|
paul@0 | 90 | By default, the device is in read mode, meaning that merely bringing OE# low
|
paul@0 | 91 | will produce data for the asserted address.
|
paul@0 | 92 |
|
paul@0 | 93 | To issue commands to change the mode involves write operations with specific
|
paul@0 | 94 | address and data arguments.
|
paul@0 | 95 |
|
paul@0 | 96 | Sectors
|
paul@0 | 97 | =======
|
paul@0 | 98 |
|
paul@6 | 99 | A[16...14] selects each 16KB sector and is referred to as the sector address
|
paul@6 | 100 | or SA in the documentation.
|
paul@0 | 101 |
|
paul@0 | 102 | Commands
|
paul@0 | 103 | ========
|
paul@0 | 104 |
|
paul@3 | 105 | Reset (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$F0)
|
paul@6 | 106 |
|
paul@6 | 107 | Autoselect (manufacturer) (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90);
|
paul@6 | 108 | (A=$X00; read)
|
paul@0 | 109 | => D=$01
|
paul@6 | 110 |
|
paul@6 | 111 | Autoselect (device) (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90);
|
paul@6 | 112 | (A=$X01; read)
|
paul@0 | 113 | => D=$20
|
paul@0 | 114 |
|
paul@6 | 115 | Simple reset (A=$XXXX; D=$F0)
|
paul@6 | 116 |
|
paul@6 | 117 | Sector erase (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$80);
|
paul@6 | 118 | (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=SA; D=$30)
|
paul@6 | 119 |
|
paul@6 | 120 | Program (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$A0);
|
paul@6 | 121 | (A=PA; D=PD)
|
paul@6 | 122 |
|
paul@6 | 123 | Progress
|
paul@6 | 124 | --------
|
paul@6 | 125 |
|
paul@6 | 126 | Programming and erasure commands employ data pins as follows:
|
paul@6 | 127 |
|
paul@6 | 128 | Programming Erasure
|
paul@6 | 129 | DQ7 On completion: DQ7-out On completion: 1
|
paul@6 | 130 | DQ6 During: toggling value During: toggling value
|
paul@6 | 131 | DQ5 On failure: 1 On failure: 1
|
paul@6 | 132 | DQ3 Sector erase begun: 1
|
paul@6 | 133 |
|
paul@6 | 134 | A read operation is required to obtain these outputs, typically with the same
|
paul@6 | 135 | address used to initiate each operation.
|
paul@0 | 136 |
|
paul@0 | 137 | Arduino Interfacing
|
paul@0 | 138 | ===================
|
paul@0 | 139 |
|
paul@0 | 140 | Arduino can employ at most 14 digital pins, whereas the Am29F010B requires 17
|
paul@0 | 141 | address pins, 8 data pins, plus 3 control pins to be utilised.
|
paul@0 | 142 |
|
paul@0 | 143 | One solution is to map the 3 control pins directly to the Arduino, then to
|
paul@0 | 144 | channel address and data via 8 common pins to latches, and then employ the
|
paul@0 | 145 | remaining pins to control the latches.
|
paul@0 | 146 |
|
paul@2 | 147 | Two pins can be used to select the latches, and when neither latch is
|
paul@2 | 148 | selected, the data pins will be used to read or write data from the flash
|
paul@2 | 149 | memory.
|
paul@0 | 150 |
|
paul@0 | 151 | As a result, only 13 pins are needed on the Arduino.
|
paul@0 | 152 |
|
paul@3 | 153 | Arduino 74HC273 #1 74HC273 #2 Am29F010
|
paul@3 | 154 | ------- ---------- ---------- --------
|
paul@5 | 155 | A5 CE#
|
paul@14 | 156 | A4 OE#
|
paul@14 | 157 | A3 WE#
|
paul@14 | 158 | 2 CP
|
paul@14 | 159 | 3 CP
|
paul@17 | 160 | 4 D0 D0 DQ0
|
paul@17 | 161 | 5 D1 D1 DQ1
|
paul@17 | 162 | 6 D2 D2 DQ2
|
paul@17 | 163 | 7 D3 D3 DQ3
|
paul@17 | 164 | 8 D4 D4 DQ4
|
paul@17 | 165 | 9 D5 D5 DQ5
|
paul@17 | 166 | 10 D6 D6 DQ6
|
paul@17 | 167 | 11 D7 D7 DQ7
|
paul@2 | 168 | Q0 A0
|
paul@2 | 169 | Q1 A1
|
paul@2 | 170 | Q2 A2
|
paul@2 | 171 | Q3 A3
|
paul@2 | 172 | Q4 A4
|
paul@2 | 173 | Q5 A5
|
paul@2 | 174 | Q6 A6
|
paul@2 | 175 | Q7 A7
|
paul@2 | 176 | Q0 A8
|
paul@2 | 177 | Q1 A9
|
paul@2 | 178 | Q2 A10
|
paul@2 | 179 | Q3 A11
|
paul@2 | 180 | Q4 A12
|
paul@2 | 181 | Q5 A13
|
paul@2 | 182 | Q6 A14
|
paul@2 | 183 | Q7 A15
|
paul@2 | 184 | GND A16 (not used)
|
paul@17 | 185 | 5V MR# MR#
|
paul@2 | 186 | 5V VCC VCC VCC
|
paul@2 | 187 | GND GND GND VSS
|
paul@0 | 188 |
|
paul@0 | 189 | Set Address
|
paul@0 | 190 | -----------
|
paul@0 | 191 |
|
paul@2 | 192 | 74HC273 #1 CP = 1; 74HC273 #2 CP = 0
|
paul@2 | 193 | 74HC273 #1 D[7...0] = A[7...0]
|
paul@2 | 194 | 74HC273 #1 CP = 0; 74HC273 #2 CP = 1
|
paul@2 | 195 | 74HC273 #2 D[7...0] = A[15...8]
|
paul@0 | 196 |
|
paul@0 | 197 | Write Data
|
paul@0 | 198 | ----------
|
paul@0 | 199 |
|
paul@0 | 200 | Configure pins as D[7...0]
|
paul@2 | 201 | WE# = 0
|
paul@2 | 202 | 74HC273 #1 CP = 0; 74HC273 #2 CP = 0
|
paul@2 | 203 | 74HC273 #3 D[7...0] = D[7...0]
|
paul@2 | 204 | WE# = 1
|
paul@0 | 205 |
|
paul@0 | 206 | Read Data
|
paul@0 | 207 | ---------
|
paul@0 | 208 |
|
paul@0 | 209 | Configure pins as Q[7...0]
|
paul@2 | 210 | OE# = 0
|
paul@2 | 211 | 74HC273 #1 CP = 1; 74HC273 #2 CP = 0
|
paul@2 | 212 | Q[7...0] = 74HC273 #0 Q[7...0]
|
paul@2 | 213 | OE# = 1
|