ATTINY861A-XU Atmel, ATTINY861A-XU Datasheet - Page 81

Microcontrollers (MCU) 8K Flash;125B EEPROM 128B SRAM;16 IO Pins

ATTINY861A-XU

Manufacturer Part Number
ATTINY861A-XU
Description
Microcontrollers (MCU) 8K Flash;125B EEPROM 128B SRAM;16 IO Pins
Manufacturer
Atmel
Datasheet

Specifications of ATTINY861A-XU

Core
RISC
Data Bus Width
8 bit
Program Memory Type
Flash
Program Memory Size
8 KB
Data Ram Size
512 B
Interface Type
SPI
Maximum Clock Frequency
20 MHz
Number Of Programmable I/os
16
Operating Supply Voltage
1.8 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
Package / Case
TSSOP-20
Minimum Operating Temperature
- 40 C
Lead Free Status / Rohs Status
 Details

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATTINY861A-XUR
Manufacturer:
IDT
Quantity:
1 300
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 ATTINY861A-XU