3.1 Command Format

All commands have a common format consisting of four bytes. The first byte contains the command code, selecting operation and target memory. The second and third byte contain the address of the selected memory area. The fourth byte contains the data, going in either direction.

The data returned from the target is usually the data sent in the previous byte. The table below shows an example, where two consecutive commands are sent to the target. Notice how all bytes returned equal the bytes just received. Some commands return one byte from the target’s memory. This byte is always returned in the last byte (byte 4). Data is always sent on MOSI and MISO lines with the most significant bit (MSB) first.

For details on available instructions, refer to the Serial Programming section of the datasheet.