How to interface speaker to 6502? [message #7763] |
Sun, 07 June 2020 17:30  |
|
Hello.
Right now I'm trying to figure out address decode logic for a project I'm working on, which is supposed to have a simple speaker of some sort (I haven't figured out the exact model speaker as I don't know precisely what I should look for), and I realized that I don't know how to interface said speaker to the processor I'm using in this processor, a 6502. I have some assumptions (that involve a Digital-to-Analog Converter) but I'm not entirely sure if they're correct or if it would apply to just any speaker I choose.
(I'm partially worried that this sounds dumb but I am legitimately unsure.)
[Updated on: Sun, 07 June 2020 17:31] Report message to a moderator
|
|
|
|
Re: How to interface speaker to 6502? [message #7789 is a reply to message #7763] |
Mon, 15 June 2020 09:18  |
drogon
Messages: 2 Registered: February 2019 Location: Scotland
|
Junior Member |
|
|
ashtons wrote on Sun, 07 June 2020 17:30Hello.
Right now I'm trying to figure out address decode logic for a project I'm working on, which is supposed to have a simple speaker of some sort (I haven't figured out the exact model speaker as I don't know precisely what I should look for), and I realized that I don't know how to interface said speaker to the processor I'm using in this processor, a 6502. I have some assumptions (that involve a Digital-to-Analog Converter) but I'm not entirely sure if they're correct or if it would apply to just any speaker I choose.
(I'm partially worried that this sounds dumb but I am legitimately unsure.
the simplest way would possibly be the way the Apple II did it (google for the schematics), but in essence an address was decoded and that signal fed into a flip-flop with the output directly to the speaker (via a buffer transistor IIRC).
You then had to make timed loops in software to make tones, or use a 1-bit PWM audio system that was latterly used, but this requires RAM to store the data and very precise timings.
There are/were sound chips of the era - these you programmed the frequency, amplitude and duration into - some were cleverer than others. See C64 and BBC Micro descriptions for example.
If you're looking for a more modern way, then remember that samples eat RAM and you generally don't have much on the 6502...
-Gordon
|
|
|