
W53322/W53342
- 22 -
hardware. The HCF can be read out by the MOVA R, HCFL
and MOVA R, HCFH instructions. When any of the HCF bits
is "1," the hold mode will be released and the HOLD instruction is invalid. The HCF can be reset by the CLR
EVFL/EVFH,#I (EVF.n = 0) When EVF.n or HEF.n have been reset, the corresponding bit of HCF is reset simultaneously
by hardware. The bit descriptions are as follows:
2
3
HCF
Speech
X
TM1
RC
RD
Melody
0
1
7
6
5
4
HCFH
HCFL
DIV
TM0
HCF.0 = 1 Hold mode was released by overflow from the Divider.
HCF.1 = 1 Hold mode was released by underflow from the Timer 0.
HCF.2 = 1 Hold mode was released by a state change on port RC
HCF.3 = 1 Hold mode was released by a state change on port RD
HCF.4 reserved
HCF.5 = 1 Hold mode was released by speech play ending with SPC_busy falling edge
HCF.6 = 1 Hold mode was released by melody play ending with MLD_busy falling edge
HCF.7 = 1 Hold mode was released by underflow from the Timer 1
All bits are read only by user and set/clear by chip hardware.
Input/Output Ports RA, RB
Port RA consists of pins RA0 to RA3 and port RB consists of pins RB0 to RB3. At initial reset, input/output ports RA and
RB are both in input mode. When RA and RB are used as output ports, CMOS or NMOS open drain output type can be
selected by the PM0 special register. Each pin of port RA or RB can be specified as input or output mode independently
by the PM1 and PM2 special registers. The MOVA R, PORTA or MOVA R, RORTB instructions operate the input
functions and the MOV PORTA, R or MOV PORTB, R operate the output functions. For more details, refer to the
instruction table and Figure 10
Port Mode 0 Register (PM0 with SR=32H)
The port mode 0 register is organized as a 4-bit binary register (PM0.0 to PM0.3). PM0 can be used to determine the
structure of the input/output ports; it is controlled by the MOV PM0, #I instruction. The bit descriptions are as follows:
3
2
1
0
PM0
RB_NM
RD_PH
RA_NM
RC_PH
RA_NM = 0 RA port is CMOS output type.
= 1 RA port is NMOS open drain output type.
RB_NM = 0 RB port is CMOS output type.
= 1 RB port is NMOS open drain output type.
RC_PH = 0 RC port pull-high resistor is disabled.
= 1 RC port pull-high resistor is enabled.
RD_PH = 0 RD port pull-high resistor is disabled.
= 1 RD port pull-high resistor is enabled.
All bit can be read/write and set/clear by user. At initial reset, PM0 is equal to "0000" that port RA , RB are CMOS type
input mode , and port RC, RD are disable pull-high resistor.