| Electronic Components Datasheet Search |
|
HT66F019 Datasheet(PDF) 120 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT66F019 Datasheet(HTML) 120 Page - Holtek Semiconductor Inc |
|
120 / 175 page ![]() Rev. 1.00 1�0 De�e��e� 01� �01� Rev. 1.00 1�1 De�e��e� 01� �01� HT66F019 A/D Flash MCU with EEPROM HT66F019 A/D Flash MCU with EEPROM SPI Bus Enable/Disable ToenabletheSPIbus,setCSEN=1andSCS=0,thenwaitfordatatobewrittenintotheSIMD (TXRXbuffer)register.FortheMasterMode,afterdatahasbeenwrittentotheSIMD(TXRX buffer)register,thentransmissionorreceptionwillstartautomatically.Whenallthedatahasbeen transferred,theTRFbitshouldbeset.FortheSlaveMode,whenclockpulsesarereceivedonSCK, dataintheTXRXbufferwillbeshiftedoutordataonSDIwillbeshiftedin. WhentheSPIbusisdisabled,SCK,SDI,SDOandSCScanbecomeI/Opinsorotherpin-shared functionsusingthecorrespondingcontrolbits. SPI Operation Allcommunicationiscarriedoutusingthe4-lineinterfaceforeitherMasterorSlaveMode. TheCSENbitintheSIMC2registercontrolstheoverallfunctionoftheSPIinterface.Settingthis bithighwillenabletheSPIinterfacebyallowingtheSCSlinetobeactive,whichcanthenbeused tocontroltheSPIinterface.IftheCSENbitislow,theSPIinterfacewillbedisabledandtheSCS linewillbeinafloatingconditionandcanthereforenotbeusedforcontroloftheSPIinterface. IftheCSENbitandtheSIMENbitintheSIMC0aresethigh,thiswillplacetheSDIlineina floatingconditionandtheSDOlinehigh.IfinMasterModetheSCKlinewillbeeitherhighorlow dependingupontheclockpolarityselectionbitCKPOLBintheSIMC2register.IfinSlaveMode theSCKlinewillbeinafloatingcondition.IftheSIMENbitislow,thenthebuswillbedisabled andSCS,SDI,SDOandSCKwillallbecomeI/Opinsortheotherfunctionsusingthecorresponding controlbits.IntheMasterModetheMasterwillalwaysgeneratetheclocksignal.Theclockand datatransmissionwillbeinitiatedafterdatahasbeenwrittenintotheSIMDregister.IntheSlave Mode,theclocksignalwillbereceivedfromanexternalmasterdeviceforbothdatatransmission andreception.Thefollowingsequencesshowtheordertobefollowedfordatatransferinboth MasterandSlaveMode. Master Mode: • Step1 SelecttheSPIMastermodeandclocksourceusingtheSIM2~SIM0bitsintheSIMC0control register. • Step2 SetuptheCSENbitandsetuptheMLSbittochooseifthedataisMSBorLSBfirst,thissetting mustbethesamewiththeSlavedevices. • Step3 SetuptheSIMENbitintheSIMC0controlregistertoenabletheSPIinterface. • Step4 Forwriteoperations:writethedatatotheSIMDregister,whichwillactuallyplacethedatainto theTXRXbuffer.ThenusetheSCKandSCSlinestooutputthedata.Afterthis,gotostep5. Forreadoperations:thedatatransferredinontheSDIlinewillbestoredintheTXRXbuffer untilallthedatahasbeenreceivedatwhichpointitwillbelatchedintotheSIMDregister. • Step5 ChecktheWCOLbitifsethighthenacollisionerrorhasoccurredsoreturntostep4.Ifequalto zerothengotothefollowingstep. • Step6 ChecktheTRFbitorwaitforaSPIserialbusinterrupt. • Step7 ReaddatafromtheSIMDregister. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |