ATtiny2313A Atmel Corporation, ATtiny2313A Datasheet - Page 149

no-image

ATtiny2313A

Manufacturer Part Number
ATtiny2313A
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATtiny2313A

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATtiny2313A-MMH
Manufacturer:
SAMSUNG
Quantity:
101
Part Number:
ATtiny2313A-MU
Manufacturer:
ATMEL
Quantity:
313
Company:
Part Number:
ATtiny2313A-MU
Quantity:
20 000
Part Number:
ATtiny2313A-MUR
Manufacturer:
LT
Quantity:
4 439
Part Number:
ATtiny2313A-PU
Manufacturer:
TI
Quantity:
1 560
Part Number:
ATtiny2313A-PU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATtiny2313A-PU
Quantity:
1 800
Part Number:
ATtiny2313A-SU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
8246B–AVR–09/11
baud rate is given as a function parameter. For the assembly code, the baud rate parameter is
assumed to be stored in the r17:r16 registers.
Note:
Assembly Code Example
C Code Example
USART_Init:
void USART_Init( unsigned int baud )
{
}
clr r18
out UBRRH,r18
out UBRRL,r18
; Setting the XCK port pin as output, enables master mode.
sbi XCK_DDR, XCK
; Set MSPI mode of operation and SPI data mode 0.
ldi r18, (1<<UMSEL1)|(1<<UMSEL0)|(0<<UCPHA)|(0<<UCPOL)
out UCSRC,r18
; Enable receiver and transmitter.
ldi r18, (1<<RXEN)|(1<<TXEN)
out UCSRB,r18
; Set baud rate.
; IMPORTANT: The Baud Rate must be set after the transmitter is enabled!
out UBRRH, r17
out UBRRL, r18
ret
UBRR = 0;
/* Setting the XCK port pin as output, enables master mode. */
XCK_DDR |= (1<<XCK);
/* Set MSPI mode of operation and SPI data mode 0. */
UCSRC = (1<<UMSEL1)|(1<<UMSEL0)|(0<<UCPHA)|(0<<UCPOL);
/* Enable receiver and transmitter. */
UCSRB = (1<<RXEN)|(1<<TXEN);
/* Set baud rate. */
/* IMPORTANT: The Baud Rate must be set after the transmitter is enabled
*/
UBRR = baud;
1.
See ”Code Examples” on page 7.
(1)
(1)
ATtiny2313A/4313
149

Related parts for ATtiny2313A