ATtiny40 Atmel Corporation, ATtiny40 Datasheet - Page 25

no-image

ATtiny40

Manufacturer Part Number
ATtiny40
Description
Manufacturer
Atmel Corporation
Datasheets

Specifications of ATtiny40

Flash (kbytes)
4 Kbytes
Pin Count
20
Max. Operating Frequency
12 MHz
Cpu
8-bit AVR
# Of Touch Channels
12
Hardware Qtouch Acquisition
Yes
Max I/o Pins
18
Ext Interrupts
18
Usb Speed
No
Usb Interface
No
Spi
1
Twi (i2c)
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
12
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
0.25
Self Program Memory
NO
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
2
Output Compare Channels
4
Input Capture Channels
1
Pwm Channels
2
32khz Rtc
No
Calibrated Rc Oscillator
Yes

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ATtiny40-MMHR
Quantity:
6 000
6.5.3
8263A–AVR–08/10
OSCCAL – Oscillator Calibration Register
requirements. As the prescaler divides the master clock input to the MCU, the speed of all syn-
chronous peripherals is reduced accordingly. The division factors are given in
Table 6-4.
To avoid unintentional changes of clock frequency, a protected change sequence must be fol-
lowed to change the CLKPS bits:
At start-up, the CLKPS bits will be reset to 0b0011 to select the clock division factor of 8. The
application software must ensure that a sufficient division factor is chosen if the selected clock
source has a higher frequency than the maximum frequency of the device at the present operat-
ing conditions.
.
• Bits 7:0 – CAL[7:0]: Oscillator Calibration Value
The oscillator calibration register is used to trim the calibrated internal oscillator and remove pro-
cess variations from the oscillator frequency. A pre-programmed calibration value is
automatically written to this register during chip reset, giving the factory calibrated frequency as
specified in
Bit
0x39
Read/Write
Initial Value
1. Write the signature for change enable of protected I/O register to register CCP
2. Within four instruction cycles, write the desired value to CLKPS bits
CLKPS3
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
Table 21-2, “Calibration Accuracy of Internal RC Oscillator,” on page
CAL7
Clock Prescaler Select
R/W
7
0
CLKPS2
CAL6
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
R/W
6
0
CAL5
R/W
5
0
CLKPS1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
CAL4
R/W
4
0
CAL3
R/W
3
0
CLKPS0
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
CAL2
R/W
2
0
CAL1
R/W
1
0
Clock Division Factor
CAL0
R/W
0
0
8 (default)
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
Reserved
128
256
16
32
64
Table
1
2
4
OSCCAL
167.
6-4.
25

Related parts for ATtiny40