ATmega32 Atmel Corporation, ATmega32 Datasheet - Page 159

no-image

ATmega32

Manufacturer Part Number
ATmega32
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega32

Flash (kbytes)
32 Kbytes
Pin Count
44
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
16
Hardware Qtouch Acquisition
No
Max I/o Pins
32
Ext Interrupts
3
Usb Speed
No
Usb Interface
No
Spi
1
Twi (i2c)
1
Uart
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
8
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
No
Crypto Engine
No
Sram (kbytes)
2
Eeprom (bytes)
1024
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 85
I/o Supply Class
2.7 to 5.5
Operating Voltage (vcc)
2.7 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
3
Output Compare Channels
4
Input Capture Channels
1
Pwm Channels
4
32khz Rtc
Yes
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATmega32-16AC
Manufacturer:
COMPAL
Quantity:
500
Part Number:
ATmega32-16AC
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32-16AI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32-16AJ
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32-16AQ
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32-16AQR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega32-16AU
Manufacturer:
ATMEL
Quantity:
20 000
Company:
Part Number:
ATmega32-16AU
Quantity:
5 600
Company:
Part Number:
ATmega32-16AU
Quantity:
21 222
Part Number:
ATmega32-16PI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATmega32-16PU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Read Access
USART Register
Description
USART I/O Data
Register – UDR
2503Q–AVR–02/11
Doing a read access to the UBRRH or the UCSRC Register is a more complex operation. How-
ever, 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 system clock cycle, read-
ing 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 controlled
(for example by disabling interrupts globally) 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 ordi-
nary register, as long as the previous instruction did not access the register location.
The USART Transmit Data Buffer Register and USART Receive Data Buffer Registers share the
same I/O address referred to as USART Data Register or UDR. The Transmit Data Buffer Reg-
ister (TXB) will be the destination for data written to the UDR Register location. Reading the
UDR Register location will return the contents of the Receive Data Buffer Register (RXB).
For 5-bit, 6-bit, or 7-bit characters the upper unused bits will be ignored by the Transmitter and
set to zero by the Receiver.
The transmit buffer can only be written when the UDRE Flag in the UCSRA Register is set. Data
written to UDR when the UDRE Flag is not set, will be ignored by the USART Transmitter. When
data is written to the transmit buffer, and the Transmitter is enabled, the Transmitter will load the
Bit
Read/Write
Initial Value
Assembly Code Example
C Code Example
USART_ReadUCSRC:
unsigned char USART_ReadUCSRC( void )
{
}
; Read UCSRC
in
in
ret
unsigned char ucsrc;
/* Read UCSRC */
ucsrc = UBRRH;
ucsrc = UCSRC;
return ucsrc;
1. See
r16,UBRRH
r16,UCSRC
R/W
7
0
“About Code Examples” on page
(1)
R/W
6
0
(1)
R/W
5
0
R/W
4
0
RXB[7:0]
TXB[7:0]
7.
R/W
3
0
R/W
2
0
R/W
1
0
ATmega32(L)
R/W
0
0
UDR (Read)
UDR (Write)
159

Related parts for ATmega32