Datasheet
AVR068
11
2591C-AVR-06/06
5.2.4.1 Mode byte description
The mode parameter is essential for how this command works. The bits in the mode
byte have the following meanings:
Table 5-23. The bits in the mode byte
Bit # Description Mode
0 Word/Page Mode (0 = word, 1 = page)
1 Timed delay
2 Value polling
3 RDY/BSY polling
Word Mode
4 Timed delay
5 Value polling
6 RDY/BSY polling
7 Write page
Page Mode
The Word/Page Mode bit selects if the device supports page programming or not.
The command bytes are different for word and page mode. In word mode, the ISP
commands Write Program Memory and Read Program Memory are used. In page
mode, Load Page, Write Program Memory Page and Read Program Memory are
used. The read instruction is used if Value Polling is specified in the mode bit. The
Low/High byte selection bit (3
rd
bit in the Load Page, Write Program Memory
commands) is handled by STK500, so leave this bit cleared.
According to the mode, different termination methods are selected – Timed delay,
Value polling or RDY/BSY polling.
For paged operation, the Write page bit decides if a Write Program Memory Page
command should be issued after the data has been loaded into the page buffer. For
devices with page size bigger than what can be transferred to STK500 in one
command, several CMD_PROGRAM_FLASH_ISP commands must be issued. In
such a case, only the last command should have the Write Page mode bit set.
Note: Only bit 0-6 are set in the XML file, because bit 7 is not constant and must be
controlled by the PC software.
When value polling is used to determine when a programming operation is complete,
poll1 must be supplied. This value indicates which value will be read from the device
until the programmed value is read. This indicates end of programming. poll2 is used
only for EEPROM programming.