ATMEGA88-20PJ Atmel, ATMEGA88-20PJ Datasheet - Page 177

IC MCU AVR 8K 5V 20MHZ 28-DIP

ATMEGA88-20PJ

Manufacturer Part Number
ATMEGA88-20PJ
Description
IC MCU AVR 8K 5V 20MHZ 28-DIP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheets

Specifications of ATMEGA88-20PJ

Core Processor
AVR
Core Size
8-Bit
Speed
20MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
23
Program Memory Size
8KB (4K 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
Data Converters
A/D 6x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-DIP (0.300", 7.62mm)
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Other names
ATMEGA88-24PJ
ATMEGA88-24PJ
2545S–AVR–07/10
For the assembly code, the baud rate parameter is assumed to be stored in the r17:r16
Registers.
Note:
More advanced initialization routines can be made that include frame format as parameters, dis-
able interrupts and so on. However, many applications use a fixed setting of the baud and
control registers, and for these types of applications the initialization code can be placed directly
in the main routine, or be combined with initialization code for other I/O modules.
Assembly Code Example
C Code Example
USART_Init:
#define FOSC 1843200 // Clock Speed
#define BAUD 9600
#define MYUBRR FOSC/16/BAUD-1
void main( void )
{
...
...
}
void USART_Init( unsigned int ubrr)
{
}
; Set baud rate
out
out
; Enable receiver and transmitter
ldi
out
; Set frame format: 8data, 2stop bit
ldi
out
ret
USART_Init(MYUBRR)
/*Set baud rate */
UBRR0H = (unsigned char)(ubrr>>8);
UBRR0L = (unsigned char)ubrr;
Enable receiver and transmitter */
UCSR0B = (1<<RXEN0)|(1<<TXEN0);
/* Set frame format: 8data, 2stop bit */
UCSR0C = (1<<USBS0)|(3<<UCSZ00);
1.
See ”About Code Examples” on page 7.
UBRRnH, r17
UBRRnL, r16
r16, (1<<RXENn)|(1<<TXENn)
UCSRnB,r16
r16, (1<<USBSn)|(3<<UCSZn0)
UCSRnC,r16
(1)
(1)
ATmega48/88/168
177

Related parts for ATMEGA88-20PJ