[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Instruction formats are specified as a comma separated list of string values containing information (bit specifiers) about each of the 32 bits of the instruction. Bit specifiers may be one of the following formats:
1
The bit is always set on input as well as output
0
The bit is always clear on input as well as output
x
The bit is ignored on input and output
a
The bit is an address bit, the bit-number matches this bit specifier’s position within the current instruction byte
aN
The bit is the Nth address bit, bit-number = N, i.e., a12
is address bit 12 on input, a0
is address bit 0.
i
The bit is an input data bit; as with a
bits an input data bit can
optionally be followed by a bit number, here between 0 and 7, if the bit
needs to be moved to a different position in the SPI write command byte
than it appears in memory.
o
The bit is an output data bit; as with i
bits an output data bit
can optionally be followed by a bit number; this is useful in case the
part’s SPI read command places a particular bit into a different position
than the write command put it, e.g., ATtiny22L or AT90S8535 lock bits.
Each instruction must be composed of 32 bit specifiers. The instruction specification closely follows the instruction data provided in Atmel’s data sheets for their parts. For example, the EEPROM read and write instruction for an AT90S2313 AVR part could be encoded as:
read = "1 0 1 0 0 0 0 0 x x x x x x x x", "x a6 a5 a4 a3 a2 a1 a0 o o o o o o o o"; write = "1 1 0 0 0 0 0 0 x x x x x x x x", "x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i"; |
As the address bit numbers in the SPI opcodes are highly systematic, they
don’t really need to be specified. A compact version of the format
specification neither uses bit-numbers for address lines nor spaces. If such
a string is longer than 7 characters, then the characters 0
, 1
,
x
, a
, i
and o
will be recognised as the
corresponding bit, whilst any of the characters .
, -
, _
or /
can act as arbitrary visual separators, which are ignored.
Examples:
loadpage_lo = "0100.0000--000x.xxxx--xxaa.aaaa--iiii.iiii"; loadpage_lo = "0100.0000", "000x.xxxx", "xxaa.aaaa", "iiii.iiii"; |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on February 8, 2024 using texi2html 1.82.