| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
HT82B42R bảng dữ liệu(PDF) 64 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT82B42R bảng dữ liệu(HTML) 64 Page - Holtek Semiconductor Inc |
|
64 / 86 page ![]() Rev. 1.00 64 October 27, 2011 Rev. 1.00 65 October 27, 2011 HT82B42R/HT82B42RE I/O MCU with USB Interface SPI Operation Allcommunicationiscarriedoutusingthe4-lineinterfaceforeitherMasterorSlaveMode. TheCSENbitintheSBCRregistercontrolstheoverallfunctionoftheSPIinterface.Settingthis bithighwillenabletheSPIinterfacebyallowingtheSCSlinetobeactive,whichcanthenbe usedtocontroltheSPIinterface.IftheCSENbitislow,theSPIinterfacewillbedisabledand theSCSlinewillbeinafloatingconditionandcanthereforenotbeusedforcontroloftheSPI interface.TheSBENbitintheSBCRregistermustalsobehighwhichwillplacetheSDIlineina floatingconditionandtheSDOlinehigh.IfinMasterModetheSCKlinewillbeeitherhighorlow dependingupontheclockpolarityselectionbitSPI_CPOLintheSPIRregister.IfinSlaveModethe SCKlinewillbeinafloatingcondition.IfSBENislowthenthebuswillbedisabledandSCS,SDI, SDOandSCKwillallbeinafloatingcondition. IntheMasterModetheMasterwillalwaysgeneratetheclocksignal.Theclockanddata transmissionwillbeinitiatedafterdatahasbeenwrittenintotheSBDRregister.IntheSlaveMode, theclocksignalwillbereceivedfromanexternalmasterdeviceforbothdatatransmissionand reception.ThefollowingsequencesshowtheordertobefollowedfordatatransferinbothMaster andSlaveMode: Master Mode: • Step1 SelecttheclocksourceusingtheCKSbitintheSBCRcontrolregister • Step2 SetuptheM0andM1bitsintheSBCRcontrolregistertoselecttheMasterModeandtherequired Baudrate.Valuesof00,01or10canbeselected. • Step3 SetuptheCSENbitandsetuptheMLSbittochooseifthedataisMSBorLSBfirst,thismustbe sameastheSlavedevice. • Step4 SetuptheSBENbitintheSBCRcontrolregistertoenabletheSPIinterface. • Step5 Forwriteoperations:writethedatatotheSBDRregister,whichwillactuallyplacethedatainto theTXRXbuffer.ThenusetheSCKandSCSlinestooutputthedata.Afterthisgotostep6. Forreadoperations:thedatatransferredinontheSDIlinewillbestoredintheTXRXbufferuntil allthedatahasbeenreceivedatwhichpointitwillbelatchedintotheSBDRregister. • Step6 ChecktheWCOLbitifsethighthenacollisionerrorhasoccurredsoreturntostep5.Ifequalto zerothengotothefollowingstep. • Step7 ChecktheTRFbitorwaitforaSPIserialbusinterrupt. • Step8 ReaddatafromtheSBDRregister. • Step9 ClearTRF. • Step10 Gotostep5. |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |