HT48R02N Holtek Semiconductor, HT48R02N Datasheet - Page 42
HT48R02N
Manufacturer Part Number
HT48R02N
Description
(HT4xR0xx) Small Package 8-Bit OTP MCU
Manufacturer
Holtek Semiconductor
Datasheet
1.HT48R02N.pdf
(71 pages)
- Current page: 42 of 71
- Download datasheet (528Kb)
www.DataSheet4U.com
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
Rev.1.00
PWM Programming Example
The following sample program shows how the PWM0 output is setup and controlled.
mov a,64h
mov pwm0,a
set ctrl0.5
set ctrl0.3
clr pac.4
set pa.4
: :
clr pa.4
; setup PWM value of decimal 100
; select the 7+1 PWM mode
; select pin PA4 to have a PWM function
; setup pin PA4 as an output
; enable the PWM output
; disable the PWM output_ pin
; PA4 forced low
42
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.
HT46R01B/02B/01N/02N
HT48R01B/02B/01N/02N
December 15, 2009
Related parts for HT48R02N
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Ht46r63/ht46c63 -- A/d With Lcd Type 8-bit Mcu
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
Ht6221/ht6222 -- Multi-purpose Encoders
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
Ht6230 -- Infrared Remote Encoder
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
Ht6571 -- Multiple Rs-232 Drivers And Receivers Restricted Products
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
Ps/2 Mouse Controller
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
I/o Ttl Integration
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
Timer
Manufacturer:
Holtek Semiconductor
Datasheet:
Part Number:
Description:
RAM Mapping 64 x16 LCD Controller for I/O C
Manufacturer:
Holtek Semiconductor Inc
Datasheet:
Part Number:
Description:
1/4 to 1/11 Duty VFD Controller
Manufacturer:
Holtek Semiconductor Inc
Datasheet:
Part Number:
Description:
(HT46R51 / HT46R52) A/D Type 8-Bit OTP MCU
Manufacturer:
Holtek Semiconductor
Datasheet:
Part Number:
Description:
A/D Type USB 8-Bit MCU
Manufacturer:
Holtek Semiconductor
Datasheet:
Part Number:
Description:
OTP Encoder
Manufacturer:
Holtek Semiconductor Inc
Datasheet:
Part Number:
Description:
Ht82m98a -- 3-key 3d Usb+ps/2 Mouse Controller
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
Ht82k68e -- Multimedia Keyboard Encoder 8-bit Otp Mcu
Manufacturer:
Holtek Semiconductor Inc.
Datasheet:
Part Number:
Description:
Ht82v732 -- 60ma Audio Power Amp
Manufacturer:
Holtek Semiconductor Inc.
Datasheet: