Rev. 1.20
116
�an�a�� 2�� 201�
Rev. 1.20
117
�an�a�� 2�� 201�
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
BS82B12A-3/BS82C16A-3/BS82D20A-3
Touch Key 8-Bit Flash MCU with LED/LCD Driver
I
2
C Time-out Control
In order to reduce the problem of I
2
C lockup due to reception of erroneous clock sources, a time-out
function is provided. If the clock source to the I
2
C is not received for a while, then the I
2
C circuitry
and registers will be reset after a certain time-out period
.
The time-out counter starts counting on an
I
2
C bus "START" & "address match" condition, and is cleared by an SCL falling edge. Before the
next SCL falling edge arrives, if the time elapsed is greater than the time-out setup by the I2CTOC
register, then a time-out condition will occur. The time-out function will stop when an I
2
C "STOP"
condition occurs.
I C t i m e - o u t
c o u n t e r s t a r t
I C t i m e - o u t c o u n t e r r e s e t
o n S C L n e g a t i v e t r a n s i t i o n
1
0
1
0
0
1
0
0
1
0
0
1
0
1
0
1
1
S C L
S t a r t
S D A
I I C S R W
A C K
S t o p
S C L
S D A
S l a v e A d d r e s s
2
2
I
2
C Time-out
When an I
2
C time-out counter overflow occurs, the counter will stop and the I2CTOEN bit will be
cleared to zero and the I2CT
O
F bit will be set high to indicate that a time-out condition as occurred.
The time-out condition will also generate an interrupt which uses the I
2
C interrrupt vector. When
an I
2
C time-out occurs, the I
2
C
i
nternal circuitry will be reset and the registers will be reset into the
following condition:
Register
After I
2
C Time-out
IICD� IICA� IICC0
No change
IICC1
Reset to POR condition
I
2
C Registers After Time-out
The I2CTOF flag can be cleared by the application program. There are 64 time-out periods which
can
be
selected using bits in the I2CTOC register. The time-out time is given by the formula:
((1~64) × 32) / f
SUB
This gives a range of about 1ms to 64ms.
Содержание BS82B12A-3
Страница 33: ...Rev 1 20 33 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 34: ...Rev 1 20 34 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...
Страница 35: ...Rev 1 20 35 January 23 2015 BS82B12A 3 BS82C16A 3 BS82D20A 3 Touch Key 8 Bit Flash MCU with LED LCD Driver ...