Flash programmer
in Propeller 1
HEi,
I was wondering if anyone attempted to build a Flash programmer (Parallel Flash/EPROM/EEPROM) using the propeller. For some other projects I would like to program some 29F010s. The Prop has not enough RAM but who cares ? Flashing say 16 kBytes per round would be tolerable for some low-volume flashing
.
The question is... If I use the serial port with some FullDuplex Serial and send say a ihex file, will be spin able to keep up ? (155 kBaud) or I'D have to go down to say 9600... dumb question, I don't think does it really matters....
I was wondering if anyone attempted to build a Flash programmer (Parallel Flash/EPROM/EEPROM) using the propeller. For some other projects I would like to program some 29F010s. The Prop has not enough RAM but who cares ? Flashing say 16 kBytes per round would be tolerable for some low-volume flashing
The question is... If I use the serial port with some FullDuplex Serial and send say a ihex file, will be spin able to keep up ? (155 kBaud) or I'D have to go down to say 9600... dumb question, I don't think does it really matters....

Comments
I'ts possible. I used it to read and program 2716 and 2732 eproms. Probably easier to do for more modern chips than for the oldies that need high voltages for programming. For larger memories you may want to look at using qspi ram chips. Prop downloads the data, stores it in qspi ram, provides address bits to eprom, and steps through qspi ram.
Tachyon has the speed and everything in place to do this fairly easily as I am very familiar with programming these devices from back in their day. You could download an Intel Hex file at 2M baud if you wanted or better still, just FTP it or transfer it across on an SD card. To save I/O lines I would just use shift registers for the address lines as these can be updated at a very high rate, especially if you have one for the lower 8-bits that has its own clock and another for all the higher bits although it isn't really necessary either. The SPIWR operation is only a single byte opcode and takes 2.6us for 8-bits.
Here the circuit I'm going to use.
The address bus could be driven directly from I/O as well so that even with 19 bits of address, 8 of data, and 3 control lines that will still fit if you use the I2C lines for address lines. When you access the EEPROM the state of the address won't matter. So if you do it this way you just need 8 resistors in addition to the basic Prop circuit.
The datasheet for the 27C256 indcates TTL level compatibility as Vih is 2V, so no need for level shifters.
As for the console I sometimes just dedicate another Prop for that due to lack of I/O on the main Prop. Just tie your serial comms across so my original suggestion would work fine. You could even slave the programmer Prop from the console Prop if you wanted. Then again serial bluetooth to a phone/tablet is a very handy console.
CON CNT_OE = 1 << 18 CNT_WE = 1 << 21 CNT_CE = 1 << 19 CNT_OE_245 = 1 << 20 CNT_ALE_573 = 1 << 16 CNT_DIR_245 = 1 << 17 CNT_A16 = 1 << 22 A16_SHIFT = 22-16 ' shift amount from original A16 to the pin where A16 is output DAT { Assembler programming driver Supported Flash Memories Winbond W29C020 --------------- Programming: Pages of 128 bytes, start download with [5555] = AA [2AAA] = 55 [5555] = A0 then write 128 bytes to page A7..A17 and wait 10 ms Write data: Set Addresses A8..A18 Latch driving ALE_573 high and then low Set Addresses A0..A7 } org 0 { command processing code still missing } flash_seq ' sets the address ' P0..P7 are set as inputs ' P8..P24 are always outputs ' ' Output status ' ' OE_245 = 1 ' CE = 1 ' WE = 1 ' OE = 1 ' DIR_245 = 1 (Write Flash) ' ALE_573 = 0 ' A0..A18 set flashaddr ' D0..D7 (inputs) flash_addr_set mov temp, flashaddr and temp, addr_mask_8_15 or temp, PIN_STBY mov OUTA, temp or OUTA, PIN_ALE_573 nop andn OUTA, PIN_ALE_573 ' latch A8..A15 mov temp, flashaddr and temp, #$ff mov temp2, flashaddr and temp2, addr_mask_16_18 shl temp2, A16_SHIFT or temp, temp2 or temp, STBY mov OUTA, temp flash_addr_set_ret ret flash_read_byte call flash_addr_set andn DIRA, #255 ' set D0..D7 to inputs andn OUTA, PIN_245_READ ' set 245 to READ (B -> A) and OE andn OUTA, PIN_READ rdlong temp, #0 rdlong temp, #0 mov flashdata, INA or OUTA, PIN_READ ' 16*12,5+7..21*12,5, also for slow memory and flashdata, #$ff or OUTA, PIN_245_READ ' set to write flash_read_byte_ret ret flash_write_byte call flash_addr_set or DIRA, #255 or OUTA, PIN_DIR_245 ' set 245 to WRITE (B -> A) and OE andn OUTA, PIN_245_WRITE and flashdata, #255 or OUTA, flashdata ' sets output Data BUS andn OUTA, PIN_WRITE rdlong temp, #0 rdlong temp, #0 or OUTA, PIN_WRITE ' 16*12,5+7..21*12,5, also for slow memory or OUTA, PIN_245_READ ' set to write, OE = 1 andn DIRA, #255 ' set D0..D7 to inputs flash_read_byte_ret ret temp long 0 temp2 long 0 curraddr long 0 pgmaddr long 0 pgmcmd long 0 pgmstatus long 0 pgmstatus2 long 0 pgmbuffptr long 0 flashaddr long 0 flashdata long 0 addr_mask_8_15 long $00_00_ff_00 addr_mask_16_18 long $00_07_00_00 PIN_ALE_573 long CNT_ALE_573 PIN_OE_245 long CNT_OE_245 PIN_DIR_245 long CNT_DIR_245 PIN_OE long CNT_OE PIN_WE long CNT_WE PIN_CE long CNT_CE PIN_STBY long CNT_CE | CNT_OE | CNT_WE | CNT_OE_245 | CNT_DIR_245 PIN_READ long CNT_CE | CNT_OE PIN_WRITE long CNT_CE | CNT_WE PIN_245_READ long CNT_OE_245 | CNT_DIR_245 ' both low for reading flash PIN_245_WRITE long CNT_OE_245 | 255 ' used to set data bus