DTMF controller
Archiver
Posts: 46,084
Hello all. I am looking to start experimenting with basic stamps.
The first project I am looking to do is a DTMF decoder. I need it to
decode two sets of 3 - 4 digits and control a relay. Very simple I
would think. What do I need to get started? Is there a place for
shareware programs available? I am not a novice constructor and many
years ago I did some code for a basic 52 board but all I need now is
something very simple for this application.
Thanks for any help, Dave KC3AM
The first project I am looking to do is a DTMF decoder. I need it to
decode two sets of 3 - 4 digits and control a relay. Very simple I
would think. What do I need to get started? Is there a place for
shareware programs available? I am not a novice constructor and many
years ago I did some code for a basic 52 board but all I need now is
something very simple for this application.
Thanks for any help, Dave KC3AM
Comments
Clare M-8870-02 DTMF receiver you can check out the chip here. I used the
M-8870-02 because it has a power down option.
http://www.clare.com/85256A3900731315/0/0CB3DBFE7550D15A85256A2C0072B4D6?Open&Hi\
ghlight=2,M8870-R3
As far as a sample program goes. you may try this one out. I will leave out
the LCD syntax because i had mine programmed with an LCD.
This program was modified by me to your specifications. it will accept 2
pre-defined sets of 4 digit codes. for this program i will use 1234 and
9999. review the schematics on the link provided. it will show you how to
interface the chip to the stamp. you need 5 lines for the interface. in the
program you will see one output for the relay and one for a Denied Access
LED. you may change the preprogrammed Codes to whatever you want just make
sure there in binary. Have fun and good luck. Email if you need assistance.
P.S. This is Really cool with a Backlit LCD !!!
Gary Denison
Kyocera Wireless Corp.
'
PROGRAM
'{$STAMP BS2}
digit_1 VAR Word
digit_2 VAR Word
digit_3 VAR Word
digit_4 VAR Word
Relay VAR OUT5
D_LED VAR OUT6
Main:
LOW D_LED
LOW Relay
PAUSE 1000
digit1
IF IN4 = 1 THEN get_value
GOTO digit1
digit2
IF IN4 = 1 THEN get_value2
GOTO digit2
digit3
IF IN4 = 1 THEN get_value3
GOTO digit3
digit4
IF IN4 = 1 THEN get_value4
GOTO digit4
'
Receive Data
get_value
digit_1 = INA
GOTO digit2
get_value2
digit_2 = INA
PAUSE 500
GOTO digit3
get_value3
digit_3 = INA
PAUSE 500
GOTO digit4
get_value4
digit_4 = INA
PAUSE 500
GOTO code1
code1 '--(1234)----
IF Digit_1 <> %0001 THEN code2
IF Digit_2 <> %0010 THEN Denied
IF Digit_3 <> %0011 THEN Denied
IF Digit_4 <> %0100 THEN Denied
GOTO Access_granted
code2 '--(9999)----
IF Digit_1 <> %1001 THEN Denied
IF Digit_2 <> %1001 THEN Denied
IF Digit_3 <> %1001 THEN Denied
IF Digit_4 <> %1001 THEN Denied
GOTO Access_granted
Access_Granted
HIGH Relay
PAUSE 5000
GOTO main
Denied
HIGH D_led
PAUSE 3000
GOTO main
At 06:42 PM 2/1/2004, you wrote:
>Hello all. I am looking to start experimenting with basic stamps.
>The first project I am looking to do is a DTMF decoder. I need it to
>decode two sets of 3 - 4 digits and control a relay. Very simple I
>would think. What do I need to get started? Is there a place for
>shareware programs available? I am not a novice constructor and many
>years ago I did some code for a basic 52 board but all I need now is
>something very simple for this application.
>
>Thanks for any help, Dave KC3AM
>
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Yahoo! Groups Links
>
>To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
>To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
>Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/