Datasheet
238
7728G–AVR–06/10
ATtiny87/ATtiny167
21.7.15 Reading the Temperature Sensor Parameter Bytes
The algorithm for reading the Temperature Sensor parameter bytes is as follows (refer to “Pro-
gramming the Flash” on page 232 for details on Command and Address loading):
1. A: Load Command
“0000 1000
b
”.
2. B: Load Address Low Byte, 0x0003 or 0x0005.
3. Set OE
to “0”, and BS1 to “1”. The Temperature Sensor parameter byte can now be
read at DATA.
4. Set OE
to “1”.
21.8 Serial Downloading
Both the Flash and EEPROM memory arrays can be programmed using the serial SPI bus
while RESET
is pulled to GND. The serial interface consists of pins SCK, MOSI (input) and
MISO (output). After RESET
is set low, the Programming Enable instruction needs to be exe-
cuted first before program/erase operations can be executed.
Note: In Table 21-13, the pin mapping for SPI programming is listed. Not all parts use the SPI pins
dedicated for the internal SPI interface.
Figure 21-7. Serial Programming and Verify
(Note:)
Note: If the device is clocked by the internal Oscillator, it is no need to connect a clock source to the
XTAL1 pin
When programming the EEPROM, an auto-erase cycle is built into the self-timed program-
ming operation (in the Serial mode ONLY) and there is no need to first execute the Chip Erase
instruction. The Chip Erase operation turns the content of every memory location in both the
Program and EEPROM arrays into 0xFF.
Table 21-13. Pin Mapping Serial Programming
Symbol Pin Name I/O Function
MOSI PA4 I Serial Data In
MISO PA2 O Serial Data Out
SCK PA5 I Serial Clock
Vcc
+2.7 - +5.5V
GND
PA4
PA2
PA5
MOSI
MISO
SCK
RESET / PB7