Datasheet
179
8197C–AVR–05/11
ATtiny261A/461A/861A
1. Load Command “Write Flash”:
a. Set XA1, XA0 to “10”. This enables command loading.
b. Set BS1 to “0”.
c. Set DATA to “0001 0000”. This is the command for Write Flash.
d. Give XTAL1 a positive pulse. This loads the command.
2. Load Address Low byte:
a. Set XA1, XA0 to “00”. This enables address loading.
b. Keep BS1 at “0”. This selects low address.
c. Set DATA = Address low byte (0x00 - 0xFF).
d. Give XTAL1 a positive pulse. This loads the address low byte.
3. Load Data Low Byte:
a. Set XA1, XA0 to “01”. This enables data loading.
b. Set DATA = Data low byte (0x00 - 0xFF).
c. Give XTAL1 a positive pulse. This loads the data byte.
4. Load Data High Byte:
a. Set BS1 to “1”. This selects high data byte.
b. Keep XA1, XA0 at “01”. This enables data loading.
c. Set DATA = Data high byte (0x00 - 0xFF).
d. Give XTAL1 a positive pulse. This loads the data byte.
5. Repeat steps 2 to 4 until the entire buffer is filled or until all data within the page is
loaded.
6. Load Address High byte:
a. Set XA1, XA0 to “00”. This enables address loading.
b. Set BS1 to “1”. This selects high address.
c. Set DATA = Address high byte (0x00 - 0xFF).
d. Give XTAL1 a positive pulse. This loads the address high byte.
7. Program Page:
a. Give WR
a negative pulse. This starts programming of the entire page of data.
RDY/BSY
goes low.
b. Wait until RDY/BSY
goes high.
8. Repeat steps 2 to 7 until the entire Flash is programmed or until all data has been
programmed.
9. End Page Programming:
a. Set XA1, XA0 to “10”. This enables command loading.
b. Set DATA to “0000 0000”. This is the command for No Operation.
c. Give XTAL1 a positive pulse. This loads the command, and the internal write sig-
nals are reset.
While the lower bits in the address are mapped to words within the page, the higher bits address
the pages within the FLASH. This is illustrated in Figure 18-4. Note that if less than eight bits are
required to address words in the page (pagesize < 256), the most significant bit(s) in the address
low byte are used to address the page when performing a Page Write.