|
|
View previous topic :: View next topic |
Author |
Message |
riya
Joined: 15 Feb 2012 Posts: 10
|
DTMF |
Posted: Wed Apr 18, 2012 11:38 pm |
|
|
Hello every one,
I want to move my robot by interfacing a mobile through a DTMF decoder. I know the h-bridge arrangement for driving the motors. I have a 9170b decoder. After establishing the call, if I press 1 the motor is on, for 2 it should be off. My doubt is how can I make to know the decoder, is there any code for DTMF decoding? My controller is pic 16f877a.
I hope you understand my problem. Please let me know about DTMF syntaxes.
Thank you. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9229 Location: Greensville,Ontario
|
|
Posted: Thu Apr 19, 2012 5:05 am |
|
|
That's a Holtek chip and very easy to use,though there isn't a 'driver' here that I'm aware of.
You could tie the DataValid pin to the ExtInt pin of the PIC,and the 4 datapins to say the low nibble of PortB.
When the DTMF rcvr gets a valid tone pair, it pulses DV high,so in your ExtISR you just need to read PortB, mask off the high nibble and save the lower four bits in a variable(maybe call it new_DTMF_code ?), also set a 'flag' variable' to tell 'main' ,new data/command has arrived.then exit the ISR.
Within your 'MAIN' program, you'll need to setup a table that corresponds to the DTMF tonepairs/keypresses, similar to the 'keypad' example that CCS supplies.
Operation is simple..everytime a DTMF 'command' arrives, the ISR is entered, the datapair is stored,the 'new data flag is set' and then in 'MAIN', you decide what action is to happen(go left, forward, stop,etc) as well as clearing the new data flag. |
|
|
riya
Joined: 15 Feb 2012 Posts: 10
|
|
Posted: Sat Apr 21, 2012 4:04 am |
|
|
thank u so much sir for your response i'll ...try the code and post here. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|