Thursday, March 17, 2022

Will install a 29F400 flash chip on a breakout board and attempt to program it with an Arduino Mega 2560

29F400 FLASH CHIP VERSUS ORIGINAL DESIGN PART

The IOB6120 was designed around a 28F400 chip, which is a 4Mbit flash chip that can operate in either byte or 16 bit word mode. These chips are extremely rare and can only be sourced from somewhat suspect sites or eBay, but the 29F400 is pin compatible and almost functionally compatible. 

The differences are only in the sequences to erase or write, while reading contents operates exactly the same between the two chips. This means that if I can write the contents to the flash chip, it can then be soldered onto the IOB board and will support its normal operation. What will NOT work is writing to the flash, using the FL (flash load) command since that is designed around the 28F400 protocols. 

USING BREAKOUT BOARD TO DEAL WITH SURFACE MOUNT FLASH CHIP

To write to the chip while it is off the IOB board would normally require a PCB with TSOP-48 pads since this is a surface mount device. I want to avoid the delay of designing and sending a board out to be fabbed simply to load the flash contents. I therefore found a breakout/adapter board which has the TSOP-48 pads on the top and is set up as a DIP-48 on the bottom, suitable to install into a breadboard. 

I can use a breadboard, with this setup, to provide the signals and voltages to the chip, get it programmed and then, using the hot air tool, remove it from the breakout board. The removed chip can be soldered onto the IOB6120 board and it should then work perfectly. 

PROGRAMMING THE FLASH CHIP IS A SEQUENCE OF BLOCK ERASE AND WRITES

In a flash chip, you have to do an erase of an entire block, setting the contents to xFF, then write to each location in the block in order to load your data. One challenge when switching between flash chips is varying block sizes. The 29F00 has a 16K block, two 8K blocks, a 32K block, then the rest in ascending addresses are all 64KB. The 28F00 has the first eight blocks 8K bytes in size, with the remainder in ascending order all 64KB. 

Thus, if you programmed for the 28F400, you would erase the block at address zero, thinking it would erase the bottom 8K, write those bytes, then erase the block starting at address 8K, write the next set of bytes, and so forth. If you did this to the 29F400, after writing the first 8K, when you issued a block erase for address 8K you would wipe out the entire first 16K, including the words you had just finished writing. 

Thus the programming difference for writing to the chips has to take into account the block structure and decide when it has to issue block erase commands to the flash. The FL command, as written, will only work with the block structure of the 28F400 chip and will not give proper data loading on the alternate chip. 

The solutions include rewriting the FL command and rebuilding the ROMs for the SBC6120 computer, but also there is a minimally invasive method where the chip is written outboard, prior to soldering onto the IOB PCB. 

SETTING UP MEGA 2560 TO CONTROL ADDRESS, DATA AND CONTROL LINES

The Arduino Mega has 51 digital pins, sufficient to drive the 8 data lines, 5 control lines and 19 address lines for programming this chip. The programming sequences dictated the order in which signals are set, the minimum time they must be stable, and the timing between control signals. Knowing the speed of execution of the Mega processor I can ensure that delays, hold times and the like are satisfied. 

ALMOST EVERYTHING IS READY EXCEPT THE BREAKOUT/ADAPTER BOARD

I have the 29F400 chips in hand and the Arduino Mega 2560. This, however, depends on the TSOP-48 to DIP 48 Breakout/Adapter part that has not arrived yet. With my visitors coming I expect to have the adapter board but not be able to work further on the project for a number of days. 

No comments:

Post a Comment