DTMF Generator/Dialer/Encoder Features Applications Specification
DTMF Generator/Dialer/Encoder Features Applications Specification DTMF Generator/Dialer/Encoder Features Applications Specification
- Page 4 and 5: Interfacing with AT89S52Here is app
- Page 6: void sendDTMF(unsigned char *s,unsi
Interfacing with AT89S52Here is application on how to interface with 89S52 microcontroller and generate <strong>DTMF</strong> as per yourapplication.Source Code is given on next page.VCCAT89S52 InterfacingVCCC810uF 16VR110K39383736353433321234567831+9U2AT89S52P0.0/AD0P0.1/AD1P0.2/AD2P0.3/AD3P0.4/AD4P0.5/AD5P0.6/AD6P0.7/AD7P1.0/T2P1.1/T2EXP1.2P1.3P1.4/SSP1.5/MOSIP1.6/MISOP1.7/SCKEA/VPPRSTGND20VCC 40XTAL119C1100nP2.0/A8P2.1/A9P2.2/A10P2.3/A11P2.4/A12P2.5/A13P2.6/A14P2.7/A15P3.0/RXD 10P3.1/TXD 1112P3.2/INT013P3.3/INT114P3.4/T015P3.5/T116P3.6/WR17P3.7/RDXTAL2182122232425262728PSEN 29ALE/PROG 30Y1CSDATACLKVCC654321U1Sunrom <strong>DTMF</strong> Board Model: 1112+-C933p11.0592C1033p4Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com
Author: Sunrom Technologies 9/2/2012// Board: <strong>DTMF</strong> <strong>Encoder</strong>/<strong>Generator</strong> Demo Model: 1112 at Sunrom.com// The program can generate <strong>DTMF</strong> audio for dialing or remote control// Compiler: Keil C51 MCU: AT89S52#include // Standard 8051 defines#include // for nop()#define delay_5us() _nop_();_nop_();_nop_();_nop_()#define CS#define DATA#define CLKP3_5 // Define which MCU pins are connected to <strong>DTMF</strong> boardP3_6P3_7// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// -=-=-=-=- Delay x ms -=-=-=-=-=-=-=// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=void delay_ms(int x) // delays x msec (at fosc=11.0592MHz){int y=0;while(x>=0){for (y=0; y>=1;}delay_ms(100); // Important, This time decide how long <strong>DTMF</strong> tone is generated.CS=1; // Deselecting CS stops current <strong>DTMF</strong> tone.}5Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com
void send<strong>DTMF</strong>(unsigned char *s,unsigned char l){while(l--){Write5Bits(*s);delay_ms(100); //Important, This time decides after how much time// next tone is sent.s++;}}// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=// -=-=-=-=- Main Program -=-=-=-=-=-=-=// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=void main(){unsigned char data test_number[]={1,3,4,7,4,4,6,9,8,0,6};//test number to dialwhile(1) // Loop Forever{// Dial the whole string, function needs string// & its length as parameterssend<strong>DTMF</strong>(test_number,11);}}delay_ms(1000); // After what time again function is called again6Sunrom Technologies Your Source for Embedded Systems Visit us at www.sunrom.com