ATmega165P Atmel Corporation, ATmega165P Datasheet - Page 168

no-image

ATmega165P

Manufacturer Part Number
ATmega165P
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega165P

Flash (kbytes)
16 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
2
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
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
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:
ATmega165P-16AN
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega165P-16ANR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega165P-16AU
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega165P-16AUR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega165PA-AN
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega165PV-8AU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
18.6.2
8019K–AVR–11/10
Sending Frames with 9 Data Bit
If 9-bit characters are used (UCSZ = 7), the ninth bit must be written to the TXB8n bit in
UCSRnB before the low byte of the character is written to UDRn. The following code examples
show a transmit function that handles 9-bit characters. For the assembly code, the data to be
sent is assumed to be stored in registers R17:R16.
Notes:
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.
Assembly Code Example
C Code Example
USART_Transmit:
void USART_Transmit( unsigned int data )
{
}
; Wait for empty transmit buffer
sbis UCSR0A,UDRE0
rjmp USART_Transmit
; Copy 9th bit from r17 to TXB80
cbi
sbrc r17,0
sbi
; Put LSB data (r16) into buffer, sends the data
sts
ret
/* Wait for empty transmit buffer */
while ( !( UCSR0A & (1<<UDRE0))) )
/* Copy 9th bit to TXB80 */
UCSR0B &= ~(1<<TXB80);
if ( data & 0x0100 )
/* Put data into buffer, sends the data */
UDR0 = data;
1. These transmit functions are written to be general functions. They can be optimized if the con-
2.
UCSR0B |= (1<<TXB80);
See “About Code Examples” on page 8.
tents of the UCSRnB is static. For example, only the TXB8n bit of the UCSRnB Register is
used after initialization.
UCSR0B,TXB80
UCSR0B,TXB80
UDR0,r16
;
(1)(2)
(1)(2)
ATmega165P
168

Related parts for ATmega165P