Rev. 2.50 198 June 22, 2017 Rev. 2.50 199 June 22, 2017
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
HT66F20/HT66F30/HT66F40/HT66F50/HT66F60
HT66FU30/HT66FU40/HT66FU50/HT66FU60
A/D Flash MCU with EEPROM
I
2
C Bus Read/Write Signal
TheSRWbitintheSIMC1registerdeneswhethertheslavedevicewishestoreaddatafromthe
I
2
CbusorwritedatatotheI
2
Cbus.Theslavedeviceshouldexaminethisbittodetermineifitisto
beatransmitterorareceiver.IftheSRWagis1thenthisindicatesthatthemasterdevicewishesto
readdatafromtheI
2
Cbus,thereforetheslavedevicemustbesetuptosenddatatotheI
2
Cbusasa
transmitter.IftheSRWagis0thenthisindicatesthatthemasterwishestosenddatatotheI
2
Cbus,
thereforetheslavedevicemustbesetuptoreaddatafromtheI
2
Cbusasareceiver.
I
2
C Bus Slave Address Acknowledge Signal
Afterthemasterhastransmittedacallingaddress,anyslavedeviceontheI
2
Cbus,whose
owninternaladdressmatchesthecallingaddress,mustgenerateanacknowledgesignal.The
acknowledgesignalwillinformthemasterthataslavedevicehasaccepteditscallingaddress.Ifno
acknowledgesignalisreceivedbythemasterthenaSTOPsignalmustbetransmittedbythemaster
toendthecommunication.WhentheHAASagishigh,theaddresseshavematchedandtheslave
devicemustchecktheSRWagtodetermineifitistobeatransmitterorareceiver.IftheSRWag
ishigh,theslavedeviceshouldbesetuptobeatransmittersotheHTXbitintheSIMC1register
shouldbesetto"1".IftheSRWagislow,thenthemicrocontrollerslavedeviceshouldbesetupas
areceiverandtheHTXbitintheSIMC1registershouldbesetto"0".
I
2
C Bus Data and Acknowledge Signal
Thetransmitteddatais8-bitswideandistransmittedaftertheslavedevicehasacknowledged
receiptofitsslaveaddress.TheorderofserialbittransmissionistheMSBrstandtheLSBlast.
Afterreceiptof8-bitsofdata,thereceivermusttransmitanacknowledgesignal,level0,beforeit
canreceivethenextdatabyte.Iftheslavetransmitterdoesnotreceiveanacknowledgebitsignal
fromthemasterreceiver,thentheslavetransmitterwillreleasetheSDAlinetoallowthemaster
tosendaSTOPsignaltoreleasetheI
2
CBus.ThecorrespondingdatawillbestoredintheSIMD
register.Ifsetupasatransmitter,theslavedevicemustrstwritethedatatobetransmittedintothe
SIMDregister.Ifsetupasareceiver,theslavedevicemustreadthetransmitteddatafromtheSIMD
register.
Whentheslavereceiverreceivesthedatabyte,itmustgenerateanacknowledgebit,knownas
TXAK,onthe9thclock.Theslavedevice,whichissetupasatransmitterwillchecktheRXAKbit
intheSIMC1registertodetermineifitistosendanotherdatabyte,ifnotthenitwillreleasethe
SDAlineandawaitthereceiptofaSTOPsignalfromthemaster.