
Chapter 6
6.6.3.1 Example - Speech Interrupt
;--------------------------------------------------------------
; The example demonstrates how to set up speech interrupt.
; Assume speech data is located at address 0x000000 of VROM (8-bit
; signed data); system clock = 4MHz.
;--------------------------------------------------------------
ORG
0x0000
JMP POWERON
; go to power-on procedure
ORG 0x000E
; channel 1 speech interrupt address
PAGE 0
; set correct page number
JMP SPEECH_INT1 ; go to speech ch1 interrupt subroutine
ORG 0x0010
; power-on reset procedure
POWERON:
………………
; main program
………………
;--speech timer interrupt set-----------------------------------
SPEECH1_SETUP:
MOV A, @0x00
; select the speech channel 1
MOV 0x09, A
MOV A, @0
IOW 0x6
; write initial address (0x000000)
IOW
0x7
IOW
0x8
IOW 0xB
; write initial value to DAC registers
IOW
0xC
MOV A, @4000/8/8 ; 8KHz, rate=4M/8/8k=62.5
IOW 0x0A
; write sampling rate
BS 0x05, 7
; enable global interrupt bit(ENI)
BS 0x0A, 0
; enable speech timer interrupt
BS 0x0A, 1
; enable speech data output to DAC
CLR 0x20
; clear user defined stop flag
…………………
WAIT:
JBS 0x20, 0
; if R11(0)=1 -> stop playing
JMP WAIT
; else go to speech-ch1-set
BC 0x0A, 0
; disable speech interrupt
BC 0x0A, 1
; disable speech output to DAC
EM60000 Series User’s Manual
Software Application
•
91
Содержание EM60000 series
Страница 8: ...Contents viii Contents EM60000 Series User s Manual ...
Страница 24: ...Chapter 2 16 Architecture EM60000 Series User s Manual ...
Страница 54: ...Chapter 4 46 Special Function Control EM60000Series User s Manual ...
Страница 80: ...Chapter 5 72 Instruction Set EM60000Series User s Manual ...