ATMEGA128-16MN Atmel, ATMEGA128-16MN Datasheet - Page 283

MCU AVR 128KB FLASH 16MHZ 64QFN

ATMEGA128-16MN

Manufacturer Part Number
ATMEGA128-16MN
Description
MCU AVR 128KB FLASH 16MHZ 64QFN
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA128-16MN

Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
EBI/EMI, I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
53
Program Memory Size
128KB (64K x 16)
Program Memory Type
FLASH
Eeprom Size
4K x 8
Ram Size
4K x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
64-MLF®, 64-QFN
Processor Series
ATMEGA128x
Core
AVR8
Data Bus Width
8 bit
Data Ram Size
4 KB
3rd Party Development Tools
EWAVR, EWAVR-BL
Development Tools By Supplier
ATAVRDRAGON, ATSTK500, ATSTK600, ATAVRISP2, ATAVRONEKIT
For Use With
ATSTK600 - DEV KIT FOR AVR/AVR32ATSTK501 - ADAPTER KIT FOR 64PIN AVR MCUATSTK500 - PROGRAMMER AVR STARTER KIT
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
2467V–AVR–02/11
Wrloop:
Rdloop:
Return:
yet
Do_spm:
Wait_spm:
; transfer data from RAM to Flash page buffer
ldi
ldi
ld
ld
ldi
call Do_spm
adiw ZH:ZL, 2
sbiw loophi:looplo, 2
brne Wrloop
; execute page write
subi ZL, low(PAGESIZEB)
sbci ZH, high(PAGESIZEB)
ldi
call Do_spm
; re-enable the RWW section
ldi
call Do_spm
; read back and check, optional
ldi
ldi
subi YL, low(PAGESIZEB)
sbci YH, high(PAGESIZEB)
lpm
ld
cpse r0, r1
jmp
sbiw loophi:looplo, 1
brne Rdloop
; return to RWW section
; verify that RWW section is safe to read
lds
sbrs temp1, RWWSB
ret
; re-enable the RWW section
ldi
call Do_spm
rjmp Return
; check for previous SPM complete
lds
sbrc temp1, SPMEN
rjmp Wait_spm
; input: spmcsrval determines SPM action
; disable interrupts if enabled, store status
in
cli
; check that no EEPROM write access is present
looplo, low(PAGESIZEB);init loop variable
loophi, high(PAGESIZEB);not required for PAGESIZEB<=256
r0, Y+
r1, Y+
spmcsrval, (1<<SPMEN)
spmcsrval, (1<<PGWRT) | (1<<SPMEN)
spmcsrval, (1<<RWWSRE) | (1<<SPMEN)
looplo, low(PAGESIZEB);init loop variable
loophi, high(PAGESIZEB);not required for PAGESIZEB<=256
r0, Z+
r1, Y+
Error
temp1, SPMCSR
spmcsrval, (1<<RWWSRE) | (1<<SPMEN)
temp1, SPMCSR
temp2, SREG
; If RWWSB is set, the RWW section is not ready
;use subi for PAGESIZEB<=256
;restore pointer
;not required for PAGESIZEB<=256
;restore pointer
;use subi for PAGESIZEB<=256
ATmega128
283

Related parts for ATMEGA128-16MN