Possible Du开发者_运维百科plicate:
pronounce a color based on the bits values with the pic 18f4550.
Hi,
I'm trying to send the binary characters of "RED" to a speaker with a frequency , it is the goal to hear something like RED.
I've put the binary value of red in a decimal value and i need some function to get the first bit of that decimal value , put that in a value and send it to the speaker , than the next bit of the decimal value and so on.
I've been thinking to use a rotate function or something like that but still i'm not succeed.
Anyone who can help me with this ?
You cannot produce the waveform for the word "red" by sending the "binary characters of "RED" to a speaker". You either need to investigate a text-to-speech library or chip, or you need to pre-record an audio waveform (as e.g. raw PCM, or as MP3), and store it in flash/EEPROM, and then decode/replay it on demand.
It is difficult to say anything more specific than this, as you've given no details whatsoever about which PIC family you're using, nor any details about your audio hardware (DAC, etc.).
精彩评论