CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

DTMF

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
riya



Joined: 15 Feb 2012
Posts: 10

View user's profile Send private message

DTMF
PostPosted: Wed Apr 18, 2012 11:38 pm     Reply with quote

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: 9165
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Apr 19, 2012 5:05 am     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Apr 21, 2012 4:04 am     Reply with quote

thank u so much sir for your response i'll ...try the code and post here.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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