From: Rhialto (rhialto_at_azenomei.knuffel.net)
Date: 2005-01-03 02:09:14
On Mon 27 Dec 2004 at 14:06:39 -0700, Rich wrote:
> I recently acquired an 8032 and I'm looking for some code to drive the
> peizo speaker with the VIA chip. Does anyone have a good starting
> point? From what I've been able to determine you use the shift
> register functionality on the VIA to drive the piezo speaker. I'm
> guessing that you'd have a periodic interrupt routine to change the
> shift register data/control in order to play the melody. Am I on the
> right track?
The common idiom is to
1. enable the shift register - poke 59467,16
2. set the desired wave form in the shift register - poke 59466,15
3. set the desired frequency (actually time between bit shifts) -
poke 59464,whatever
If you want to play some melody, you repeat step 3 periodically.
Be sure to undo step 1 before using the tape recorder - poke 59467,0.
I used to know these numbers off the top of my head, but I had to look
them up this time.
> Thanks!
-Olaf.
--
-- Ceterum censeo "authored[1]" delendum esse.
___ Olaf 'Rhialto' Seibert -- [1] Ugly English neologism[2].
\X/ rhialto/at/xs4all.nl -- [2] For lawyers whose English/Latin is below par.
Message was sent through the cbm-hackers mailing list
Archive generated by hypermail pre-2.1.8.