ATtiny167 Atmel Corporation, ATtiny167 Datasheet - Page 102
![no-image](/images/manufacturer_photos/0/0/79/atmel_corporation_sml.jpg)
ATtiny167
Manufacturer Part Number
ATtiny167
Description
Manufacturer
Atmel Corporation
Specifications of ATtiny167
Flash (kbytes)
16 Kbytes
Pin Count
20
Max. Operating Frequency
16 MHz
Cpu
8-bit AVR
# Of Touch Channels
8
Hardware Qtouch Acquisition
No
Max I/o Pins
16
Ext Interrupts
16
Usb Speed
No
Usb Interface
No
Spi
2
Twi (i2c)
1
Uart
1
Lin
1
Graphic Lcd
No
Video Decoder
No
Camera Interface
No
Adc Channels
11
Adc Resolution (bits)
10
Adc Speed (ksps)
15
Analog Comparators
1
Resistive Touch Screen
No
Temp. Sensor
Yes
Crypto Engine
No
Sram (kbytes)
0.5
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
1.8 to 5.5
Operating Voltage (vcc)
1.8 to 5.5
Fpu
No
Mpu / Mmu
no / no
Timers
2
Output Compare Channels
3
Input Capture Channels
1
Pwm Channels
9
32khz Rtc
Yes
Calibrated Rc Oscillator
Yes
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ATtiny167-15MZ
Manufacturer:
ATMEL
Quantity:
670
Company:
Part Number:
ATtiny167-A15MZ
Manufacturer:
ATMEL
Quantity:
480
Part Number:
ATtiny167-A15MZ
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Company:
Part Number:
ATtiny167-A15XD
Manufacturer:
BOSCH
Quantity:
40 000
Part Number:
ATtiny167-A15XZ
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
10.11.2
102
ATtiny87/ATtiny167
TCCR0B – Timer/Counter0 Control Register B
• Bits 1:0 – WGM0[1:0]: Waveform Generation Mode
These bits control the counting sequence of the counter, the source for the maximum (TOP)
counter value, and what type of waveform generation to be used, see
operation supported by the Timer/Counter unit are: Normal mode (Counter), Clear Timer on
Compare match (CTC) mode, and two types of Pulse Width Modulation (PWM) modes
”Modes of Operation” on page
Table 10-4.
Notes:
• Bit 7 – FOC0A: Force Output Compare A
The FOC0A bit is only active when the WGM bits specify a non-PWM mode.
However, for ensuring compatibility with future devices, this bit must be set to zero when
TCCR0B is written when operating in PWM mode. When writing a logical one to the FOC0A
bit, an immediate Compare Match is forced on the Waveform Generation unit. The OC0A out-
put is changed according to its COM0A[1:0] bits setting. Note that the FOC0A bit is
implemented as a strobe. Therefore it is the value present in the COM0A[1:0] bits that deter-
mines the effect of the forced compare.
A FOC0A strobe will not generate any interrupt, nor will it clear the timer in CTC mode using
OCR0A as TOP.
The FOC0A bit is always read as zero.
• Bits 6:3 – Res: Reserved Bits
These bits are reserved in the ATtiny87/167 and will always read as zero.
• Bits 2:0 – CS0[2:0]: Clock Select
Bit
0x26 (0x46)
Read/Write
Initial Value
Mode
0
1
2
3
1. MAX = 0xFF,
2. BOTTOM = 0x00.
WGM01
(CTC0)
0
0
1
1
Waveform Generation Mode Bit Description
FOC0A
W
7
0
WGM00
(PWM0)
0
1
0
1
R
6
–
0
92.).
Timer/Counter
Mode of Operation
Normal
PWM, Phase Correct
CTC
Fast PWM
R
5
–
0
R
4
–
0
R
3
–
0
TOP
0xFF
0xFF
OCR0A
0xFF
CS02
R/W
2
0
Update of
OCR0A at
Immediate
TOP
Immediate
TOP
CS01
R/W
1
0
Table
10-4. Modes of
CS00
R/W
0
0
8265B–AVR–09/10
TOV0 Flag
Set on
MAX
BOTTOM
MAX
MAX
TCCR0B
(1)(2)
(See