But how do you know how to update your index ( by how much time has elapsed?) AND most of all, how the heck to I get the values to create the sine tables to start with?? Should each consecutive value be the y axis value of the sine wave- where each value is ...say 50 microsecons apart on the x axis.... or something like that??/ And if that is true,,, then updating the index would just be incrementing by one each time??? right??? I am confussed!!!! > Update index to sine table for tone 1 > Fetch tone 1 sample from sine table > Update index to sine table for tone 2 > Fetch tone 2 sample from sine table > Add tone 1 and tone 2 samples together > Write result to the PWM Thanks -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Bob Ammerman Sent: Friday, November 09, 2001 12:23 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]:Generating DTMF idea, please advise? This idea is not likely to work. What will likely work is using wavetable synthesis inside the PIC and summing the two outputs before sending them to the PWM. ie: on each PWM interrupt: Update index to sine table for tone 1 Fetch tone 1 sample from sine table Update index to sine table for tone 2 Fetch tone 2 sample from sine table Add tone 1 and tone 2 samples together Write result to the PWM You'd probably want to sample the PWM as fast as you could to minimize the requirerd antialiasing filter on the output. Bob Ammerman RAm Systems ----- Original Message ----- From: "Brandon Stewart" To: Sent: Thursday, November 08, 2001 3:17 AM Subject: [PIC]:Generating DTMF idea, please advise? > Greetings all, this is my first time on PICLIST! I am trying to generate > DTMF tones using only a PIC, a 16F877. I want to use the PWM to do this. > Do you think it is possible to generate the two frequencies *almost* > simultaneously? I mean say freq. 1 is piped out the PWM for delta T mS, and > then Freq. 2 is piped out some delta T ms, and that this pattern continues > for about a second. Would this be good enough to work, to fool the phone > system? > > P.S- I have read the archives, but found little good info there. Everyone > says to use separate hardware, but that is NOT what I want to do here! > > > Thanks in advance, > Brandon Stewart > Georgia Tech > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics