ATMEGA162-16PJ Atmel, ATMEGA162-16PJ Datasheet - Page 160

IC MCU AVR 16K 5V 16MHZ 40-DIP

ATMEGA162-16PJ

Manufacturer Part Number
ATMEGA162-16PJ
Description
IC MCU AVR 16K 5V 16MHZ 40-DIP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA162-16PJ

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
40-DIP (0.600", 15.24mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Data Converters
-
160
ATmega162/V
Note:
Assembly Code Example
C Code Example
SPI_MasterInit:
SPI_MasterTransmit:
Wait_Transmit:
void SPI_MasterInit(void)
{
}
void SPI_MasterTransmit(char cData)
{
}
; Set MOSI and SCK outpu?, all others input
ldi
out
; Enable SPI, Master, se? clock rate fck/16
ldi
out
ret
; Start transmission of ?ata (r16)
out
; Wait for transmission ?omplete
sbis SPSR,SPIF
rjmp Wait_Transmit
ret
/* Set MOSI and SCK outp?t, all others input */
DDR_SPI = (1<<DD_MOSI)|(?<<DD_SCK);
/* Enable SPI, Master, s?t clock rate fck/16 */
SPCR = (1<<SPE)|(1<<MSTR?|(1<<SPR0);
/* Start transmission */
SPDR = cData;
/* Wait for transmission?complete */
while(!(SPSR & (1<<?PIF)))
1. The example code assumes that the part specific header file is included.
;
r17,(1<<DD_MOSI)|(1<<DD_SCK)
DDR_SPI,r17
r17,(1<<SPE)|(1<<MSTR)|(1<<SPR0)
SPCR,r17
SPDR,r16
(1)
(1)
2513K–AVR–07/09

Related parts for ATMEGA162-16PJ