ATTINY48-MMH Atmel, ATTINY48-MMH Datasheet - Page 93
![MCU AVR 4KB FLASH 12MHZ 28-VQFN](/photos/12/32/123209/28m1-vqfn_sml.jpg)
ATTINY48-MMH
Manufacturer Part Number
ATTINY48-MMH
Description
MCU AVR 4KB FLASH 12MHZ 28-VQFN
Manufacturer
Atmel
Series
AVR® ATtinyr
Specifications of ATTINY48-MMH
Core Processor
AVR
Core Size
8-Bit
Speed
12MHz
Connectivity
I²C, SPI
Peripherals
Brown-out Detect/Reset, POR, WDT
Number Of I /o
24
Program Memory Size
4KB (2K x 16)
Program Memory Type
FLASH
Eeprom Size
64 x 8
Ram Size
256 x 8
Voltage - Supply (vcc/vdd)
1.8 V ~ 5.5 V
Data Converters
A/D 6x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-VQFN Exposed Pad, 28-HVQFN, 28-SQFN, 28-DHVQFN
For Use With
ATAVRDRAGON - KIT DRAGON 32KB FLASH MEM AVR
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
- Current page: 93 of 302
- Download datasheet (9Mb)
12.3.1
12.4
8008G–AVR–04/11
Timer/Counter Clock Sources
Reusing the Temporary High Byte Register
The following code examples show how to do an atomic write of the TCNT1 Register contents.
Writing any of the OCR1A/B or ICR1 Registers can be done by using the same principle.
Note:
The assembly code example requires that the r17:r16 register pair contains the value to be writ-
ten to TCNT1.
If writing to more than one 16-bit register where the high byte is the same for all registers written,
then the high byte only needs to be written once. However, note that the same rule of atomic
operation described previously also applies in this case.
The Timer/Counter can be clocked by an internal or an external clock source. The clock source
is selected by the Clock Select logic which is controlled by the Clock Select (CS1[2:0]) bits
Assembly Code Example
C Code Example
TIM16_WriteTCNT1:
void TIM16_WriteTCNT1( unsigned int i )
{
}
; Save global interrupt flag
in r18,SREG
; Disable interrupts
cli
; Set TCNT1 to r17:r16
out TCNT1H,r17
out TCNT1L,r16
; Restore global interrupt flag
out SREG,r18
ret
unsigned char sreg;
unsigned int i;
/* Save global interrupt flag */
sreg = SREG;
/* Disable interrupts */
_CLI();
/* Set TCNT1 to i */
TCNT1 = i;
/* Restore global interrupt flag */
SREG = sreg;
1.
See ”About Code Examples” on page 7.
For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI”
instructions must be replaced with instructions that allow access to extended I/O. Typically
“LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.
(1)
(1)
ATtiny48/88
93
Related parts for ATTINY48-MMH
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![ATtiny48](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
![ATTINY48-AU](/photos/6/91/69154/313-32-tqfp_tmb.jpg)
Part Number:
Description:
MCU AVR 4K ISP FLASH 1.8V 32TQFP
Manufacturer:
Atmel
Datasheet:
![ATTINY48-MMU](/photos/12/32/123209/28m1-vqfn_tmb.jpg)
Part Number:
Description:
MCU AVR 5K FLASH 12MHZ 28-QFN
Manufacturer:
Atmel
Datasheet:
![ATTINY48-MU](/photos/12/13/121307/attiny48-mu_tmb.jpg)
Part Number:
Description:
MCU AVR 4K ISP FLASH 1.8V 32-QFN
Manufacturer:
Atmel
Datasheet:
![ATTINY48-PU](/photos/7/21/72189/453-28-dip_tmb.jpg)
Part Number:
Description:
MCU AVR 4K ISP FLASH 1.8V 28-DIP
Manufacturer:
Atmel
Datasheet:
![ATTINY48-AUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
MCU AVR 4KB FLASH 12MHZ 32TQFP
Manufacturer:
Atmel
Datasheet:
![ATTINY48-MUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
MCU AVR 4KB FLASH 12MHZ 32QFN
Manufacturer:
Atmel
Datasheet:
![ATTINY48-MMHR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
MCU AVR 4KB FLASH 12MHZ 28QFN
Manufacturer:
Atmel
Datasheet:
![ATTINY48-MMUR](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
8-bit Microcontrollers - MCU 4KB FL,64B EE, 256B SRAM-12MHz
Manufacturer:
Atmel
![ATTINY48-W-11](/images/manufacturer_photos/0/0/78/atmel_tmb.jpg)
Part Number:
Description:
8-bit Microcontrollers - MCU Microcontroller
Manufacturer:
Atmel
![ATtiny4](/images/manufacturer_photos/0/0/79/atmel_corporation_tmb.jpg)
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet: