laserhawk64
Senior Member
Hello, folks. I'm back with another silly project... this one I'll actually finish if I can get the code right.
I have put together a little beep-tune player (using the "tune" command) that /almost/ works.You get a text description of the circuit because the schematic I drew isn't quite accurate and I'm not taking pictures of this bodge.
The whole thing is based on a 14p DIP socket that fought me every step of the way. That thing did NOT want to have solder attached to it!
A 1N4148 diode across pins 1 and 14, so that if I stick the batteries in backwards, it's not going to kill the chip.
The 22k resistor across pins 2 and 13, and the 10k across 3 and 12. The rest of the socket is occupied by an 08M2.
Underneath, on the bottom of the socket, pins 1 and 4 are joined to each other, and pins 2 and 3 are joined to SerIn (which would go to the headphone jack if I hadn't cut that off by now; I'm programming it in another board instead...).
Pin 5 bridges the socket to pin 13.
Pin 6 (corresponding to C.3 on the PICAXE) is hooked to the positive supply via a small button switch (momentary push button), which triggers the tune playback. Yes, the button has a pulldown. It's 10k.
*ahem* Pin 7 has been cut off the socket.
Pin 8 goes to a piezo disk (specifically the middle quartz part; the outside metal part is wired to ground).
Pin 9 has been cut off the socket.
Pin 10 goes to SerOut (or would if I hadn't removed the jack).
Pins 11 and 12 are grounded.
Pin 13, as previously mentioned, goes to pin 5, and pin 14 is the supply input.
There is a small power switch between the supply inputs and the batteries.
Batteries are a trio of LR44's; I'm reusing them, the piezo, and the enclosure from a dollar store magnetic window alarm!
I'll attach my code to the post, since (as usual) the forum editor doesn't like me and is taking out all the line breaks. I think it has something to do with how Linux does things... Windows uses the CR+LF non-printing characters; Linux just does LF. (CR = Carriage Return, LF = Line Feed; it's lingo left over from teletype and typewriter days... but it's how things are still done...)
The problem, in a nutshell, is that to play the whole tune, I have to hold down the button the whole time. I want a one-shot -- I poke the button, it plays the tune to completion. I poke it again, it plays a second time.
Just realized that I can cut up an 08 proto board to fit this case. I feel a little stupid -- once I get the program working I'll do exactly that since I have at least one spare proto board...
I have put together a little beep-tune player (using the "tune" command) that /almost/ works.You get a text description of the circuit because the schematic I drew isn't quite accurate and I'm not taking pictures of this bodge.
The whole thing is based on a 14p DIP socket that fought me every step of the way. That thing did NOT want to have solder attached to it!
A 1N4148 diode across pins 1 and 14, so that if I stick the batteries in backwards, it's not going to kill the chip.
The 22k resistor across pins 2 and 13, and the 10k across 3 and 12. The rest of the socket is occupied by an 08M2.
Underneath, on the bottom of the socket, pins 1 and 4 are joined to each other, and pins 2 and 3 are joined to SerIn (which would go to the headphone jack if I hadn't cut that off by now; I'm programming it in another board instead...).
Pin 5 bridges the socket to pin 13.
Pin 6 (corresponding to C.3 on the PICAXE) is hooked to the positive supply via a small button switch (momentary push button), which triggers the tune playback. Yes, the button has a pulldown. It's 10k.
*ahem* Pin 7 has been cut off the socket.
Pin 8 goes to a piezo disk (specifically the middle quartz part; the outside metal part is wired to ground).
Pin 9 has been cut off the socket.
Pin 10 goes to SerOut (or would if I hadn't removed the jack).
Pins 11 and 12 are grounded.
Pin 13, as previously mentioned, goes to pin 5, and pin 14 is the supply input.
There is a small power switch between the supply inputs and the batteries.
Batteries are a trio of LR44's; I'm reusing them, the piezo, and the enclosure from a dollar store magnetic window alarm!
I'll attach my code to the post, since (as usual) the forum editor doesn't like me and is taking out all the line breaks. I think it has something to do with how Linux does things... Windows uses the CR+LF non-printing characters; Linux just does LF. (CR = Carriage Return, LF = Line Feed; it's lingo left over from teletype and typewriter days... but it's how things are still done...)
The problem, in a nutshell, is that to play the whole tune, I have to hold down the button the whole time. I want a one-shot -- I poke the button, it plays the tune to completion. I poke it again, it plays a second time.
Just realized that I can cut up an 08 proto board to fit this case. I feel a little stupid -- once I get the program working I'll do exactly that since I have at least one spare proto board...
Attachments
-
827 bytes Views: 7
Last edited by a moderator: