ATmega16A Atmel Corporation, ATmega16A Datasheet - Page 155

no-image

ATmega16A

Manufacturer Part Number
ATmega16A
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega16A

Flash (kbytes)
16 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)
1
Eeprom (bytes)
512
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:
ATmega16A-AU
Manufacturer:
HIROSE
Quantity:
3 000
Part Number:
ATmega16A-AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega16A-AU
Manufacturer:
MICROCHIP
Quantity:
250
Part Number:
ATmega16A-AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATmega16A-AUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega16A-AUR
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
ATmega16A-PU
Manufacturer:
AT
Quantity:
20 000
Company:
Part Number:
ATmega16A-PU
Quantity:
25 000
Part Number:
ATmega16A-U-TH
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATmega16AU-TH
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
19.6.3
8154B–AVR–07/09
Transmitter Flags and Interrupts
Note:
The ninth bit can be used for indicating an address frame when using multi processor communi-
cation mode or for other protocol handling as for example synchronization.
The USART transmitter has two flags that indicate its state: USART Data Register Empty
(UDRE) and Transmit Complete (TXC). Both flags can be used for generating interrupts.
The Data Register Empty (UDRE) Flag indicates whether the transmit buffer is ready to receive
new data. This bit is set when the transmit buffer is empty, and cleared when the transmit buffer
contains data to be transmitted that has not yet been moved into the Shift Register. For compat-
ibility with future devices, always write this bit to zero when writing the UCSRA Register.
When the Data Register empty Interrupt Enable (UDRIE) bit in UCSRB is written to one, the
USART Data Register Empty Interrupt will be executed as long as UDRE is set (provided that
global interrupts are enabled). UDRE is cleared by writing UDR. When interrupt-driven data
transmission is used, the Data Register Empty Interrupt routine must either write new data to
UDR in order to clear UDRE or disable the Data Register empty Interrupt, otherwise a new inter-
rupt will occur once the interrupt routine terminates.
Assembly Code Example
C Code Example
USART_Transmit:
void USART_Transmit( unsigned int data )
{
}
; Wait for empty transmit buffer
sbis UCSRA,UDRE
rjmp USART_Transmit
; Copy 9th bit from r17 to TXB8
cbi
sbrc r17,0
sbi
; Put LSB data (r16) into buffer, sends the data
out
ret
/* Wait for empty transmit buffer */
while ( !( UCSRA & (1<<UDRE))) )
/* Copy 9th bit to TXB8 */
UCSRB &= ~(1<<TXB8);
if ( data & 0x0100 )
/* Put data into buffer, sends the data */
UDR = data;
These transmit functions are written to be general functions. They can be optimized if the contents
of the UCSRB is static. (i.e., only the TXB8 bit of the UCSRB Register is used after initialization).
UCSRB |= (1<<TXB8);
UCSRB,TXB8
UCSRB,TXB8
UDR,r16
;
(Note:)
(Note:)
ATmega16A
155

Related parts for ATmega16A