ATTINY26L8SU SL383 Atmel, ATTINY26L8SU SL383 Datasheet - Page 84

no-image

ATTINY26L8SU SL383

Manufacturer Part Number
ATTINY26L8SU SL383
Description
MCU 8-Bit ATtiny AVR RISC 2KB Flash 3.3V/5V 20-Pin SOIC T/R
Manufacturer
Atmel
Datasheet
USI Control Register – USICR
84
ATtiny26(L)
to the USIOIF bit. Clearing this bit will release the counter overflow hold of SCL in Two-
wire mode.
A counter overflow interrupt will wakeup the processor from Idle sleep mode.
• Bit 5 – USIPF: Stop Condition Flag
When Two-wire mode is selected, the USIPF flag is set (one) when a stop condition is
detected. The flag is cleared by writing a one to this bit. Note that this is not an interrupt
flag. This signal is useful when implementing Two-wire bus master arbitration.
• Bit 4 – USIDC: Data Output Collision
This bit is logical one when bit 7 in the Shift Register differs from the physical pin value.
The flag is only valid when Two-wire mode is used. This signal is useful when imple-
menting Two-wire bus master arbitration.
• Bits 3..0 – USICNT3..0: Counter Value
These bits reflect the current 4-bit counter value. The 4-bit counter value can directly be
read or written by the CPU.
The 4-bit counter increments by one for each clock generated either by the external
clock edge detector, by a Timer/Counter0 overflow, or by software using USICLK or
USITC strobe bits. The clock source depends of the setting of the USICS1..0 bits. For
external clock operation a special feature is added that allows the clock to be generated
by writing to the USITC strobe bit. This feature is enabled by write a one to the USICLK
bit while setting an external clock source (USICS1 = 1).
Note that even when no wire mode is selected (USIWM1..0 = 0) the external clock input
(SCK/SCL) are can still be used by the counter.
The Control Register includes interrupt enable control, wire mode setting, clock select
setting, and clock strobe.
• Bit 7 – USISIE: Start Condition Interrupt Enable
Setting this bit to one enables the Start Condition detector interrupt. If there is a pending
interrupt when the USISIE and the Global Interrupt Enable Flag is set to one, this will
immediately be executed. Refer to the description of “Bit 7 – USISIF: Start Condition
Interrupt Flag” on page 83 for further details.
When Two-wire mode is selected, the USISIF flag is set (to one) when a start condition
is detected. When output disable mode or Three-wire mode is selected and (USICSx =
0b11 & USICLK = 0) or (USICS = 0b10 & USICLK = 0), any edge on the SCK pin sets
the flag.
• Bit 6 – USIOIE: Counter Overflow Interrupt Enable
Setting this bit to one enables the Counter Overflow interrupt. If there is a pending inter-
rupt when the USIOIE and the Global Interrupt Enable Flag is set to one, this will
immediately be executed. Refer to the description of “Bit 6 – USIOIF: Counter Overflow
Interrupt Flag” on page 83 for further details.
Bit
$0D ($2D)
Read/Write
Initial Value
USISIE
R/W
7
0
USIOIE
R/W
6
0
USIWM1
R/W
5
0
USIWM0
R/W
4
0
USICS1
R/W
3
0
USICS0
R/W
2
0
USICLK
W
1
0
USITC
1477J–AVR–06/07
W
0
0
USICR

Related parts for ATTINY26L8SU SL383