beautypg.com

Api4000m, Integrated, Series – Rainbow Electronics API4000M User Manual

Page 5: Circuits inc. voice otp module, B. sound processor, Input & output data, System control

background image

INTEGRATED

API4000M

SERIES

CIRCUITS INC. VOICE OTP MODULE

5


6. Input & Output Data

Instruction Format

Code

Cycle

Bytes

Instruction Description

INPUT PA, Rn ﹔

80

1

2

Set Data Port A to Rn.( Rn ÍPA)

INPUT PB, Rn ﹔

81

1

2

Set Data Port B to Rn. ( Rn ÍPB)

INPUT PC, Rn ﹔

82

1

2

Set Data Port C to Rn. ( Rn ÍPC)

OUT PA, Rn ﹔

88

1

2

Set the value of Rn to Data Port A. (PAÍRn)


OUT PB, Rn ﹔

89

1

2

Set the value of Rn to Data Port B. (PBÍRn)

OUT PC, Rn ﹔

8A

1

2

Set the value of Rn to Data Port C. (PCÍRn)

OUT PD, Rn ﹔

8B

1

2

Set the value of Rn to Data Port D. (PDÍRn)

OUT PE, Rn ﹔

8C

1

2

Set the value of Rn to Data Port E. (PEÍRn)

PS :

(1). PA , PB , PC , PD , PE is Data Port A , B, C, D, E, Reference D. Data Port to get more description.


7. System Control

Instruction Format

Code

Cycle

Bytes

Instruction Description

CLINTR ﹔

C8

1

1

Clear Interrupt Signal

INTRE ﹔

C9

1

1

Make system can receive interrupt signal.

SHUTDN ﹔

CA 1 1

System

shutdown.


PS : (1). Before executiving SHUTDN Instruction, be sure to executive INTRE Instruction first to assure system
can be restarted after shutdown.


B. Sound Processor

Sound Processor of API4000M use 4 bits ADPCM construction, it has 4 Sound Channel can play music

mixed by 4 different type sound.Sample Rate of Sound is during 4KHz ~ 32Khz, each Channel can has different
Sample Rate.Each Channel has 2 group Address Register for Sound Data, each group Address Register has a Start
Address Register and a End Address Register for Sound Data. Each Sound Channel can be Controlled by
Instruction PLAYSP, or Controlled by Melody Processor.Before Play Sound, Address of Sound Data must be set
first. The following is the description about setting with Channel, Address, and Sample Rate.

1. Channel :

Cn is the no. of Channel in Instruction LDSPADB, LDSPADF, and PLAYSP. Each Channel has A and B
2 group, A and B can’t play together. The folloeing is the Table.


Table B.1

Channel

CH1 CH2 CH3 CH4

Group

A B A B A B A B

Cn C1A C1B C2A C2B C3A C3B C4A C4B