Interfacing the YM2149 - external oscillator ?

Hello,

Note: I'm learning electronics so, excuse any further dumb questions

I'd like to interface my arduino board to a good ol' YM2149 sound generator. For ost of the input signals, that's ok.
But the YM needs an input clock signal (ultimately 2Mhz or 4MHz) and I don't know what is the easiest way to provide this clock signal.

I googled a little and found some wyas to implement an oscillator but any good advice will be welcome.

  1. Use a NE555 component in astable mode (seems not a very good solution, http://totusterra.com/index.php/2009/10/31/using-the-555-timer-as-an-external-clock)
  2. Build an oscillator using a quartz and NAND components
  3. Build an oscillator using an op-amp
  4. Generate the signal from the arduino (seems quite dangerous) using timers (Arduino Playground - Timer1)
  5. Divide the original Arduino clock signal using something... ?

What would be the easiest ?

thanks in advance

shazz

In order of simplicity:-
5
2
4
1 & 3 don't work - well 3 will but you need a very expensive op amp.

Divide down the 16MHz with a 74LS92 divider, you need a transistor to boost the signal up to 5V before TTL divider will work.

So what is a

a good ol' YM2149 sound generator.

any links?

Thanks a lot Mike ! Really helps !

Btw, do you have a little schema using the 74LS92 divider + transistor
?
The 74LS92 is a divide by 6 right (so 2.666MHz) or can it be used as a divide by 2 to reach 4 MHz ? (that's the case if I understand well the datasheet, using only the Q0(12) output and the CP0(14) clock input)

About the YM2149 (or AY-3-8910):
it was the programmable sound generator in 80's computers such as the Mattel Intelvision, Atari ST, Amstrad CPC, Oric 1 Atmos, MSX,...
wiki : General Instrument AY-3-8910 - Wikipedia
datasheet : http://www.ym2149.com/ym2149.pdf

So to generate beeps ::slight_smile:

Dumb question... I was wondering where to get the 16MHz clock signal and... I saw that the output pin13 (SPI SCK) can be configured according to the master clock signal (by default 1/4 but could be something else)

Could I use directly this clock signal to 4Mhz ??? (after spi.begin())

Could I use directly this clock signal to 4Mhz ??? (after spi.begin())

No it only gives you the clock pulses while it is shifting out not continuously.

Sorry I meant the 74LS93, not the 92, it's a divide by 16 so you can tap off 8MHz, 4MHz, 2MHz and 1MHz

Do you mean that the SPI SCK is only sending pulses when transmitting ? No sure that I understood what you mean by "shifting out not continously"
Bah ok :slight_smile: a pity.

Ok, using the 74LS93 and divide by 8 it looks easier :slight_smile:

Btw the way so how do you connect all this stuff ?

  • clock : from where ? need a soldered wire on the XTAL1 ?
  • transistor ? base on clock, emitter to ground, collector to divider ? nothing more ?
  • divider ? using LS93 CKB (1) input ? then using Q2(9) output as the 2MHz clock signal ?

The full sentence was only gives you the clock pulses while it is shifting out not continuously. So that is it doesn't give you continuous clock pulses only pulses 8 times during the shift out of data.

need a soldered wire on the XTAL1 ?

yes - but not sure if you need to use pin9 or pin10 on the DIL version of the 168

base on clock, emitter to ground, collector to divider ? nothing more ?

No you only have a small signal so:- crystal to resistor 100K other end to a capacitor (anything say 10nF) other end of the capacitor to the base. The base should also be connected to the +5v with a largish resistor say 470K, emitter top ground collector to 74LS93 input with a 10K pull up resistor.

using LS93 CKB (1) input ? then using Q2(9) output as the 2MHz clock signal ?

Yes :slight_smile:

Thanks Mike, I'll do a little Eage schema and you'll tell me if I'm right :slight_smile: