AT90PWM81 Atmel Corporation, AT90PWM81 Datasheet - Page 24

no-image

AT90PWM81

Manufacturer Part Number
AT90PWM81
Description
Manufacturer
Atmel Corporation
Datasheet

Specifications of AT90PWM81

Flash (kbytes)
8 Kbytes
Pin Count
20
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
Hardware Qtouch Acquisition
No
Max I/o Pins
20
Ext Interrupts
3
Usb Speed
No
Usb Interface
No
Spi
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
11
Adc Resolution (bits)
10
Adc Speed (ksps)
125
Analog Comparators
3
Resistive Touch Screen
No
Dac Channels
1
Dac Resolution (bits)
10
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
0.25
Eeprom (bytes)
512
Self Program Memory
YES
Dram Memory
No
Nand Interface
No
Picopower
No
Temp. Range (deg C)
-40 to 125
I/o Supply Class
2.7 to 5.5
Operating Voltage (vcc)
2.7 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
1
Output Compare Channels
8
Input Capture Channels
1
Pwm Channels
6
32khz Rtc
No
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT90PWM81-16MF
Manufacturer:
Atmel
Quantity:
3 118
Part Number:
AT90PWM81-16MN
Manufacturer:
Atmel
Quantity:
2 446
Part Number:
AT90PWM81-16SF
Manufacturer:
Atmel
Quantity:
2 428
Part Number:
AT90PWM81-16SN
Manufacturer:
Atmel
Quantity:
1 500
4.4.1
24
AT90PWM81
Code examples
The following code examples show one assembly and one C function for writing to the EEPROM. The
examples assume that interrupts are controlled (e.g. by disabling interrupts globally) so that no interrupts
will occur during execution of these functions. The examples also assume that no Flash Boot Loader is
present in the software. If such code is present, the EEPROM write function must also wait for any ongo-
ing SPM command to finish.
Assembly Code Example
C Code Example
EEPROM_write:
void EEPROM_write (unsigned int uiAddress, unsigned char ucData)
{
}
; Wait for completion of previous write
sbic EECR,EEWE
rjmp EEPROM_write
; Set up address (r18:r17) in address register
out EEARH, r18
out EEARL, r17
; Write data (r16) to data register
out EEDR,r16
; Write logical one to EEMWE
sbi EECR,EEMWE
; Start eeprom write by setting EEWE
sbi EECR,EEWE
ret
/* Wait for completion of previous write */
while(EECR & (1<<EEWE))
/* Set up address and data registers */
EEAR = uiAddress;
EEDR = ucData;
/* Write logical one to EEMWE */
EECR |= (1<<EEMWE);
/* Start eeprom write by setting EEWE */
EECR |= (1<<EEWE);
;
7734P–AVR–08/10

Related parts for AT90PWM81