?? dtmf decoder 2 by infidigm.htm
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0039)http://www.infidigm.net/projects/dtmf2/ -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>DTMF Decoder 2 by Infidigm</TITLE>
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><LINK
href="DTMF Decoder 2 by Infidigm.files/global.css" type=text/css
rel=stylesheet></HEAD>
<BODY>
<H1 align=center>DTMF Decoder 2 by <A
href="http://www.infidigm.net/">Infidigm</A></H1>
<P align=center><IMG height=319
src="DTMF Decoder 2 by Infidigm.files/dtmf2all.jpg" width=500></P>
<HR>
<BR>
<P><A href="http://www.infidigm.net/projects/dtmf/">Rev 1</A></P>
<H2>Disclaimer</H2>
<P>This device and all information contained on this website is for educational
purposes only. This device must be used in conjunction with any and all local,
provincial and federal laws. It is up to the end user to comply with all legal
guidelines, thus we are not and will not be held responsible for any misuse of
this product or any damages that it may cause.</P>
<H2>Description</H2>
<P>The DTMF decoder 2 is a useful tool used for decoding DTMF (Dual Tone Multi
frequency) generated by telephones. The decoded digits are viewed on a 16x2 LCD
screen. The DTMF decoder can be directly connected to a Serial port to view the
digits in HyperTerminal on a computer. The decoder stores the last 234 received
digits in EEPROM. The contents of EEPROM can be viewed on the LCD screen via two
scroll buttons. Total power consumption is 12mA. The DTMF decoder has two
inputs. A RJ11 jack for connecting to the phone line and a 1/8" audio jack for
connecting to a scanner, tape recorder or other audio output device.</P>
<H3>Changes made in Rev 2</H3>
<P>
<UL>
<LI>Connects directly to PC without an interface.
<LI>Displays the line number (1 - 19) when scrolling.
<LI>Has software filtering for button contact de-bounce.
<LI>Properly displays '#' and '*' digits.
<LI>Improved power consumption from 21.7mA to now only 12mA !
<LI>Program written in C.
<LI>Useless Microphone circuit removed. </LI></UL>
<P></P>
<H2>Assembly</H2>
<P><A href="http://www.infidigm.net/projects/dtmf2/dtmf2b.jpg"><IMG height=141
src="DTMF Decoder 2 by Infidigm.files/dtmf2b-s.jpg" width=231 align=right></A>
The DTMF Decoder 2 can be assembly by anyone with general electronic knowledge
and soldering skills.</P>
<P>A <A href="http://www.infidigm.net/projects/dtmf2/dtmf2pcb.pdf">PCB
layout</A> is provided if one wishes to construct their own PCB. Simply print
the file at 1:1 onto an overhead transparency. (Get the correct sheet for your
type of printer) I used a kit by MG Chemicals (<A
href="http://www.e-sonic.com/">E-Sonic</A> Search for 416-K) to produce my PCB.
The provided PCB layout's smallest traces are 15 thou wide. Drill the holes for
the headers at 40 thou. Drill the holes for the 20K POT, the buttons, and the
audio jack at 35 thou. Drill the rest of the holes at 30 thou. Drill bits can be
found a most hobby stores.</P>
<P>Review the <A
href="http://www.infidigm.net/projects/dtmf2/dtmf2sch.jpg">schematic</A> and <A
href="http://www.infidigm.net/projects/dtmf2/dtmf2pp.jpg">parts placement
diagram</A> before beginning assembly for proper orientation of ICs and
capacitors. Begin by installing the 7 jumper wires. Next solder in all the
resistors and capacitors. Then solder in the buttons, the phone and audio jack,
the 20K POT and the crystal. Solder in the 20 pin socket, ICs and 9v battery
connector. Next solder the DB-9 connector to the end of the PCB. Short pins 7
and 8 on the DB-9 together by bridging them with solder. At this point, connect
power and test the decoder for +5V between pins 10 and 20 on the 20 pin socket.
Finally install the two, seven pin headers into the LCD <A
href="http://www.infidigm.net/projects/dtmf2/dtmf2sd.jpg">(short side towards
LCD)</A>. Solder the longer side of the headers into the DTMF decoder PCB.
Attach the LCD and decoder together with hot glue or other means.</P>
<P>Feel free to email me with questions / problems at "drwho <I>at</I> infidigm
<I>dot</I> net". I may not respond to all questions.</P>
<H2>Programming</H2>
<P>Programming the microcontroller is the next step. The micro is a <A
href="http://www.atmel.com/atmel/products/prod23.htm">AVR AT90S2313</A> made by
ATMEL. An AVR socket programmer is required. Here is a list of programmers.</P>
<UL>
<LI><A href="http://www.digikey.com/">STK500 Development board</A> (Search for
STK500) .
<LI><A href="http://www.didya.com/ultimate.asp">Ultimate Atmel Programmer</A>
<LI><A href="http://www.lancos.com/e2p/avrisp-stk200.gif">Make you own AVR
Socket Programmer.</A> Replace D1 with a 1N5817 and use a 20-pin DIP 0.3"
socket instead of the 10 pin connector. You will have to connect a crystal
between pins 4,5 and supply power. </LI></UL>Plug the 2313 micro into the socket
programmer . Write the program <A
href="http://www.infidigm.net/projects/dtmf2/dtmf2.hex">dtmf2.hex</A> to the
micro. Instructions are provided with the specific programmer. If you make your
own Socket programmer, use <A href="http://www.lancos.com/prog.html">Pony
Prog</A> which is free Programming software. Install the micro into the DTMF
decoder. Power the decoder up, adjust the contrast, and the message "DTMF
Decoder by www.infidigm.net" should appear on the screen.
<P>NOTE - Rev 1 and rev 2 software are interchangeable in both rev 1 and rev 2
of the decoder.</P>
<H2>The Program</H2>
<P><B>Only read this section if you wish to modify the program!</B></P>The
program is written in C. It consists of one C file and was written to be
complied under the free AVR-GCC C compiler <A
href="http://www.avrfreaks.net/AVRGCC/">(WinAVR 3.3 April. 04, 2004)</A>. Read
the beginners guide to learn how to install GCC. Once you have GCC working,
download the <A href="http://www.infidigm.net/projects/dtmf2/dtmf2.zip">Project
Files for Programmers NotePad.</A> and unzip them to a directory of your
choosing. Run Programmers NotePad ( /WinAVR/pn/pn.exe). In PN go "File-->Open
Project(s)" and select "dtmf2.pnproj" in the directory where you unzipped
"dtmf2.zip". Open "dtmf2.c by double clicking on it. Click "Tools-->Make All"
to test the Compiler. The program is well documented and self explanatory.
<P></P>
<H2>Usage</H2>
<P>To use the DTMF decoder, simply connect it to a 9V battery and the phone
line. The DTMF decoder will accept ISOLATED DC voltages from 7 to 20 V for
power. Upon power up the Message "DTMF decoder by www.infidigm.net" appears on
the LCD screen. The message will remain there until a DTMF digit is received or
a scroll button is pressed. If a DTMF digit is received while scrolling through
EEPROM, the LCD screen is restored and the digit is appended to the end of the
line. The LCD will auto scroll at the end of each line. Their are two scroll
buttons, UP and DOWN. They will shift the last 234 digits through the LCD screen
13 at a time. UP will move towards the oldest received digit while DOWN will
move towards the most recently received digit. Remember to set the 20K pot for
LCD CONTRAST adjustment.</P>
<P>To connect the DTMF Decoder to the computer use a 'straight-through' DB9 pin
serial cable. (Male on one end, female on the other) The connection to the
computer is electrically isolated by the 4N25 Opto-isolator. (This is necessary
so the phone line isn't shorted out to earth GND) The connection is TX only.
This means that the information can only be sent from the DTMF decoder to the
computer. Open HyperTerminal and setup a new connection for the appropriate COMM
port. Set BAUD to 9600 8-N-1. Go into ASCII setup and make sure "Append line
feeds to incoming line ends" is checked.</P>
<P>Upon power up the DTMF decoder will send the message "DTMF Decoder by
www.infidigm.net" to HyperTerminal along with the last 234+ received digits from
EEPROM. Every time a DTMF is received, the decoder will send the digit to
HyperTerminal.</P>
<P>NOTE - The sensitivity of the decoders chip can be adjusted by changing R7
and R8. Where Av = R8 / R7. The schematic shows Av = 1</P>
<H2>Parts List</H2>
<P>The list includes parts for the DTMF Decoder. All part numbers are for
Digikey unless their is a link to another supplier.
<TABLE>
<TBODY>
<TR>
<TD>Quantity</TD>
<TD>Value</TD>
<TD>Description</TD>
<TD>Digikey Part No.</TD>
<TD>Component</TD></TR>
<TR>
<TD>1</TD>
<TD>78L05</TD>
<TD>+5V Regulator</TD>
<TD>296-1365-1-ND</TD>
<TD>U1</TD></TR>
<TR>
<TD>1</TD>
<TD>MCP120</TD>
<TD>Supply Supervisor</TD>
<TD>MCP120-450DI/TO-ND</TD>
<TD>U5</TD></TR>
<TR>
<TD>1</TD>
<TD>AT90S2313</TD>
<TD>Microprocessor</TD>
<TD>AT90S2313-10PI-ND</TD>
<TD>U2</TD></TR>
<TR>
<TD>1</TD>
<TD>MT8870DE</TD>
<TD>DTMF Decoder</TD>
<TD><A href="http://www.e-sonic.com/">E-SONIC</A></TD>
<TD>U4</TD></TR>
<TR>
<TD>1</TD>
<TD>4N25</TD>
<TD>Opto-isolator</TD>
<TD>160-1300-5-ND</TD>
<TD>U3</TD></TR>
<TR>
<TD><BR></TD></TR>
<TR>
<TD>1</TD>
<TD>10uF</TD>
<TD>Dielectric</TD>
<TD>P10316-ND</TD>
<TD>C1</TD></TR>
<TR>
<TD>4</TD>
<TD>4.7 uF</TD>
<TD></TD>
<TD>P1199-ND</TD>
<TD>C6,7,9,10</TD></TR>
<TR>
<TD>3</TD>
<TD>0.1 uF</TD>
<TD></TD>
<TD>P4525-ND</TD>
<TD>C2,4,8</TD></TR>
<TR>
<TD>2</TD>
<TD>18pF</TD>
<TD></TD>
<TD>P4840-ND</TD>
<TD>C11,C12</TD></TR>
<TR>
<TD><BR></TD></TR>
<TR>
<TD>1</TD>
<TD>4.7K</TD>
<TD>1/4 Watt</TD>
<TD>4.7KQBK-ND</TD>
<TD>R4</TD></TR>
<TR>
<TD>3</TD>
<TD>10K</TD>
<TD>1/4 Watt</TD>
<TD>10KQBK-ND</TD>
<TD>R1,2,6</TD></TR>
<TR>
<TD>2</TD>
<TD>47K</TD>
<TD>1/4 Watt</TD>
<TD>47KQBK-ND</TD>
<TD>R7,R8</TD></TR>
<TR>
<TD>1</TD>
<TD>390K</TD>
<TD>1/4 Watt</TD>
<TD>390KQBK-ND</TD>
<TD>R9</TD></TR>
<TR>
<TD>1</TD>
<TD>20K POT</TD>
<TD>Vertical POT</TD>
<TD>36G24-ND</TD>
<TD>R5</TD></TR>
<TR>
<TD><BR></TD></TR>
<TR>
<TD>1</TD>
<TD>16x2</TD>
<TD>LCD</TD>
<TD>73-1025-N</TD>
<TD>LCD</TD></TR>
<TR>
<TD>1</TD>
<TD></TD>
<TD>RJ 11 Jack</TD>
<TD>CCM9000-ND</TD>
<TD>Phone</TD></TR>
<TR>
<TD>1</TD>
<TD></TD>
<TD>1/8 Audio Jack</TD>
<TD>CP-3543N-ND</TD>
<TD>Audio</TD></TR>
<TR>
<TD>1</TD>
<TD></TD>
<TD>9V Connector</TD>
<TD>BS6I-HD-ND</TD>
<TD>Batt</TD></TR>
<TR>
<TD>1</TD>
<TD></TD>
<TD>20-pin Socket</TD>
<TD>A9420-ND</TD></TR>
<TR>
<TD>2</TD>
<TD></TD>
<TD>Push Buttons</TD>
<TD>P8006S-ND</TD>
<TD>S1,S2</TD></TR>
<TR>
<TD>2</TD>
<TD>0.1"</TD>
<TD>7-pin Header strip</TD>
<TD>WM4005-ND</TD></TR>
<TR>
<TD>1</TD>
<TD>3.579545 Mhz</TD>
<TD>3.58 Mhz Crystal</TD>
<TD>300-6001-ND</TD>
<TD>Y1</TD></TR>
<TR>
<TD>1</TD>
<TD>Female</TD>
<TD>DB9 Connector</TD>
<TD>A2047-ND</TD>
<TD>DB9</TD></TR></TBODY></TABLE></P>
<H2>Files</H2>
<P><A href="http://www.infidigm.net/projects/dtmf2/dtmf2sch.jpg">DTMF decoder
Schematic</A><BR><A
href="http://www.infidigm.net/projects/dtmf2/dtmf2pcb.pdf">PCB Layout</A> <A
href="http://www.infidigm.net/projects/dtmf2/dtmf2pcbm.pdf">(Mirror
image)</A><BR><A href="http://www.infidigm.net/projects/dtmf2/dtmf2pp.jpg">Parts
Placement</A><BR><A href="http://www.infidigm.net/projects/dtmf2/dtmf2.zip">All
Program Project Files.</A><BR><A
href="http://www.infidigm.net/projects/dtmf2/dtmf2.c">C Source Code</A><BR><A
href="http://www.infidigm.net/projects/dtmf2/dtmf2.hex">Hex file for
AT90S2313</A></P>
<P><A
href="http://www.atmel.com/dyn/resources/prod_documents/DOC0839.PDF">AT90S2313
Data Sheet (Microprocessor)</A><BR><A
href="http://assets.zarlink.com/products/datasheets/zarlink_MT8870D_MAR_97.pdf">MT8870DE
Data Sheet (DTMF Decoder)</A><BR><A
href="http://www.optrex.com/SiteImages/PartList/SPEC/16207cae.pdf">LCD Data
Sheet</A></P></BODY></HTML>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -