ATMEGA162-16AI Atmel, ATMEGA162-16AI Datasheet - Page 23

IC MCU AVR 16K 5V 16MHZ 44-TQFP

ATMEGA162-16AI

Manufacturer Part Number
ATMEGA162-16AI
Description
IC MCU AVR 16K 5V 16MHZ 44-TQFP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA162-16AI

Core Processor
AVR
Core Size
8-Bit
Speed
16MHz
Connectivity
EBI/EMI, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
35
Program Memory Size
16KB (8K x 16)
Program Memory Type
FLASH
Eeprom Size
512 x 8
Ram Size
1K x 8
Voltage - Supply (vcc/vdd)
2.7 V ~ 5.5 V
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
44-TQFP, 44-VQFP
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Data Converters
-

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATMEGA162-16AI
Manufacturer:
MIT
Quantity:
170
Part Number:
ATMEGA162-16AI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATMEGA162-16AI
Manufacturer:
ATMEL
Quantity:
1 000
Part Number:
ATMEGA162-16AI
Manufacturer:
ATMEL
Quantity:
20 000
2513K–AVR–07/09
The following code examples show one assembly and one C function for writing to the
EEPROM. The examples assume that interrupts are controlled (e.g., by disabling interrupts
globally) so that no interrupts will occur during execution of these functions. The examples also
assume that no Flash Boot Loader is present in the software. If such code is present, the
EEPROM write function must also wait for any ongoing SPM command to finish.
Assembly Code Example
C Code Example
EEPROM_write:
void EEPROM_write(unsigned int uiAddress, unsigned char ucData)
{
}
; Wait for completion of?previous write
sbic EECR,EEWE
rjmp EEPROM_write
; Set up address (r18:r1?) in address register
out
out
; Write data (r16) to da?a register
out
; Write logical one to E?MWE
sbi
; Start eeprom write by ?etting EEWE
sbi
ret
/* Wait for complet?on of previous write */
while(EECR & (1<<EEWE))
/* Set up address and da?a registers */
EEAR = uiAddress;
EEDR = ucData;
/* Write logical on? to EEMWE */
EECR |= (1<<EEMWE);
/* Start eeprom write by?setting EEWE */
EECR |= (1<<EEWE);
;
EEARH, r18
EEARL, r17
EEDR,r16
EECR,EEMWE
EECR,EEWE
ATmega162/V
23

Related parts for ATMEGA162-16AI