What is the FX Chip?

Hopefully this thread will help clear up some facts for people.
(And hopefully I’ll actually get this right. Dammit Jim, I’m a programmer, not a hardware junkie.)

What is the FX chip?

The FX chip is an external memory chip containing a kind of memory called flash memory.
This is the same kind of memory used by progmem, which means that it’s relatively straightforward to read, but writing to it has some caveats.

How does flash memory work?

Flash memory is not written to in the same way that RAM is written to.
It is divided into ‘pages’ which are blocks of bytes.
It is not possible to simply overwrite a single byte, instead an entire block of memory (called a ‘page’) must first be erased, and then written to.
When a page is erased, all the bits are set to 1.
(This is contrary to what most people would expect - people often assume that ‘erasing’ a bit sets it to 0.)
When the page is then written to after being erased, only the bits that need to set to 0 are actually written.

So essentially, you can think of flash memory as obeying the following rules:

  • You may transform any 1 bit to a 0 bit.
  • To transform a 0 bit to a 1 bit, you must erase an entire page of data.

The pages used by the FX chip are 256 bytes in size,
in contrast to the Arduboy’s progmem, which has 128 byte pages.

How does the Arduboy FX communicate with the FX Chip?

The Arduboy FX communicates with this chip over an SPI connection, which is the same kind of connection that the Arduboy uses to communicate with the screen, so it is a relatively fast connection.

Instead of trying to explain SPI myself,
I’m going to link to a very good Sparkfun article on the subject:

https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi/all

6 Likes

YAY! I am excited about this!

1 Like