Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

HT46R02 Datasheet(PDF) 26 Page - Holtek Semiconductor Inc

Part # HT46R02
Description  10-Pin MSOP A/D Type 8-Bit OTP MCU
PDF  60 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  HOLTEK [Holtek Semiconductor Inc]
Direct Link  http://www.holtek.com
Logo HOLTEK - Holtek Semiconductor Inc

HT46R02 Datasheet(HTML) 26 Page - Holtek Semiconductor Inc

Back Button HT46R02 Datasheet HTML 22Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 23Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 24Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 25Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 26Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 27Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 28Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 29Page - Holtek Semiconductor Inc HT46R02 Datasheet HTML 30Page - Holtek Semiconductor Inc Next Button
Zoom Inzoom in Zoom Outzoom out
 26 / 60 page
background image
HT46R01/HT46R02/HT46R03
Rev. 1.00
26
September 21, 2007
PWM Output Control
The PWM output is pin-shared with the I/O pin PA4. To
operate as a PWM output and not as an I/O pin, the cor-
rect 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 PWM out-
put 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 PWM register, writ-
ing a high value to the corresponding 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 output low. In this way, the
Port A data output register can be used as an on/off con-
trol for the PWM function. Note that if the CTRL0 register
has selected the PWM function, but a high value has
been written to its corresponding 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 100
; decimal which is 64H
mov pwm,a
set ctrl.5
; select the 7+1 PWM mode
set ctrl.3
; select pin PA4 to have a PWM
; function
clr pac.4
; setup pin PA4 as an output
set pa.4
; PD.0=1; enable the PWM
; output
::
clr pa.4
; disable the PWM output
- pin
; PD4 forced low
Analog to Digital Converter
The need to interface to real world analog signals is a
common requirement for many electronic systems.
However, to properly process these signals by a
microcontroller, they must first be converted into digital
signals by A/D converters. By integrating the A/D con-
version electronic circuitry into the microcontroller, the
need for external components is reduced significantly
with the corresponding follow-on benefits of lower costs
and reduced component space requirements.
A/D Overview
Each of the devices contains a 4-channel analog to digi-
tal converter which can directly interface to external an-
alog signals, such as that from sensors or other control
signals and convert these signals directly into either an
8-bit, 9-bit or 12-bit digital value, depending upon which
device is used.
Device
Input
Channels
Conversion
Bits
Input Pins
HT46R01
4
8
PA0~PA3
HT46R02
4
9
PA0~PA3
HT46R03
4
12
PA0~PA3
The following diagram shows the overall internal struc-
ture of the A/D converter, together with its associated
registers.
A D C S o u r c e
f S Y S / 2
¸ N
A C S R R e g i s t e r
A D C
V D D
P A 0 / A N 0
P A 1 / A N 1
P A 2 / A N 2
P A 3 / A N 3
A / D r e f e r e n c e v o l t a g e
A D R
o r
A D R L
A D R H
A / D D a t a
R e g i s t e r s
P C R 0 ~ P C R 2
A D C S 0 ~ A D C S 2
S T A R T E O C
A D C R
R e g i s t e r
P i n C o n f i g u r a t i o n
B i t s
C h a n n e l S e l e c t
B i t s
S t a r t a n d E n d o f
C o n v e r s i o n B i t s
C l o c k D i v i d e R a t i o
A/D Converter Structure



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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