AY-3-8910 Frequency Question

By hbarcellos

Hero (642)

hbarcellos's picture

23-05-2014, 03:11

Quick question to HW/Sound experts:

AY-3-8910 (PSG), R0 = &B 0001 1111 and R1 = &B xxxx 0011

So, CHAN A Tone will be &B 0011 1111 1000? (Q1)

Assuming a Base Clock of 3.579.545 hz

What frequency will be played at Chan A? (Q2)

If I got right from the data sheet, seems to be
&B 0011 1111 1000 = &H3f8 = 1016
Base Clock / (16 * 1016) = 220.20 Hz.

is that right or it should be 32 * 1016 or something else?

Met vriendelijke groeten,
hB

Login or register to post comments

By Grauw

Ascended (10699)

Grauw's picture

23-05-2014, 11:50

A1) Chan A tone will be 0011 0001 1111 = 31FH = 799.

There is no nibble swapping, just a straight little-endian 16-bit value.

A2) To get the tone frequency you should multiply by 32 in stead of 16. I imagine this is because the period describes the time between square wave output signal changes (half oscillations) in stead of full oscillations.

3579545 / (799 * 32) = 140 Hz

(This is somewhere inbetween a low C# and a D.)

By hbarcellos

Hero (642)

hbarcellos's picture

23-05-2014, 14:29

Thanks Grauw. That would help me to create the SN emulator as accurate as possible.
That, along with hit's suggestion of virtual channels + some other ideas that I'm "cooking".

Rgds,
HB.

By l_oliveira

Hero (534)

l_oliveira's picture

17-06-2014, 15:38

The multiplier is 32, because the GI chip is rated to 2Mhz maximum (it can't be clocked at 3.579545mhz) so in the MSX design it receives 1.7897725Mhz (3.579545Mhz divided by 2).

By Grauw

Ascended (10699)

Grauw's picture

17-06-2014, 16:00

Aha, nice info!