HT23B60
Rev. 1.10
25
March 1, 2004
PWM Interface
The HT23B60 provides an 8 bit (bit 7 is a sign bit) PWM
D/A interface, which is good for speech synthesis. The
user can record or synthesize the sound and digitize it
intotheprogramROM.Thissoundcouldbeplayedback
in sequence of the functions as designed by the internal
program ROM. There are several algorithms that can be
used in the HT23B60, namely, PCM,
ADPCM...etc.
_LAW, DPCM,
The PWM circuit consists of seven counters. When ini-
tialized, QB goes high and when an overflow occurs, QB
goes low. When the PWM controller bits 0 of the 30H are
set as 0 , each of the 128 clock will initialize the counter
and load the value that come from PWM data buffer to
counter. The PWM modulation can be controlled by us-
ing a different value of the PWM data buffer. Asingle bit
can control the signal changes from the PWM1 or
PWM2 output. The PWM clock source comes from the
system clock divided by a 3-bit prescaler. Setting data to
P0, P1 and P2 (bit3, 4, 5 of 30H) can yield various clock
sources. Setting PWM controller bits D0, D1 (bit6, 7 of
30H) can control the interrupt as to how many times the
counter overflows.
BZ/SP
6/7
Bit
F1
F2
(Sampling Rate)
Device
0
0
F0
F0/64
32 speakers
0
1
F0
F0/128
32 speakers
1
0
F0
F0/64
Buzzer/
8 speakers
1
1
F0
F0/128
Buzzer/
8 speakers
Note:
F1: for PWM modulation clock and F2 for sam-
pling clock
F0: system/[n+1], n=0~7 (n: 3 bits preload
counter)
X stands for don t care
On the sampling rate table, we can easily see that the
sampling rate is dependent on the system clock. If start
bit of the 30H.0 is set as 1 , the PWM2 and PWM1 will
output a GND level voltage.
Label
Bits
Function
PWM
Dis/En
0
Enable/disable PWM output
0: enable; 1: disable
BZ/SP
1
Output driver select
1: buzzer; 0: speaker
6/7 Bits
2
PWM counter bit select
1: 7 bits; 0: 6 bits
P0~P2 3~5
3 bits preload counter
Bit5~3: 000B~111B (0~7); Bit3: LSB
D0, D1 6, 7 PWMI
D1
D0
PWM Interrupt
0
0
1
0
1
2
1
0
4
1
1
8
Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
7-bit
D7
D6
D5
D4
D3
D2
D1
D0
6-bit
D7
D6
D5
D4
D3
D2
D1
X
Note:
X stands for don t care
Bit7: Sign bit
Bit7
Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
1: pull-high
1: pull-high
1: pull-high
1: pull-high
1: pull-high
1: pull-high
1: pull-high
1: pull-high
0: No pull
0: No pull
0: No pull
0: No pull
0: No pull
0: No pull
0: No pull
0: No pull
PA Pull-High Resistor
Bit7~Bit6
Bit5
Bit4
Bit3
Bit2
Bit1
Bit0
Unused bit
1: pull-high
1: pull-high
1: pull-high
1: pull-high
1: pull-high
1: pull-high
0: No pull
0: No pull
0: No pull
0: No pull
0: No pull
0: No pull
PB Pull-High Resistor