HT46R52 Holtek Semiconductor, HT46R52 Datasheet - Page 15

no-image

HT46R52

Manufacturer Part Number
HT46R52
Description
(HT46R51 / HT46R52) A/D Type 8-Bit OTP MCU
Manufacturer
Holtek Semiconductor
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HT46R52
Manufacturer:
HOLTEK
Quantity:
35 460
Company:
Part Number:
HT46R52A
Quantity:
1 345
is 0 , the contents of the latches will move to the inter-
nal bus. The latter is possible in the read-modify-write
instruction.
For output function, CMOS is the only configuration.
These control registers are mapped to locations 13H,
15H and 19H.
After a chip reset, these input/output lines remain at high
levels or floating state (dependent on pull-high options).
Each bit of these input/output latches can be set or
cleared by SET [m].i and CLR [m].i (m=12H, 14H or
18H) instructions.
Some instructions first input data and then follow the
output operations. For example, SET [m].i , CLR
[m].i , CPL [m] , CPLA [m] read the entire port states
into the CPU, execute the defined operations
(bit-operation), and then write the results back to the
latches or the accumulator.
Each line of port A has the capability of waking-up the
device. Each I/O port has a pull-high option. Once the
pull-high option is selected, the I/O port has a pull-high
resistor, otherwise, there s none. Take note that a non-
pull-high I/O port operating in input mode will cause a
floating state.
The PA3, PA4 and PA5 are pin-shared with PFD, TMR
and INT pins respectively.
If the PFD option is selected, the output signal in output
mode of PA3 will be the PFD signal generated by the
timer/event counter overflow signal. The input mode al-
ways remain in its original functions. Once the PFD op-
tion is selected, the PFD output signal is controlled by
the PA3 data register only. The I/O functions of PA3 are
shown below.
Note:
The definitions of the PFD control signal and PFD output
frequency are listed in the following table.
Note:
Rev. 1.40
Mode
Timer
PA3
OFF
OFF
I/O
ON
ON
The PFD frequency is the timer/event counter
overflow frequency divided by 2.
counter
timer/event counter
(Normal)
Preload
X stands for unused
U stands for unknown
N is the preload value for the timer/event
f
Logical
TMR
Timer
Value
Input
I/P
X
X
N
N
is the input clock frequency for the
PA3 Data
Register
(Normal)
Logical
Output
0
1
0
1
O/P
PA3 Pad
State
PFD
U
0
0
Logical
(PFD)
Input
I/P
f
INT
Frequency
/(2 (256-N))
(Timer on)
X
X
X
(PFD)
PFD
O/P
15
The PB can also be used as A/D converter inputs. The
A/D function will be described later. There is a PWM
function shared with PD0. If the PWM function is en-
abled, the PWM signal will appear on PD0 (if PD0 is op-
erating in output mode). The I/O functions of PD0 are as
shown.
It is recommended that unused or not bonded out I/O
lines should be set as output pins by software instruction
to avoid consuming power under input floating state.
PWM
The microcontroller provides one channel PWM output
shared with PD0. The PWM supports 6+2 mode. The
PWM channel has their data register denoted as
PWM(1AH). The frequency source of the PWM counter
comes from f
The waveforms of the PWM outputs are as shown.
Once the PD0 are selected as the PWM outputs and the
output function of the PD0 are enabled (PDC.0= 0 ),
writing 1 to PD0 data register will enable the PWM out-
put function and writing 0 will force the PD0 to stay at
A (6+2) bits mode PWM cycle is divided into four modu-
lation cycles (modulation cycle 0~modulation cycle 3).
Each modulation cycle has 64 PWM input clock period.
In a (6+2) bit PWM function, the contents of the PWM
register is divided into two groups. Group 1 of the PWM
register is denoted by DC which is the value of
PWM.7~PWM.2. The group 2 is denoted by AC which is
the value of PWM.1~PWM.0. In a (6+2) bits mode PWM
cycle, the duty cycle of each modulation cycle is shown
in the table.
The modulation frequency, cycle frequency and cycle
duty of the PWM output signal are summarized in the
following table.
f
0 .
SYS
Modulation Frequency
Mode
PD0
I/O
/64 for (6+2) bits mode
Modulation cycle i
Parameter
(i=0~3)
(Normal)
PWM
Logical
SYS
Input
I/P
. The PWM register is an 8-bit register.
(Normal)
Logical
Output
HT46R51/HT46R52
O/P
PWM Cycle
Frequency
AC (0~3)
f
SYS
i<AC
i AC
(PWM)
Logical
/256
Input
I/P
July 12, 2005
PWM Cycle
Duty Cycle
[PWM]/256
DC+1
(PWM)
Duty
PWM
DC
64
64
O/P

Related parts for HT46R52