Rev. 1.50 132 August 28, 2017 Rev. 1.50 133 August 28, 2017
HT66F0175/HT66F0185
A/D Flash MCU with EEPROM
HT66F0175/HT66F0185
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 Undenedbits
Thesebitscanbereadorwrittenbytheapplicationprogram.
Bit5 CKPOLB:SPIclocklinebaseconditionselection
0:TheSCKlinewillbehighwhentheclockisinactive.
1:TheSCKlinewillbelowwhentheclockisinactive.
TheCKPOLBbitdeterminesthebaseconditionoftheclockline,ifthebitishigh,
thentheSCKlinewillbelowwhentheclockisinactive.WhentheCKPOLBbitis
low,thentheSCKlinewillbehighwhentheclockisinactive.
Bit4 CKEG:SPISCKclockactiveedgetypeselection
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:LSBrst
1:MSBrst
Thisisthedatashiftselectbitandisusedtoselecthowthedataistransferred,either
MSBorLSBrst.SettingthebithighwillselectMSBrstandlowforLSBrst.
Bit2 CSEN:SPISCSpincontrol
0:Disable
1:Enable
TheCSENbitisusedasanenable/disablefortheSCSpin.Ifthisbitislow,thenthe
SCSpinwillbedisabledandplacedintoaoatingcondition.Ifthebitishigh,theSCS
pinwillbeenabledandusedasaselectpin.
Bit1 WCOL:SPIwritecollisionag
0:Nocollision
1:Collision
TheWCOLagisusedtodetectwhetheradatacollisionhasoccurredornot.Ifthis
bitishigh,itmeansthatdatahasbeenattemptedtobewrittentotheSIMDregister
dutingadatatransferoperation.Thiswritingoperationwillbeignoredifdataisbeing
transferred.Thisbitcanbeclearedbytheapplicationprogram.
Bit0 TRF:SPITransmit/Receivecompleteag
0:SPIdataisbeingtransferred
1:SPIdatatransferiscompleted
TheTRFbitistheTransmit/ReceiveCompleteagandissetto1automaticallywhen
anSPIdatatransferiscompleted,butmustclearedto0bytheapplicationprogram.It
canbeusedtogenerateaninterrupt.