# HG changeset patch # User Paul Boddie # Date 1425859419 -3600 # Node ID d6482c4f3bb2645ef2b2baf7fb3da554ff68027d # Parent 8aa064652f2c152c749c58a466c8d225ccbd4106 Added software notes, Dual ROM Adaptor wiring details, and moved the Arduino interfacing details above the general technical notes. diff -r 8aa064652f2c -r d6482c4f3bb2 README.txt --- a/README.txt Mon Mar 09 01:02:53 2015 +0100 +++ b/README.txt Mon Mar 09 01:03:39 2015 +0100 @@ -1,6 +1,68 @@ The Am29F010-90PC product has been used to test the software and hardware design described here. +Using the Software +================== + +First of all, to use the Arduino-based programming solution, the Arduino needs +to have a program transferred to it. The program is compiled using the +Makefile provided, using the simple command... + +make + +To upload the program, the "upload" target is used as follows: + +make upload + +It is likely that this will fail unless appropriate permissions are available +on the device through which the Arduino is accessed on the host machine. Thus, +a privileged invocation is likely to be necessary: + +sudo make upload + +With the program uploaded, it should now be possible to communicate with the +Arduino. Unless the programming circuit has been constructed, however, there +will not be any effect of communicating with the Arduino, other than to check +that the program is operational. Running the upload.py script as follows will +permit such a test: + +./upload.py -i + +Again, it is likely that this will need to be run in a privileged fashion as +follows: + +sudo ./upload.py -i + +The script should act as a terminal, showing a ">" prompt that can accept +various commands. Merely getting the prompt should be enough of an indication +that the program is functioning on the device. + +Once the programming circuit has been constructed (see "Arduino Interfacing" +below), the upload.py script can be used to upload data to the Am29F010 +device. For example: + +sudo ./upload.py jungle.rom + +This will take jungle.rom and write it to the first sector of the Am29F010. To +verify the operation, the following command can be used: + +sudo ./upload.py -v jungle.rom + +To write to other sectors, an option can be specified. For example: + +sudo ./upload.py -s 1 junglecode.rom + +Again, the operation can be verified as follows: + +sudo ./upload.py -s 1 -v junglecode.rom + +Note that the -s option must appear first. + +The upload.py script can accept multiple files and will write each of them to +consecutive sectors. However, it can be more prudent to write files +individually, especially if the circuit is behaving in a less than completely +reliable fashion. + Device Compatibility ==================== @@ -76,102 +138,47 @@ Am29F010 CE# = ROM #1 CS# AND ROM #2 CS# +Wiring Details +-------------- + ROM #1 ROM #2 74HC08 Am29F010 ------ ------ ------ -------- CS# 1A A14 CS# 1B 1Y CE# - -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 -=============== +OE# OE# -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 and is referred to as the sector address -or SA in the documentation. - -Commands -======== - -Reset (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$F0) - -Autoselect (manufacturer) (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90); - (A=$X00; read) - => D=$01 - -Autoselect (device) (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90); - (A=$X01; read) - => D=$20 - -Simple reset (A=$XXXX; D=$F0) - -Sector erase (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$80); - (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=SA; D=$30) - -Program (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$A0); - (A=PA; D=PD) - -Progress --------- - -Programming and erasure commands employ data pins as follows: - - Programming Erasure -DQ7 On completion: DQ7-out On completion: 1 -DQ6 During: toggling value During: toggling value -DQ5 On failure: 1 On failure: 1 -DQ3 Sector erase begun: 1 - -A read operation is required to obtain these outputs, typically with the same -address used to initiate each operation. +ROM (Common) 74HC08 Am29F010 +------------ ------ -------- +VCC VCC +GND GND +VCC VCC +VCC WE# +D0 DQ0 +D1 DQ1 +D2 DQ2 +D3 DQ3 +D4 DQ4 +D5 DQ5 +D6 DQ6 +D7 DQ7 +A0 A0 +A1 A1 +A2 A2 +A3 A3 +A4 A4 +A5 A5 +A6 A6 +A7 A7 +A8 A8 +A9 A9 +A10 A10 +A11 A11 +A12 A12 +A13 A13 +GND A15 +GND A16 +GND GND Arduino Interfacing =================== @@ -264,3 +271,95 @@ 74HC273 #1 CP = 1; 74HC273 #2 CP = 0 Q[7...0] = 74HC273 #0 Q[7...0] OE# = 1 + +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 +====== + +According to the datasheet, 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 and is referred to as the sector address +or SA in the documentation. + +Commands +======== + +Reset (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$F0) + +Autoselect (manufacturer) (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90); + (A=$X00; read) + => D=$01 + +Autoselect (device) (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$90); + (A=$X01; read) + => D=$20 + +Simple reset (A=$XXXX; D=$F0) + +Sector erase (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$80); + (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=SA; D=$30) + +Program (A=$5555; D=$AA); (A=$2AAA; D=$55); (A=$5555; D=$A0); + (A=PA; D=PD) + +Progress +-------- + +Programming and erasure commands employ data pins as follows: + + Programming Erasure +DQ7 On completion: DQ7-out On completion: 1 +DQ6 During: toggling value During: toggling value +DQ5 On failure: 1 On failure: 1 +DQ3 Sector erase begun: 1 + +A read operation is required to obtain these outputs, typically with the same +address used to initiate each operation.