ATMEGA88-20PJ Atmel, ATMEGA88-20PJ Datasheet - Page 182
ATMEGA88-20PJ
Manufacturer Part Number
ATMEGA88-20PJ
Description
IC MCU AVR 8K 5V 20MHZ 28-DIP
Manufacturer
Atmel
Series
AVR® ATmegar
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
ATMEGA88-24PJ
- Current page: 182 of 378
- Download datasheet (8Mb)
19.7.3
182
ATmega48/88/168
Receive Compete Flag and Interrupt
Note:
The USART Receiver has one flag that indicates the Receiver state.
Assembly Code Example
C Code Example
USART_Receive:
USART_ReceiveNoError:
unsigned int USART_Receive( void )
{
}
; Wait for data to be received
sbis UCSRnA, RXCn
rjmp USART_Receive
; Get status and 9th bit, then data from buffer
in
in
in
; If error, return -1
andi r18,(1<<FEn)|(1<<DORn)|(1<<UPEn)
breq USART_ReceiveNoError
ldi
ldi
; Filter the 9th bit, then return
lsr
andi r17, 0x01
ret
unsigned char status, resh, resl;
/* Wait for data to be received */
while ( !(UCSRnA & (1<<RXCn)) )
/* Get status and 9th bit, then data */
/* from buffer */
status = UCSRnA;
resh = UCSRnB;
resl = UDRn;
/* If error, return -1 */
if ( status & (1<<FEn)|(1<<DORn)|(1<<UPEn) )
/* Filter the 9th bit, then return */
resh = (resh >> 1) & 0x01;
return ((resh << 8) | resl);
1.
return -1;
See ”About Code Examples” on page 7.
The receive function example reads all the I/O Registers into the Register File before any com-
putation is done. This gives an optimal receive buffer utilization since the buffer location read
will be free to accept new data as early as possible.
r18, UCSRnA
r17, UCSRnB
r16, UDRn
r17, HIGH(-1)
r16, LOW(-1)
r17
;
(1)
(1)
2545S–AVR–07/10
Related parts for ATMEGA88-20PJ
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
IC MCU AVR 8K 5V 20MHZ 32-TQFP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
Part Number:
Description:
MCU AVR 8K FLASH 15MHZ 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 8K 20MHZ 5V 32TQFP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 8K 20MHZ 5V 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 8K 20MHZ 5V 28DIP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC MCU AVR 8K 5V 20MHZ 32-TQFP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC MCU AVR 8K 5V 20MHZ 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC MCU AVR 8K 5V 20MHZ 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC MCU AVR 8K 5V 20MHZ 28-DIP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
MCU AVR 8K FLASH 20MHZ 32TQFP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
MCU AVR 8K FLASH 20MHZ 32QFN
Manufacturer:
Atmel
Datasheet: