RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » How to interface speaker to 6502? (Self-Explanatory Title is Self Explanatory, but it might have an obvious answer.)
How to interface speaker to 6502? [message #7763] Sun, 07 June 2020 17:30 Go to next message
ashtons is currently offline  ashtons
Messages: 8
Registered: May 2020
Location: Louisiana
Junior Member

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 #7787 is a reply to message #7763] Sun, 14 June 2020 17:24 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
Better place to ask might be 6502.org but you probably want to grab some of the old books on the subject and/or read and play with

http://wilsonminesco.com/6502primer/

http://searle.x10host.com/uk101/uk101.html

The audio side can be a D2A convertor, a single bit driven by the CPU or a sound chip that does all the work. Most of the 6502 home computers used sound chips as they were primarily game consoles.

Re: How to interface speaker to 6502? [message #7789 is a reply to message #7763] Mon, 15 June 2020 09:18 Go to previous message
drogon is currently offline  drogon
Messages: 2
Registered: February 2019
Location: Scotland
Junior Member
ashtons wrote on 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.Wink
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
Previous Topic: Ecb friendly prototyping boards poss. Wire wrap
Next Topic: Xilinx XC9572 vs Altera EPM7128S 5v


Current Time: Mon Mar 17 03:31:14 PDT 2025

Total time taken to generate the page: 0.00691 seconds