Well I'm designing a hand held game using a PIC 16F, a 5,4 LED matrix, and I'm going to use a PIC 12F to be my audio device that would be controlling a buzzer. I wanted my little console to be able to support multitasking. Handling I/O and doing display all synchronized, just like how mulithreading works. Anyways I've concluded that I should use my little 12F for audio, so if I want to play music or play a sound effect, it wouldn't effect the performance of the game using the main CPU/PIC.
I was thinking on having PORT 0 on the 12F, be the output for the piezoelectric buzzer, and store pre programmed music/effects in the 12F, so when lets say I want to play pling sound on start up, I could just do a digital to analog method and have 3 pins go through 3 resistors (each between ports), and have the output go to a compacitor 4.7uf. Then having the 12F's open pin connect between so I can read values.
So when it reads value 24 then it plays a pling script.
What I want to know is: Is this a poor way of PIC programming for communication and usage? Should I maybe use another method that's more professional, so it makes my system a little more complex, but flexible? So if there is a problem with the sound device I can tell the main CPU that?
Is putting scripts on a PIC to play 8bit like small music, is a poor way of managing memory?
Thanks, Andrew.
I was thinking on having PORT 0 on the 12F, be the output for the piezoelectric buzzer, and store pre programmed music/effects in the 12F, so when lets say I want to play pling sound on start up, I could just do a digital to analog method and have 3 pins go through 3 resistors (each between ports), and have the output go to a compacitor 4.7uf. Then having the 12F's open pin connect between so I can read values.
So when it reads value 24 then it plays a pling script.
What I want to know is: Is this a poor way of PIC programming for communication and usage? Should I maybe use another method that's more professional, so it makes my system a little more complex, but flexible? So if there is a problem with the sound device I can tell the main CPU that?
Is putting scripts on a PIC to play 8bit like small music, is a poor way of managing memory?
Thanks, Andrew.
Last edited: