ATmega1281 Atmel Corporation, ATmega1281 Datasheet - Page 235

no-image

ATmega1281

Manufacturer Part Number
ATmega1281
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega1281

Flash (kbytes)
128 Kbytes
Pin Count
64
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
16
Hardware Qtouch Acquisition
No
Max I/o Pins
54
Ext Interrupts
17
Usb Speed
No
Usb Interface
No
Spi
3
Twi (i2c)
1
Uart
2
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)
8
Eeprom (bytes)
4096
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
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
6
Output Compare Channels
16
Input Capture Channels
2
Pwm Channels
8
32khz Rtc
Yes
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATmega1281-16AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega1281-16AU
Manufacturer:
ATMEL
Quantity:
982
Part Number:
ATmega1281-16AUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega1281-8MC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
ATmega1281V-8AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega1281V-8AUR
Manufacturer:
Atmel
Quantity:
10 000
2549N–AVR–05/11
The following simple USART initialization code examples show one assembly and one C func-
tion that are equal in functionality. The examples assume polling (no interrupts enabled). The
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 UBRRnH,r18
out UBRRnL,r18
; Setting the XCKn port pin as output, enables master mode.
sbi XCKn_DDR, XCKn
; Set MSPI mode of operation and SPI data mode 0.
ldi r18, (1<<UMSELn1)|(1<<UMSELn0)|(0<<UCPHAn)|(0<<UCPOLn)
out UCSRnC,r18
; Enable receiver and transmitter.
ldi r18, (1<<RXENn)|(1<<TXENn)
out UCSRnB,r18
; Set baud rate.
; IMPORTANT: The Baud Rate must be set after the transmitter is enabled!
out UBRRnH, r17
out UBRRnL, r18
ret
UBRRn = 0;
/* Setting the XCKn port pin as output, enables master mode. */
XCKn_DDR |= (1<<XCKn);
/* Set MSPI mode of operation and SPI data mode 0. */
UCSRnC = (1<<UMSELn1)|(1<<UMSELn0)|(0<<UCPHAn)|(0<<UCPOLn);
/* Enable receiver and transmitter. */
UCSRnB = (1<<RXENn)|(1<<TXENn);
/* Set baud rate. */
/* IMPORTANT: The Baud Rate must be set after the transmitter is enabled
UBRRn = baud;
1.
See “About Code Examples” on page 11.
(1)
(1)
ATmega640/1280/1281/2560/2561
235

Related parts for ATmega1281