I am a complete noob here but excited about the forum community and hope that I might be able to lend your expertise about an issue that I'm having with regards to outputting a stable sound sample from a Texas Instruments SN76489AN sound chip.
I followed a tutorial over at:
http://danceswithferrets.org/geekblog/?p=93
But rather than using a clock, I have attempted to run a clock from the the Arduino Nano itself. I managed to find some resources that puts out a 4Mhz output on pin 11, so I slightly modified the pinout on the sketch provided on the tutorial (Link above).
Most notably, the changes occur in the pin out definitions:
const int kPin_D0 = 2;
const int kPin_D1 = 3;
const int kPin_D2 = 4;
const int kPin_D3 = 6;
const int kPin_D4 = 7;
const int kPin_D5 = 12;
const int kPin_D6 = 8;
const int kPin_D7 = 10;
const int kPin_NotWE = 5;
const int kPin_Clock = 11;
And also changes to output a 4MHz output on PIN11. (Albeit, I'm ultimately guessing about this entire setup).
pinMode(kPin_Clock, OUTPUT);
TCCR2A = ((1 << WGM21) | (1 << COM2A0));
TCCR2B = (1 << CS20); // prescaler = 1
TIMSK2 = 0;
OCR2A = 3;
The complete modified sketch can be seen here:
I have followed the pin out schematic, found at:
http://www.vgmpf.com/Wiki/images/7/78/SN76489AN_-_Manual.pdf
I have included an image of my breadboard which is admittedly difficult to make out but I've included it for completeness.
I'm also confused about the output enable pin, so for now I have tied that to ground since I believe it to be active low, but this might be an issue?
So, to the problem. I am hearing clicks and pops and bits of audio and such, but nothing that resembles what I would be expecting to hear. I'm relatively sure that the chip is being clocked as I've played around a little with a few register values and have been able to get some tonal sounds out, but it definitely seems like there is something about the sketch, or perhaps the pins or even perhaps the endianness of the data. If anyone is able to help trouble shoot this, I'd be most grateful.
Many thanks
