| Electronic Components Datasheet Search |
|
HT46R004 Datasheet(PDF) 48 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT46R004 Datasheet(HTML) 48 Page - Holtek Semiconductor Inc |
|
48 / 84 page ![]() Rev. 1.30 48 �an�a�� ��� �01� Rev. 1.30 4� �an�a�� ��� �01� HT46R004 Cost-Effective A/D 8-Bit OTP MCU 7+1 Mode PWM Register for 7+1 Mode PWM Output Control ThePWMoutputsarepin-sharedwiththeI/OpinPA4.TooperateasaPWMoutputandnotas anI/Opin,thecorrectbitsmustbesetintheCTRL0register.Azerovaluemustalsobewrittento thecorrespondingbitintheI/OportcontrolregisterPAC.4toensurethatthecorrespondingPWM outputpinissetasanoutput.Afterthesetwoinitialstepshavebeencarriedout,andofcourse aftertherequiredPWMvaluehasbeenwrittenintothePWMregister,writingahighvalueto thecorrespondingbitintheoutputdataregisterPA.4willenablethePWMdatatoappearonthe pin.WritingazerovaluewilldisablethePWMoutputfunctionandforcetheoutputlow.Inthis way,thePortdataoutputregisterscanbeusedasanon/offcontrolforthePWMfunction.Note thatiftheCTRL0registerhasselectedthePWMfunction,butahighvaluehasbeenwrittentoits correspondingbitinthePACcontrolregistertoconfigurethepinasaninput,thenthepincanstill functionasanormalinputline,withpull-highresistoroptions. PWM Programming Example mov a,64h ; set PWM value of decimal 100 mov pwm0,a set ctrl0.5 ; select the 7+1 PWM mode set ctrl0.3 ; select pin PA4 to have a PWM function clr pac.4 ; set pin PA4 as an output set pa.4 ; enable the PWM output : : clr pa.4 ; disable the PWM output_ pin PA4 forced low |
|
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 |