Holtek HT827A0 Manual page 25

8-bit microcontroller with voice rom
Table of Contents

Advertisement

Voice ROM
The HT827A0 includes a ROM for storing
sound and tone (melody) data. Coded data can
be saved in an internal mask ROM by changing
one layer of the mask after the sound and tone
(melody) sources are coded by Holtek¢s tools.
The voice ROM size for HT827A0 is 128K´8.
The handshaking between the microcontroller
and voice ROM is through a ROM control register
(ROMC; 2CH). To enable the voice ROM, the bit 7
of the TEMPO register should be set as ²1². The
related ROM address has to be saved in the ROM
control register first if the microcontroller at-
tempts to read the sound or tone (melody) data in
the mask ROM. The ROM is comprised by a set of
address counters internally. After the
microcontroller finishes reading a byte of data, its
internal address counter will automatically be in-
creased by one. In this case, reading continuous
data only requires loading the starting address to
the ROM control register.
The lower-order nibble is valid whereas the
higher-order nibble is not valid in the ROM con-
trol register. Based on this difference, the start
address has to be divided into six nibbles, and
written into the ROM control register six times
with respect to the divided-by-six nibbles. The
lower-order nibble and higher-order nibble data
can then be read back by reading twice after the
sound or tone (melody) starting address is writ-
ten. Every times of reading must interval at
least fifty instruction cycles after the address is
exchanged or fore reading. For example, if the
A D 0 ~ A D 3
R O M C
starting address of the sound data to be read is
0CF0H, the program of reading one byte of
sound or tone (melody) data is as follows:
Read-New-Data:
SET
MOV A, 00H
MOV [ROMC], A;
MOV A,0FH
MOV[ROMC], A;
MOV A, 0CH
MOV [ROMC], A;
MOV A, 00H
MOV [ROMC], A;
MOV A, 00H
MOV [ROMC]
MOV A, 00H
MOV [ROMC], A
CALL DELAY;
MOV A, [ROMC];
MOV [DATA], A;
MOV A, [ROMC];
A 1 X ~ A 1 2
A d d r e s s
C o u n t e r
A 1 1 ~ A 8
A d d r e s s
C o u n t e r
V o i c e
R O M
A 7 ~ A 4
A d d r e s s
C o u n t e r
A 3 ~ A 0
W R
A d d r e s s
C o u n t e r
¸ 2
R D
Voice ROM
25
TEMPO.7
Write the first nibble
address
Write the second
nibble address
Write the third
nibble address
Write the fourth nibble
address
Write the fith nibble
address
Writh the sixth nibble
address
Delay 50 instruction cy-
cles
Read the lower-order
nibble data
Read the high-order
nibble data
D 4 ~ D 7
D a t a R e g i s t e r
( h i g h n i b b l e )
D 0 ~ D 3
D a t a R e g i s t e r
( l o w n i b b l e )
E N
T E M P O . 7
X = 4 , 5 o r 6
HT827A0
R D
March 15, 2000

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the HT827A0 and is the answer not in the manual?

Questions and answers

Table of Contents