3.2 Enable Memory Access
When the Reset pin is first pulled active, the only instruction accepted by the SPI interface is “Programming Enable”. Only this command will open for access to the Flash and EEPROM memories, and without this access, any other command issued will be ignored. The table below shows an example where memory access is enabled in the first command sent to the chip.
Action | MOSI, sent to the target AVR | MISO, returned from the target AVR |
---|---|---|
Programming Enable | $AC 53 xx yy | $zz AC 53 xx |
Read Device Code $1E at Address $00 | $30 nn 00 mm | $yy 30 nn 1E |
After a “Programming Enable” command has been sent to the target, access is given to the nonvolatile memories of the chip according to the current setting of the protecting Lock bits.
The target AVR microcontroller will not respond with an acknowledge to the “Programming Enable” command. To check if the command has been accepted by the target AVR microcontroller, the device code could be read. The device code is also known as the signature bytes.