Rev. 2.50 188 June 22, 2017 Rev. 2.50 189 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
• SIMC2 Register
Bit 7 6 5 4 3 2 1 0
Name
D7 D6 CKPOLB CKEG MLS CSEN WCOL TRF
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~6 Undenedbit
Thisbitcanbereadorwrittenbyusersoftwareprogram.
Bit5 CKPOLB:Determinesthebaseconditionoftheclockline
0:TheSCKlinewillbehighwhentheclockisinactive
1:TheSCKlinewillbelowwhentheclockisinactive
TheCKPOLBbitdeterminesthebaseconditionoftheclockline,ifthebitishigh,
thentheSCKlinewillbelowwhentheclockisinactive.WhentheCKPOLBbitis
low,thentheSCKlinewillbehighwhentheclockisinactive.
Bit4 CKEG:DeterminesSPISCKactiveclockedgetype
CKPOLB=0
0:SCKishighbaselevelanddatacaptureatSCKrisingedge
1:SCKishighbaselevelanddatacaptureatSCKfallingedge
CKPOLB=1
0:SCKislowbaselevelanddatacaptureatSCKfallingedge
1:SCKislowbaselevelanddatacaptureatSCKrisingedge
TheCKEGandCKPOLBbitsareusedtosetupthewaythattheclocksignaloutputs
andinputsdataontheSPIbus.Thesetwobitsmustbeconguredbeforedatatransfer
isexecutedotherwiseanerroneousclockedgemaybegenerated.TheCKPOLBbit
determinesthebaseconditionoftheclockline,ifthebitishigh,thentheSCKline
willbelowwhentheclockisinactive.WhentheCKPOLBbitislow,thentheSCK
linewillbehighwhentheclockisinactive.TheCKEGbitdeterminesactiveclock
edgetypewhichdependsupontheconditionofCKPOLBbit.
Bit3 MLS:SPIDatashiftorder
0:LSB
1:MSB
Thisisthedatashiftselectbitandisusedtoselecthowthedataistransferred,either
MSBorLSBrst.SettingthebithighwillselectMSBrstandlowforLSBrst.
Bit2 CSEN:SPISCSpinControl
0:Disable
1:Enable
TheCSENbitisusedasanenable/disablefortheSCSpin.Ifthisbitislow,thenthe
SCSpinwillbedisabledandplacedintoaoatingcondition.IfthebitishightheSCS
pinwillbeenabledandusedasaselectpin.
NotethatusingtheCSENbitcanbedisabledorenabledviacongurationoption.
Bit1 WCOL:SPIWriteCollisionag
0:Nocollision
1:Collision
TheWCOLagisusedtodetectifadatacollisionhasoccurred.Ifthisbitishighit
meansthatdatahasbeenattemptedtobewrittentotheSIMDregisterduringadata
transferoperation.Thiswritingoperationwillbeignoredifdataisbeingtransferred.
Thebitcanbeclearedbytheapplicationprogram.NotethatusingtheWCOLbitcan
bedisabledorenabledviacongurationoption.
Bit0 TRF:SPITransmit/ReceiveCompleteag
0:Dataisbeingtransferred
1:SPIdatatransmissioniscompleted
TheTRFbitistheTransmit/ReceiveCompleteagandisset1automaticallywhen
anSPIdatatransmissioniscompleted,butmustsetto0bytheapplicationprogram.It
canbeusedtogenerateaninterrupt.