EasyManua.ls Logo

Microchip Technology ay-3-8910 - 3 OPERATION; Tone Generator Control

Microchip Technology ay-3-8910
56 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
3 OPERATION
Since all functions of the PSG are controlled by the host processor
via a series of register loads, a detailed description of the PSG
operation can best be accomplished by relating each PSG function to
the control of its corresponding register. The function of creating or
programming a specific sound or sound effect logically follows the
control sequence listed:
Section
3.1
3.2
3.3
3.4
3.5
Operation
Registers
Function
Tone Generator Control
R0--R5
Program tone periods.
Noise Generator Control
R6
Program noise period.
Mixer Control
R7
Enable tone and/or noise
on selected channels.
Amplitude Control
R10--R12 Select “fixed” or “envelope-
variable” amplitudes.
Envelope Generator
R13--R15
Program envelope period
Control
and select envelope pattern.
3.1 The frequency of each square wave generated by the three Tone
Tone Generator
Generators (one each for Channels A, B, and C) is obtained in the
PSG by first counting down the input clock by 16, then by further
Control
counting down the result by the programmed 12-bit Tone Period
value. Each 12-bit value is obtained in the PSG by combining the
(Registers R1, R2, R3, R4, R5)
contents of the relative Coarse and Fine Tune registers, as illustrated
in the
following.
12-bit Tone Period (TP) to Tone Generator
Note that the 12-bit value programmed in the combined Coarse and
Fine Tune registers is a period value-the higher the value in the
registers, the lower the resultant tone-frequency.
Note also that due to the design technique used in the Tone Period
count-down, the lowest period value is 000000000001 (divide by 1)
and the hiqhest period value is 1111111‘11111 (divide by 4,095
10
).