ATmega16M1 Atmel Corporation, ATmega16M1 Datasheet - Page 26

no-image

ATmega16M1

Manufacturer Part Number
ATmega16M1
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATmega16M1

Flash (kbytes)
16 Kbytes
Pin Count
32
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
12
Hardware Qtouch Acquisition
No
Max I/o Pins
27
Ext Interrupts
27
Usb Speed
No
Usb Interface
No
Spi
1
Uart
1
Can
1
Lin
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
11
Adc Resolution (bits)
10
Adc Speed (ksps)
125
Analog Comparators
4
Resistive Touch Screen
No
Dac Channels
1
Dac Resolution (bits)
10
Temp. Sensor
Yes
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
2
Output Compare Channels
14
Input Capture Channels
1
Pwm Channels
10
32khz Rtc
No
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATmega16M1-15AZ
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
ATmega16M1-AU
Manufacturer:
Atmel
Quantity:
10 000
7.7.4
7.7.5
7.7.6
26
ATmega16M1/32M1/64M1
GPIOR0 – General Purpose I/O Register 0
GPIOR1 – General Purpose I/O Register 1
GPIOR2 – General Purpose I/O Register 2
The next code examples show assembly and C functions for reading the EEPROM. The exam-
ples assume that interrupts are controlled so that no interrupts will occur during execution of
these functions.
Bit
Read/Write
Initial Value
Bit
Read/Write
Initial Value
Bit
Read/Write
Initial Value
Assembly Code Example
C Code Example
EEPROM_read:
unsigned char EEPROM_read(unsigned int uiAddress)
{
}
; Wait for completion of previous write
sbic EECR,EEWE
rjmp EEPROM_read
; Set up address (r18:r17) in address register
out EEARH, r18
out EEARL, r17
; Start eeprom read by writing EERE
sbi EECR,EERE
; Read data from data register
in
ret
/* Wait for completion of previous write */
while(EECR & (1<<EEWE))
/* Set up address register */
EEAR = uiAddress;
/* Start eeprom read by writing EERE */
EECR |= (1<<EERE);
/* Return data from data register */
return EEDR;
;
r16,EEDR
GPIOR07
GPIOR17
GPIOR27
R/W
R/W
R/W
7
0
7
0
7
0
GPIOR06
GPIOR16
GPIOR26
R/W
R/W
R/W
6
0
6
0
6
0
GPIOR05
GPIOR15
GPIOR25
R/W
R/W
R/W
5
0
5
0
5
0
GPIOR04
GPIOR14
GPIOR24
R/W
R/W
R/W
4
0
4
0
4
0
GPIOR03
GPIOR13
GPIOR23
R/W
R/W
R/W
3
0
3
0
3
0
GPIOR02
GPIOR12
GPIOR22
R/W
R/W
R/W
2
0
2
0
2
0
GPIOR01
GPIOR11
GPIOR21
R/W
R/W
R/W
1
0
1
0
1
0
GPIOR00
GPIOR10
GPIOR20
R/W
R/W
R/W
0
0
0
0
0
0
8209D–AVR–11/10
GPIOR0
GPIOR1
GPIOR2

Related parts for ATmega16M1