ATA6616-P3PW Atmel, ATA6616-P3PW Datasheet - Page 248

no-image

ATA6616-P3PW

Manufacturer Part Number
ATA6616-P3PW
Description
TXRX MULTICHIP MOD LIN SIP 38QFN
Manufacturer
Atmel
Series
AVR® ATA66 LIN-SBCr
Datasheet

Specifications of ATA6616-P3PW

Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
I²C, LIN, SPI, UART/USART, USI
Peripherals
Brown-out Detect/Reset, POR, PWM, Temp Sensor, WDT
Number Of I /o
16
Program Memory Size
8KB (8K x 8)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
2.7 V ~ 5.5 V
Data Converters
A/D 11x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
38-VQFN
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
4.21.2.7
248
Atmel ATA6616/ATA6617
Simple Assembly Code Example for a Boot Loader
Note that the RWWSB bit will always be read as zero in Atmel
is recommended to check this bit as shown in the code example, to ensure compatibility with
devices supporting Read-While-Write.
.equ PAGESIZEB = PAGESIZE*2
.org SMALLBOOTSTART
Write_page:
Wrloop:
;- The routine writes one page of data from RAM to Flash
;
;
;- Error handling is not included
;- Registers used: r0, r1, temp1 (r16), temp2 (r17), looplo (r24),
;
; - Storing and restoring of registers is not included in the routine
;
; Page Erase
ldi
rcall Do_spm
; Clear temporary page buffer
ldi
rcall Do_spm
; Transfer data from RAM to Flash temporary page buffer
ldi
ldi
ld
ld
ldi
rcall Do_spm
adiw
sbiw
brne
; Execute Page Write
subi
sbci
ldi
rcall Do_spm
; Clear temporary page buffer
ldi
rcall Do_spm
; Read back and check, optional
ldi
ldi
subi
sbci
the first data location in RAM is pointed to by the Y-pointer
the first data location in Flash is pointed to by the Z-pointer
register usage can be optimized at the expense of code size
spmcsrval, (1<<PGERS) | (1<<SELFPGEN)
spmcsrval, (1<<CPTB) | (1<<SELFPGEN)
looplo, low(PAGESIZEB)
loophi, high(PAGESIZEB)
r0, Y+
r1, Y+
spmcsrval, (1<<SELFPGEN)
ZH:ZL, 2
loophi:looplo, 2
Wrloop
ZL, low(PAGESIZEB)
ZH, high(PAGESIZEB)
spmcsrval, (1<<PGWRT) | (1<<SELFPGEN)
spmcsrval, (1<<CPTB) | (1<<SELFPGEN)
looplo, low(PAGESIZEB)
loophi, high(PAGESIZEB)
YL, low(PAGESIZEB)
YH, high(PAGESIZEB)
loophi (r25), spmcsrval (r20)
; AGESIZEB is page size in BYTES, not words
; use subi for PAGESIZEB<=256
; restore pointer
; not required for PAGESIZEB<=256
; init loop variable
; not required for PAGESIZEB<=256
; restore pointer
; init loop variable
; not required for PAGESIZEB<=256
®
ATtiny87/167. Nevertheless, it
9132D–AUTO–12/10

Related parts for ATA6616-P3PW