HT83003 HOLTEK [Holtek Semiconductor Inc], HT83003 Datasheet - Page 18

no-image

HT83003

Manufacturer Part Number
HT83003
Description
Q-Voice
Manufacturer
HOLTEK [Holtek Semiconductor Inc]
Datasheet
Audio Output - PWMD (28H)
The HT83XXX provides one 8-bit PWM interface for driving an external 8 speaker. The programmer must write the
voice data to register PWMD (28H)
Pulse Width Modulation Control Register - PWMCR (26H)
PWMC: Start bit of PWM output
After waiting one cycle end , stop the PWM counter and
keep in low signal
VROMC: Enable voice ROM power circuit (1=enable;
0=disable)
Single_PWM: Driving PWM signal only by PWM1 port.
(1=enable; 0=disable)
The HT83xxx provides an 8-bit (bit 7 is a sign bit, if Sin-
gle_PWM = 0) PWM interface. The PWM provides two
pad outputs: PWM1, PWM2 which can directly drive a
piezo or a 8
ment (green mode), or using only port PWM1 (Set Sin-
gle_PWM = 1) to drive piezo or a 8
external element.
When Setting Single_PWM = 1, choose voice
data7~data1 as the output data (no sign bit on it).
Setting data to P0 and P1 can generate various sam-
pling rates (5kHz/6kHz/8kHz):
If the sign bit is 0, then the signal is output to PWM1and
the PWM2 will get a GND level voltage after setting start
bit to 1. If the sign bit is 1, then the signal is output to
Rev. 0.10
P1 P0
0
0
1
PWM start counter: 0 to 1
PWM stop counter: 1 to 0
Bit 7
0
1
0
Sampling
Rate
5kHz
6kHz
8kHz
X
speaker without adding any external ele-
Bit 6 (R/W)
frequency
P1
Carrier
30kHz
30kHz
32kHz
X
Bit 5 (R/W)
Preload
Times
P0
X
6
5
4
speaker with
PWM Code
Range
1~127
1~127
1~124
X
Bit 4
Preliminary
PWM
18
Single_PWM
Bit 3 (R/W)
PWM2 and the PWM1 will get a GND level voltage after
setting start bit to 1.
PWM ½ output Initial low level , and stop in low level
If PWMC from low to high then start PWM output and
5kHz/6kHz/8kHz latch new data , if no update then keep
the old value.
If PWMC from high to low, in duty end, stop PWM output
and stop the counter.
Voice ROM Data Address Latch Counter
The voice ROM data address latch counter is the hand-
shaking between the microcontroller and voice ROM,
where the voice codes are stored. One 8-bit of voice
ROM data will be addressed by setting 18-bit address
latch counter LATCH0H/LATCH0M/LATCH0L. After the
8-bit voice ROM data is addressed, a few instruction cy-
cles (4 s at least) will be generated to latch the voice
ROM data, then the microcontroller can read the voice
data from LATCHD (2AH).
Example: Read an 8-bit voice ROM data which is lo-
cated at address 000007H by address latch 0
set
mov
mov
mov
mov
mov
mov
call
mov
[26H].2
A, 07H
LATCH0L, A ; Set LATCH0L to 07H
A, 00H
LATCH0M, A ; Set LATCH0M to 00H
A, 00H
LATCH0H, A ; Set LATCH0H to 00H
Delay Time
A, LATCHD
Bit 2 (R/W)
VROMC
; Enable voice ROM circuit
;
;
;
; Delay a short period of time
; Get voice data at 000007H
Bit 1
August 25, 2003
HT83XXX
Bit 0 (R/W)
PWMC

Related parts for HT83003