User`s guide
Rev. 1.10 100 November 14, 2014 Rev. 1.10 101 November 14, 2014
HT66FW2230
Wireless Charger A/D Flash 8-Bit MCU
I
2
C Time-out Control
InordertoreducetheproblemofI
2
Clockupduetoreceptionoferroneousclocksources,atime-out
functionisprovided.IftheclocksourcetotheI
2
Cisnotreceivedthenafteraxedtimeperiod,the
I
2
Ccircuitryandregisterswillbereset.
Thetime-outcounterstartscountingonanI
2
Cbus“START”&“addressmatch”condition,and
isclearedbyanSCLfallingedge.BeforethenextSCLfallingedgearrives,ifthetimeelapsedis
greaterthanthetime-outsetupbytheI2CTOCregister,thenatime-outconditionwilloccur.The
time-outfunctionwillstopwhenanI
2
C“STOP”conditionoccurs.
WhenanI
2
Ctime-outcounteroverflowoccurs,thecounterwillstopandtheI2CTOENbitwill
beclearedtozeroandtheI2CTOFbitwillbesethightoindicatethatatime-outconditionhas
occurred.Thetime-outconditionwillalsogenerateaninterruptwhichusestheI
2
Cinterruptvector.
WhenanI
2
Ctime-outoccurs,theI
2
Cinternalcircuitrywillberesetandtheregisterswillbereset
intothefollowingcondition:
Register After I
2
C Time-out
IICD, IICA, IICC0 No change
IICC1 Reset to POR condition
I
2
C Registers After Time-out
TheI2CTOFagcanbeclearedbytheapplicationprogram.Thereare64time-outperiodswhich
canbeselectedusingbitsintheI2CTOCregister.Thetime-outtimeisgivenbytheformula:
((1~64)×32)/f
SUB
.
Thisgivesarangeofabout1msto64ms.NotealsothattheLIRCoscillatoriscontinuouslyenabled.
I2CTOC Register
Bit 7 6 5 4 3 2 1 0
Name I2CTOEN I2CTOF I2CTOS5 I2CTOS4 I2CTOS3 I2CTOS2 I2CTOS1 I2CTOS0
R/W R/W R/W R/W R/W R/W R/W R/W R/W
POR 0 0 0 0 0 0 0 0
Bit7 I2CTOEN:I
2
CTime-outControl
0:disable
1:enable
Bit6 I2CTOF:Time-outag(setbytime-outandclearbysoftware)
0:notime-out
1:time-outoccurred
Bit5~0 I2CTOS5~I2CTOS0:Time-outDenition
I
2
Ctime-outclocksourceisf
SUB
/32.
I
2
Ctime-outtimeisgivenby:([I2CTOS5:I2CTOS0]+1)×(32/f
SUB
)