ATTINY261A-PU Atmel, ATTINY261A-PU Datasheet - Page 81
ATTINY261A-PU
Manufacturer Part Number
ATTINY261A-PU
Description
IC, MCU, 8BIT, 2K FLASH, 20PDIP
Manufacturer
Atmel
Datasheet
1.ATTINY461A-MU.pdf
(292 pages)
Specifications of ATTINY261A-PU
Controller Family/series
ATtiny
No. Of I/o's
16
Eeprom Memory Size
128Byte
Ram Memory Size
128Byte
Cpu Speed
20MHz
No.
RoHS Compliant
Core Size
8bit
Program Memory Size
2KB
Oscillator Type
External, Internal
Rohs Compliant
Yes
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
ATTINY261A-PU
Manufacturer:
Atmel
Quantity:
1 462
- Current page: 81 of 292
- Download datasheet (9Mb)
11.9.1
8197B–AVR–01/10
Reusing the temporary high byte register
The following code examples show how to do an atomic write of the TCNT0H/L register con-
tents. Writing any of the OCR0A/B 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 TCNT0H/L.
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.
Assembly Code Example
TIM0_WriteTCNT0:
C Code Example
void TIM0_WriteTCNT0( unsigned int i )
{
}
; Save global interrupt flag
in r18,SREG
; Disable interrupts
cli
; Set TCNT0 to r17:r16
out TCNT0H,r17
out TCNT0L,r16
; Restore global interrupt flag
out SREG,r18
ret
unsigned char sreg;
/* Save global interrupt flag */
sreg = SREG;
/* Disable interrupts */
_CLI();
/* Set TCNT0 to i */
TCNT0H = (i >> 8);
TCNT0L = (unsigned char)i;
/* Restore global interrupt flag */
SREG = sreg;
See
“Code Examples” on page
6.
81
Related parts for ATTINY261A-PU
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Manufacturer:
Atmel Corporation
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ IND 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ IND 20-SOIC
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ IND 20-DIP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ IND 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ IND 20-DIP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ COM 20-SOIC
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ IND 20-SOIC
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
ID MCU AVR 2K 5V 16MHZ 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
Microcontrollers (MCU) AVR 2K FLASH 128B EE 128B SRAM ADC
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ COM 32-QFN
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
IC AVR MCU 2K 16MHZ COM 20-DIP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
ID MCU AVR 2K 5V 16MHZ 20-DIP
Manufacturer:
Atmel
Datasheet:
Part Number:
Description:
ID MCU AVR 2K 5V 16MHZ 20-SOIC
Manufacturer:
Atmel
Datasheet: