ATmega32 Atmel Corporation, ATmega32 Datasheet - Page 134

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
2503Q–AVR–02/11
The following code examples show how to initialize the SPI as a master and how to perform a
simple transmission. DDR_SPI in the examples must be replaced by the actual Data Direction
Register controlling the SPI pins. DD_MOSI, DD_MISO and DD_SCK must be replaced by the
actual data direction bits for these pins. For example if MOSI is placed on pin PB5, replace
DD_MOSI with DDB5 and DDR_SPI with DDRB.
Note:
Assembly Code Example
C Code Example
SPI_MasterInit:
SPI_MasterTransmit:
Wait_Transmit:
void SPI_MasterInit(void)
{
}
void SPI_MasterTransmit(char cData)
{
}
; Set MOSI and SCK output, all others input
ldi
out
; Enable SPI, Master, set clock rate fck/16
ldi
out
ret
; Start transmission of data (r16)
out
; Wait for transmission complete
sbis SPSR,SPIF
rjmp Wait_Transmit
ret
/* Set MOSI and SCK output, all others input */
DDR_SPI = (1<<DD_MOSI)|(1<<DD_SCK);
/* Enable SPI, Master, set clock rate fck/16 */
SPCR = (1<<SPE)|(1<<MSTR)|(1<<SPR0);
/* Start transmission */
SPDR = cData;
/* Wait for transmission complete */
while(!(SPSR & (1<<SPIF)))
1. See
;
r17,(1<<DD_MOSI)|(1<<DD_SCK)
DDR_SPI,r17
r17,(1<<SPE)|(1<<MSTR)|(1<<SPR0)
SPCR,r17
SPDR,r16
“About Code Examples” on page
(1)
(1)
7.
ATmega32(L)
134

Related parts for ATmega32