ATMEGA323-8PI Atmel, ATMEGA323-8PI Datasheet - Page 93

IC AVR MCU 32K 8MHZ IND 40DIP

ATMEGA323-8PI

Manufacturer Part Number
ATMEGA323-8PI
Description
IC AVR MCU 32K 8MHZ IND 40DIP
Manufacturer
Atmel
Series
AVR® ATmegar
Datasheet

Specifications of ATMEGA323-8PI

Core Processor
AVR
Core Size
8-Bit
Speed
8MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
32
Program Memory Size
32KB (16K x 16)
Program Memory Type
FLASH
Eeprom Size
1K x 8
Ram Size
2K x 8
Voltage - Supply (vcc/vdd)
4.5 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
40-DIP (0.600", 15.24mm)
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
Other names
ATMEGA3238PI
Read Access
1457G–AVR–09/03
Doing a read access to the UBRRH or the UCSRC Register is a more complex opera-
tion. However, in most applications, it is rarely necessary to read any of these registers.
The read access is controlled by a timed sequence. Reading the I/O location once
returns the UBRRH Register contents. If the register location was read in previous sys-
tem clock cycle, reading the register in the current clock cycle will return the UCSRC
contents. Note that the timed sequence for reading the UCSRC is an atomic operation.
Interrupts must therefore be disabled during the read operation.
The following code example shows how to read the UCSRC Register contents.
Note:
The assembly code example returns the UCSRC value in r16.
Reading the UBRRH contents is not an atomic operation and therefore it can be read as
an ordinary register, as long as the previous instruction did not access the register
location.
Assembly Code Example
C Code Example
USART_ReadUCSRC:
unsigned char USART_ReadUCSRC( void )
{
}
; Save Global Interrupt Flag
in
; Disable interrupts
cli
; Read UCSRC
in
in
; Restore Global Interrupt Flag
out SREG,r17
ret
unsigned char sreg, ucsrc;
/* Save Global Interrupt Flag */
sreg = SREG;
/* Disable interrupts */
_CLI();
/* Read UCSRC */
ucsrc = UBRRH;
ucsrc = UCSRC;
/* Restore Global Interrupt Flag */
SREG = sreg;
return ucsrc;
1. The example code assumes that the part specific header file is included.
r16,UBRRH
r16,UCSRC
r17,SREG
(1)
(1)
ATmega323(L)
93

Related parts for ATMEGA323-8PI