ATTINY40-MMHR Atmel, ATTINY40-MMHR Datasheet - Page 68
![no-image](/images/manufacturer_photos/0/0/78/atmel_sml.jpg)
ATTINY40-MMHR
Manufacturer Part Number
ATTINY40-MMHR
Description
MCU AVR 4KB FLASH 12MHZ 3X3 QFN
Manufacturer
Atmel
Series
AVR® ATtinyr
Datasheet
1.ATTINY40-MMHR.pdf
(216 pages)
Specifications of ATTINY40-MMHR
Core Processor
AVR
Core Size
8-Bit
Speed
12MHz
Connectivity
I²C, SPI
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
18
Program Memory Size
4KB (2K x 16)
Program Memory Type
FLASH
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 12x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
*
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 68 of 216
- Download datasheet (7Mb)
11.5.1
11.5.2
11.5.3
68
ATtiny40
Force Output Compare
Compare Match Blocking by TCNT0 Write
Using the Output Compare Unit
Figure 11-3 on page 68
Figure 11-3. Output Compare Unit, Block Diagram
The OCR0x Registers are double buffered when using any of the Pulse Width Modulation
(PWM) modes. For the normal and Clear Timer on Compare (CTC) modes of operation, the dou-
ble buffering is disabled. The double buffering synchronizes the update of the OCR0x Compare
Registers to either top or bottom of the counting sequence. The synchronization prevents the
occurrence of odd-length, non-symmetrical PWM pulses, thereby making the output glitch-free.
The OCR0x Register access may seem complex, but this is not case. When the double buffering
is enabled, the CPU has access to the OCR0x Buffer Register, and if double buffering is dis-
abled the CPU will access the OCR0x directly.
In non-PWM waveform generation modes, the match output of the comparator can be forced by
writing a one to the Force Output Compare (0x) bit. Forcing Compare Match will not set the
OCF0x Flag or reload/clear the timer, but the OC0x pin will be updated as if a real Compare
Match had occurred (the COM0x[1:0] bits settings define whether the OC0x pin is set, cleared or
toggled).
All CPU write operations to the TCNT0 Register will block any Compare Match that occur in the
next timer clock cycle, even when the timer is stopped. This feature allows OCR0x to be initial-
ized to the same value as TCNT0 without triggering an interrupt when the Timer/Counter clock is
enabled.
Since writing TCNT0 in any mode of operation will block all Compare Matches for one timer
clock cycle, there are risks involved when changing TCNT0 when using the Output Compare
Unit, independently of whether the Timer/Counter is running or not. If the value written to TCNT0
bottom
FOCn
top
OCRnx
shows a block diagram of the Output Compare unit.
Waveform Generator
WGMn1:0
=
(8-bit Comparator )
DATA BUS
COMnX1:0
TCNTn
OCFnx (Int.Req.)
OCnx
8263A–AVR–08/10
Related parts for ATTINY40-MMHR
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATtiny40](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![ATTINY40-SU](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC MCU AVR 4K FLASH 20SOIC
Manufacturer:
Atmel
Datasheet:
![ATTINY40-XU](/photos/39/70/397036/tssop20_tmb.jpg)
Part Number:
Description:
IC MCU AVR 4K FLASH 20TSSOP
Manufacturer:
Atmel
Datasheet:
![ATTINY40-SUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC MCU AVR 4K FLASH 20SOIC
Manufacturer:
Atmel
Datasheet:
![ATTINY40-XUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC MCU AVR 4K FLASH 20TSSOP
Manufacturer:
Atmel
Datasheet:
![ATTINY40-MMH](/photos/30/99/309923/qfn-20_tmb.jpg)
Part Number:
Description:
IC MCU AVR 4KB FLASH 12MHZ 20QFN
Manufacturer:
Atmel
Datasheet:
![ATtiny4](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![ATTINY4-MAH](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
Microcontrollers (MCU) 512B FL 32B SRAM TIMER ATTINY4 12MHz
Manufacturer:
Atmel
![ATTINY4-TSHR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC MCU AVR 512B FLASH SOT-23-6
Manufacturer:
Atmel
Datasheet:
![ATTINY4-TS8R](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
IC MCU AVR 512B FLASH SOT-23-6
Manufacturer:
Atmel
Datasheet:
![ATSTK600](/photos/9/20/92038/atstk600_tmb.jpg)
Part Number:
Description:
DEV KIT FOR AVR/AVR32
Manufacturer:
Atmel
Datasheet:
![U641B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
![U4082B](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet: