| Electronic Components Datasheet Search |
|
HT45F39 Datasheet(PDF) 55 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45F39 Datasheet(HTML) 55 Page - Holtek Semiconductor Inc |
|
55 / 102 page ![]() Rev. 1.10 54 July 01, 2016 Rev. 1.10 55 July 01, 2016 HT45F39/HT45F391 Ultrasonic Distance Measurement 8-bit Flash MCU HT45F39/HT45F391 Ultrasonic Distance Measurement 8-bit Flash MCU Timer/Counter Mode Toselectthismode,bitsTnM1andTnM0intheTMnC1registershouldbesetto11respectively. TheTimer/CounterModeoperatesinanidenticalwaytotheCompareMatchOutputMode generatingthesameinterruptflags.TheexceptionisthatintheTimer/CounterModetheTMoutput pinisnotused.ThereforetheabovedescriptionandTimingDiagramsfortheCompareMatch OutputModecanbeusedtounderstanditsfunction. PWM Output Mode Toselectthismode,bitsTnM1andTnM0intheTMnC1registershouldbesetto10respectively. ThePWMfunctionwithintheTMisusefulforapplicationswhichrequirefunctionssuchasmotor control,heatingcontrol,illuminationcontroletc.Byprovidingasignaloffixedfrequencybut ofvaryingdutycycleontheTMoutputpin,asquarewaveACwaveformcanbegeneratedwith varyingequivalentDCRMSvalues.AsboththeperiodanddutycycleofthePWMwaveform canbecontrolled,thechoiceofgeneratedwaveformisextremelyflexible.InthePWMmode,the TnCCLRbithasnoeffectonthePWMoperation.BothoftheCCRAandCCRPregistersareused togeneratethePWMwaveform,oneregisterisusedtocleartheinternalcounterandthuscontrol thePWMwaveformfrequency,whiletheotheroneisusedtocontrolthedutycycle.Whichregister isusedtocontroleitherfrequencyordutycycleisdeterminedusingtheTnDPXbitintheTMnC1 register.ThePWMwaveformfrequencyanddutycyclecanthereforebecontrolledbythevalues intheCCRAandCCRPregisters.Aninterruptflag,oneforeachoftheCCRAandCCRP,willbe generatedwhenacomparematchoccursfromeitherComparatorAorComparatorP.TheTnOCbit intheTMnC1registerisusedtoselecttherequiredpolarityofthePWMwaveformwhilethetwo TnIO1andTnIO0bitsareusedtoenablethePWMoutputortoforcetheTMoutputpintoafixed highorlowlevel.TheTnPOLbitisusedtoreversethepolarityofthePWMoutputwaveform. CTM, PWM Mode, Edge-aligned Mode, TnDPX=0 CCRP 001b 010b 011b 100b 101b 110b 111b 000b Period 128 256 384 512 640 768 896 1024 Duty CCRA IffSYS=16MHz,TMclocksourceselectfSYS/4,CCRP=100bandCCRA=128, TheCTMPWMoutputfrequency=(fSYS/4)/512=fSYS/2048=7.8125kHz,duty=128/512=25%. IftheDutyvaluedefinedbytheCCRAregisterisequaltoorgreaterthanthePeriodvalue,thenthe PWMoutputdutyis100%. CTM, PWM Mode, Edge-aligned Mode, TnDPX=1 CCRP 001b 010b 011b 100b 101b 110b 111b 000b Period CCRA Duty 128 256 384 512 640 768 896 1024 ThePWMoutputperiodisdeterminedbytheCCRAregistervaluetogetherwiththeTMclock whilethePWMdutycycleisdefinedbytheCCRPregistervalue. |
|
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 |