Specifications
160
3706C–MICRO–2/11
AT89LP3240/6440
Figure 25-3. AT89LP6440 Memory Organization
25.3 Command Format
Programming commands consist of an opcode byte, two address bytes, and zero or more data
bytes. In addition, all command packets must start with a two-byte preamble of AAH and 55H.
The preamble increases the noise immunity of the programming interface by making it more dif-
ficult to issue unintentiona l commands. Figure 25-4 on page 161 shows
a simplified flow chart of
a command sequence.
A sample command packet is shown in Figure 25-5 on page 161. The SS
pin defines the packet
frame. SS
must be brought low before the first byte in a command is sent and brought back high
after the final byte in the command has been sent. The command is not complete until SS
returns high. Command bytes are issued serially on MOSI. Data output bytes are received seri-
ally on MISO. Packets of variable length are supported by returning SS
high when the final
required byte has been transmitted. In some cases command bytes have a don’t care value.
Don’t care bytes in the middle of a packet must be transmitted. Don’t care bytes at the end of a
packet may be ignored.
Page oriented instructions always include a full 16-bit address. The higher order b
its select the
page and the lower order bits select the byte within that page. The AT89LP3240/6440 allocates
6 b its for byte address, 1 bit for low/high half page selection and 9 bits for pa ge address. The
half page to be accessed is always fixed by the page address and half select as transmitted. The
byte
address specifies the starting address for the first data byte. After each data byte has been
transmitted, the byte address is incremented to point to the next data byte. This allows a page
command to linearly sweep the bytes within a page. If the byte address is incremented past the
last byte in the half page, the byte
address will roll over to the first byte in the same half page.
While loading bytes into the page buffer, overwriting previously loaded bytes will result in data
corruption.
Page 511 Low
Page 510 Low
User Fuse Row
User Signature Array
Atmel Signature Array
Code Memory
00 3F
0000
FFFF
Page 0 Low
1000
3FFF
Data Memory
Page 511 High
Page 510 High
40 7F
Page 63 High
Page 63 Low
Page 0 Low
Page 0 Low
Page 1 Low
Page 0 High
Page 1 High
Page 0 Low
Page 1 Low
Page 0 Low
Page 1 High
Page 1 High
Page 0 High
Page 0 High
00 3F
Page Buffer