ArduinoAm29F010

README.txt

14:df3b4c8c3fe5
2015-01-20 Paul Boddie Changed pin usage to avoid potential problems with pin 13.
     1 The Am29F010-90PC product has been used to test the software and hardware
     2 design described here.
     3 
     4 Pins
     5 ====
     6 
     7 A0-A16      17-bit addressing
     8 DQ0-DQ7     8-bit data transfer
     9 CE#         chip enable
    10 OE#         output enable
    11 WE#         write enable
    12 VCC         5V
    13 VSS         ground
    14 NC          (not connected)
    15 
    16 Low-Level Operations
    17 ====================
    18 
    19 CE# high            standby
    20 CE# low             read, write or output disable
    21 
    22 OE# high, WE# high  output disable
    23 OE# low, WE# high   read
    24 OE# high, WE# low   write
    25 
    26 Thus, for reading and writing:
    27 
    28 OE# = not WE#
    29 
    30 Timing
    31 ======
    32 
    33 Addresses are latched on the falling edge of the latest of WE# and CE#
    34 Data is latched on the rising edge of the latest of WE# and CE#
    35 
    36 Strategy:
    37 
    38  1. Start with CE#, OE#, WE# high       (standby, output disable)
    39  2. Bring CE# low                       (output disable)
    40  3. Set addresses
    41  4. Bring WE# or OE# low for operation  (write or read)
    42  5. Read or write data
    43  6. Bring WE# or OE# high               (output disable)
    44 
    45 Operation Modes
    46 ===============
    47 
    48 By default, the device is in read mode, meaning that merely bringing OE# low
    49 will produce data for the asserted address.
    50 
    51 To issue commands to change the mode involves write operations with specific
    52 address and data arguments.
    53 
    54 Sectors
    55 =======
    56 
    57 A[16...14] selects each 16KB sector and is referred to as the sector address
    58 or SA in the documentation.
    59 
    60 Commands
    61 ========
    62 
    63 Reset                       (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$F0)
    64 
    65 Autoselect (manufacturer)   (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90);
    66                             (A=$X00; read)
    67                             => D=$01
    68 
    69 Autoselect (device)         (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90);
    70                             (A=$X01; read)
    71                             => D=$20
    72 
    73 Simple reset                (A=$XXXX; D=$F0)
    74 
    75 Sector erase                (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$80);
    76                             (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=SA; D=$30)
    77 
    78 Program                     (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$A0);
    79                             (A=PA; D=PD)
    80 
    81 Progress
    82 --------
    83 
    84 Programming and erasure commands employ data pins as follows:
    85 
    86         Programming                         Erasure
    87 DQ7     On completion: DQ7-out              On completion: 1
    88 DQ6     During: toggling value              During: toggling value
    89 DQ5     On failure: 1                       On failure: 1
    90 DQ3                                         Sector erase begun: 1
    91 
    92 A read operation is required to obtain these outputs, typically with the same
    93 address used to initiate each operation.
    94 
    95 Arduino Interfacing
    96 ===================
    97 
    98 Arduino can employ at most 14 digital pins, whereas the Am29F010B requires 17
    99 address pins, 8 data pins, plus 3 control pins to be utilised.
   100 
   101 One solution is to map the 3 control pins directly to the Arduino, then to
   102 channel address and data via 8 common pins to latches, and then employ the
   103 remaining pins to control the latches.
   104 
   105 Two pins can be used to select the latches, and when neither latch is
   106 selected, the data pins will be used to read or write data from the flash
   107 memory.
   108 
   109 As a result, only 13 pins are needed on the Arduino.
   110 
   111 Arduino     74HC273 #1  74HC273 #2  Am29F010
   112 -------     ----------  ----------  --------
   113 A5                                  CE#
   114 A4                                  OE#
   115 A3                                  WE#
   116 2           CP
   117 3                       CP
   118 4           D0 (*)      D0 (*)      DQ0
   119 5           D1 (*)      D1 (*)      DQ1
   120 6           D2 (*)      D2 (*)      DQ2
   121 7           D3 (*)      D3 (*)      DQ3
   122 8           D4 (*)      D4 (*)      DQ4
   123 9           D5 (*)      D5 (*)      DQ5
   124 10          D6 (*)      D6 (*)      DQ6
   125 11          D7 (*)      D7 (*)      DQ7
   126             Q0                      A0
   127             Q1                      A1
   128             Q2                      A2
   129             Q3                      A3
   130             Q4                      A4
   131             Q5                      A5
   132             Q6                      A6
   133             Q7                      A7
   134                         Q0          A8
   135                         Q1          A9
   136                         Q2          A10
   137                         Q3          A11
   138                         Q4          A12
   139                         Q5          A13
   140                         Q6          A14
   141                         Q7          A15
   142 GND                                 A16 (not used)
   143 5V          MR# (**)    MR# (**)
   144 5V          VCC         VCC         VCC
   145 GND         GND         GND         VSS
   146 
   147 (*) Apply pull-down resistor to 74HC273 D inputs when driving using switches.
   148 (**) Apply pull-up resistor to 74HC273 MR# inputs to preserve state.
   149 
   150 74HC273 Q outputs may initially be high and should be reset, either driving
   151 MR# low or by explicitly latching values onto each device.
   152 
   153 Set Address
   154 -----------
   155 
   156 74HC273 #1 CP = 1; 74HC273 #2 CP = 0
   157 74HC273 #1 D[7...0] = A[7...0]
   158 74HC273 #1 CP = 0; 74HC273 #2 CP = 1
   159 74HC273 #2 D[7...0] = A[15...8]
   160 
   161 Write Data
   162 ----------
   163 
   164 Configure pins as D[7...0]
   165 WE# = 0
   166 74HC273 #1 CP = 0; 74HC273 #2 CP = 0
   167 74HC273 #3 D[7...0] = D[7...0]
   168 WE# = 1
   169 
   170 Read Data
   171 ---------
   172 
   173 Configure pins as Q[7...0]
   174 OE# = 0
   175 74HC273 #1 CP = 1; 74HC273 #2 CP = 0
   176 Q[7...0] = 74HC273 #0 Q[7...0]
   177 OE# = 1