HT46801N-1 Holtek Semiconductor, HT46801N-1 Datasheet - Page 18

no-image

HT46801N-1

Manufacturer Part Number
HT46801N-1
Description
(HT4xR01x-1) Small Package 8-Bit OTP MCU
Manufacturer
Holtek Semiconductor
Datasheet
www.DataSheet.co.kr
Input/Output Ports and Control Registers
Within the area of Special Function Registers, the port
PA, PB, etc data I/O registers and their associated con-
trol register PAC, PBC, etc play a prominent role. These
registers are mapped to specific addresses within the
Data Memory as shown in the Data Memory table. The
data I/O registers, are used to transfer the appropriate
output or input data on the port. The control registers
specifies which pins of the port are set as inputs and
which are set as outputs. To setup a pin as an input, the
corresponding bit of the control register must be set
high, for an output it must be set low. During program in-
itialisation, it is important to first setup the control regis-
ters to specify which pins are outputs and which are
inputs before reading data from or writing data to the I/O
ports. One flexible feature of these registers is the ability
to directly program single bits using the SET [m].i and
from output to input and vice versa by manipulating spe-
cific bits of the I/O control registers during normal pro-
gram operation is a useful feature of these devices.
Rev.1.00
CLR [m].i instructions. The ability to change I/O pins
CTRL0 Register - HT46R01B-1/HT46R01N-1
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Note:
Name
POR
R/W
Bit
unimplemented, read as 0
PFDCS: PFD clock source selection
PWMSEL: PWM type selection
unimplemented, read as 0
PWMC: I/O or PWM selection
PFDC: I/O or PFD selection
LXTLP: LXT oscillator low power control function
CLKMOD: system clock mode selection
If the PWMn output is selected by the PWMCn bit, the PWM clock source f
from the system clock source f
base and PWM.
0: Timer 0
1: Timer 1
0: 6+2 type
1: 7+1 type
0: I/O or other pin-shared functions
1: PWM
0: I/O
1: PFD
0: LXT oscillator quick start-up mode
1: LXT oscillator low power mode
0: High speed - HIRC oscillator used as system clock
1: Low speed - LXT oscillator used as system clock, HIRC oscillator stopped.
7
PFDCS
R/W
6
0
PWMSEL
R/W
5
0
SYS
. The f
18
4
TP
System Control Registers - CTRL0, CTRL1
These registers are used to provide control over various
internal functions. Some of these include the PFD con-
trol, PWM control, certain system clock options, the LXT
Oscillator low power control, external Interrupt edge trig-
ger type, Watchdog Timer enable function, Time Base
function division ratio, and the LXT oscillator enable
control.
Wake-up Function Register - PAWK
When the microcontroller enters the Sleep Mode, vari-
ous methods exist to wake the device up and continue
with normal operation. One method is to allow a falling
edge on the I/O pins to have a wake-up function. This
register is used to select which Port A I/O pins are used
to have this wake-up function.
Pull-high Registers - PAPU, PBPU
The I/O pins, if configured as inputs, can have internal
pull-high resistors connected, which eliminates the need
for external pull-high resistors. This register selects which
I/O pins are connected to internal pull-high resistors.
clock is the clock source for timer0, timer 1, time
PWMC
R/W
3
0
HT46R01B-1/HT46R01N-1
HT48R01B-1/HT48R01N-1
PFDC
R/W
2
0
TP
LXTLP
R/W
always comes
1
0
June 9, 2011
CLKMOD
R/W
0
0
Datasheet pdf - http://www.DataSheet4U.net/

Related parts for HT46801N-1