11.07.2015 Views

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ATmega48A/PA/88A/PA/168A/PA/328/Paddress is taken from the high part <strong>of</strong> the Z-pointer. The data in R1 and R0 are ignored. ThePGWRT bit will auto-clear upon completion <strong>of</strong> a Page Write, or if no SPM instruction is executedwithin four clock cycles. The CPU is halted during the entire Page Write operation if the NRWWsection is addressed.• Bit 1 – PGERS: Page EraseIf this bit is written to one at the same time as SELFPRGEN, the next SPM instruction within fourclock cycles executes Page Erase. The page address is taken from the high part <strong>of</strong> the Z-pointer. The data in R1 and R0 are ignored. The PGERS bit will auto-clear upon completion <strong>of</strong> aPage Erase, or if no SPM instruction is executed within four clock cycles. The CPU is halted duringthe entire Page Write operation if the NRWW section is addressed.• Bit 0 – SELFPRGEN: Self Programming EnableThis bit enables the SPM instruction for the next four clock cycles. If written to one together witheither RWWSRE, BLBSET, PGWRT or PGERS, the following SPM instruction will have a specialmeaning, see description above. If only SELFPRGEN is written, the following SPMinstruction will store the value in R1:R0 in the temporary page buffer addressed by the Z-pointer.The LSB <strong>of</strong> the Z-pointer is ignored. The SELFPRGEN bit will auto-clear upon completion <strong>of</strong> anSPM instruction, or if no SPM instruction is executed within four clock cycles. During Page Eraseand Page Write, the SELFPRGEN bit remains high until the operation is completed.Writing any other combination than “10001”, “01001”, “00101”, “00011” or “00001” in the lowerfive bits will have no effect.8271D–AVR–05/11296

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!