![]() |
Electronic Components Datasheet Search |
|
HT46R01B-1 Datasheet(PDF) 42 Page - Holtek Semiconductor Inc |
|
HT46R01B-1 Datasheet(HTML) 42 Page - Holtek Semiconductor Inc |
42 / 71 page ![]() HT46R01B-1/HT46R01N-1 HT48R01B-1/HT48R01N-1 Rev.1.00 42 June 9, 2011 PWM Output Control The PWM outputs are pin-shared with the I/O pins PA4. To operate as a PWM output and not as an I/O pin, the correct bits must be set in the CTRL0 register. A zero value must also be written to the corresponding bit in the I/O port control register PAC.4 to ensure that the corre- sponding PWM output pin is setup as an output. After these two initial steps have been carried out, and of course after the required PWM value has been written into the PWMn register, writing a high value to the corre- sponding bit in the output data register PA.4 will enable the PWM data to appear on the pin. Writing a zero value will disable the PWM output function and force the out- put low. In this way, the Port data output registers can be used as an on/off control for the PWM function. Note that if the CTRL0 register have selected the PWM func- tion, but a high value has been written to its correspond- ing bit in the PAC control register to configure the pin as an input, then the pin can still function as a normal input line, with pull-high resistor options. · PWM Programming Example The following sample program shows how the PWM output is setup and controlled. mov a,64h ; setup 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 ; setup pin PA4 as an output set pa.4 ; enable the PWM output :: clr pa.4 ; disable the PWM output_ pin ; PA4 forced low |
Similar Part No. - HT46R01B-1 |
|
Similar Description - HT46R01B-1 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.COM |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Datasheet Upload | Contact us | Privacy Policy | 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 |