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/P0x0034 out SPH,r16 ; Set Stack Pointer to top <strong>of</strong> RAM0x0035 ldi r16, low(RAMEND)0x0036 out SPL,r160x0037 sei ; Enable interrupts0x0038 xxx... ... ... ...When the BOOTRST Fuse is unprogrammed, the Boot section size set to 2Kbytes and theIVSEL bit in the MCUCR Register is set before any interrupts are enabled, the most typical andgeneral program setup for the Reset and Interrupt Vector Addresses in ATmega168A/168PA is:Address Labels Code Comments0x0000 RESET: ldi r16,high(RAMEND); Main program start0x0001 out SPH,r16 ; Set Stack Pointer to top <strong>of</strong> RAM0x0002 ldi r16,low(RAMEND)0x0003 out SPL,r160x0004 sei ; Enable interrupts0x0005 xxx;.org 0x1C020x1C02 jmp EXT_INT0 ; IRQ0 Handler0x1C04 jmp EXT_INT1 ; IRQ1 Handler... ... ... ;0x1C32 jmp SPM_RDY ; Store Program Memory Ready HandlerWhen the BOOTRST Fuse is programmed and the Boot section size set to 2Kbytes, the mosttypical and general program setup for the Reset and Interrupt Vector Addresses inATmega168A/168PA is:Address Labels Code Comments.org 0x00020x0002 jmp EXT_INT0 ; IRQ0 Handler0x0004 jmp EXT_INT1 ; IRQ1 Handler... ... ... ;0x0032 jmp SPM_RDY ; Store Program Memory Ready Handler;.org 0x1C000x1C00 RESET: ldi r16,high(RAMEND); Main program start0x1C01 out SPH,r16 ; Set Stack Pointer to top <strong>of</strong> RAM0x1C02 ldi r16,low(RAMEND)0x1C03 out SPL,r160x1C04 sei ; Enable interrupts0x1C05 xxxWhen the BOOTRST Fuse is programmed, the Boot section size set to 2Kbytes and the IVSELbit in the MCUCR Register is set before any interrupts are enabled, the most typical and generalprogram setup for the Reset and Interrupt Vector Addresses in ATmega168A/168PA is:8271D–AVR–05/1166

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

Saved successfully!

Ooh no, something went wrong!