Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Building an audio circuit using an Arduino Micro and AY-3-8912

Reply to topic
Author Message
  • Joined: 15 Dec 2017
  • Posts: 2
Reply with quote
Building an audio circuit using an Arduino Micro and AY-3-8912
Post Posted: Fri Dec 15, 2017 6:42 am
I'm new to EE in general and I just received my first oscilloscope (Rigol DS1102E).

Anyway, I'm building an audio circuit using an Arduino Micro and the famous AY-3-8912

OK, so basically I have 8 digital pins from the Arduino tied to the D0-D7 pins of the IC, couple pins for the !CE and !WE and a 3.579 Mhz oscillator tied to pin 14 (clock) of the IC.

I'm able to play tones just fine.

But here is what puzzles me. Look at the picture and notice that I have what appears to be noise in the 471 kHz range. That noise is on pin 7 (AUDIO OUT) of the IC.

Lots of noise?

Since it's in the 471kHz range, I'm assuming that's why I don't physically hear it coming through my speakers.

Also, when I send a 440Hz tone through the speakers, the tone sounds great. But, I obviously don't see 440Hz on the scope. But I see it wildly fluctuate. Like it's combining the 440Hz with the 471kHz.

I can provide more pictures and details if anyone needs it. Any tips on helping me track this down would be greatly appreciated.

EDIT

Update: To answer some questions/comments:

I have tried powering the Arduino (and the entire circuit) two different ways. One with a crappy wall-wart PSU and the other from my USB port of my MacBook Pro.

I have my circuit on a Parallax Pro development board which has a voltage regulator built in. Not sure of the quality. However, I have put a 1Mhz crystal oscillator off to the side of the board and the scope reads 1.000Mhz consistently but there is some spiking on each edge. But, it's consistent.

Also, the Rigol has a 1kHz probe port and when I put the probe on it, the reading shows a stable 1.000kHz frequency with a 50.0% duty cycle. Image looks solid. So, I believe the scope should be pretty accurate (at least as far as my limited knowledge can tell).

Plus, the development board has a built in pulse generator of 1, 10, 100, 1000Hz. At 1kHz it shows 1.000kHz with a 50.0% duty (+) and 52.0% duty (-). Image has a some spikes and jitter but looks "OK" I guess.

Finally, I have done the following to no avail:

1) Removed the oscillator
2) Two different power sources (both do the same)
3) Unplugged and speakers
4) Unplugged the crappy PSU and made sure the cord was nowhere near the scope or probes.
What is odd is that I can now actually play VGM songs and they actually sound really good. When I play a 440Hz A, it actually sounds like an A. Even though I can't prove it on the scope because of the noise.

Thanks everyone!
yfK15.jpg (676.71 KB)
yfK15.jpg

  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!