Documente Academic
Documente Profesional
Documente Cultură
GUIDED BY SUBMITTED BY
1
MAR ATHANASIUS COLLEGE OF
ENGINEERING
KOTHAMANGALAM
Date:…………….
2
ACKNOWLEDGEMENT
Last but not least, I would like to thank the Electronics and
communication department and the institute, in general, for extending a
helping hand at every juncture of need.
3
CONTENTS
1. Introduction 5
2. Working Principle 6
3. Block Diagram 8
4. Circuit Diagram 9
5. Circuit Explanation 10
6. Program Section 13
7. PCB Layout 21
8. Components Used 23
9. Softwares Used 24
10. Conclusion 25
11. Reference 26
12. Datasheets 27
4
INTRODUCTION
5
WORKING PRINCIPLE
6
The DTMF decoder decodes each set of frequency pairs representing the
number and the number is available as binary at the output pins of the
decoder when the TOE pin is made high. After decoding each pair of
DTMF frequencies the StD pin of the decoder goes high and interrupts
the microcontroller. The output pins of the DTMF decoder are connected
to the port A of the microcontroller. After each interrupt the decoded
number is stored in a register in the microcontroller, once all the numbers
are received, the number is displayed on the LCD. After displaying the
caller’s number on the LCD the number is stored in the internal
EEPROM of the Microcontroller, so that the received number can be
reviewed later. By Pressing RB4 display mode can accessed, By pressing
RB5 you can cycle through the received calls, Pressing RB4 again exits
the display mode.By Pressing RB6 Previous entries can be cleared.When
the memory is full newly received number automatically replaces the
oldest entry in the memory.
7
BLOCK DIAGRAM
DTMF DECODER
MICROCONTROLLER KEYPAD
LCD DISPLAY
8
CIRCUIT DIAGRAM
9
CIRCUIT EXPLANATION
POWER SUPPLY
10
MICROCONTROLLER SECTION
DISPLAY SECTION
11
which is required to see if LCD module is busy, is not possible. To avoid
problems, extra delays in software are provided after every write
command so that before writing another command/data, LCD module
should be ready (not busy). Here the LCD is used in 8 bit mode.
12
PROGRAM SECTION
#include<pic.h>
void delay2();
void dispreview(unsigned char c);
void initdisplay();
{
if (INTE==1&&INTF==1) // to store and display valid dtmf signals
{unsigned char val;
dat[m]=PORTA;
13
m++;
if(m==11) // to check whether full number is received
{command(0x01);
delay();
for(i=0;i<m;i++) // displaying number on lcd
{val=dat[i]&0x0F;
if(val==0x0A)
{
val=0x30;
}
else
{
val=val|0x30;
}
display(val);
delay();
}
}
else
14
{
val=val|0x30;
}
eeprom_write(ad,val);
ad++;
if(i==(m-1))
eeprom_write((EEPROM_SIZE-1),ad); // updating stored memory location
}
if(ad>=0x6F)
eeprom_write((EEPROM_SIZE-1),0x00); // for resetting on overflow
m=0;
}
INTF=0;
{ chk++;
if( chk>1 )
{chk=0;
initdisplay();
}
tadd=(eeprom_read(EEPROM_SIZE-1));
if( chk==1 )
15
{
command(0x01);
delay();
for(i=0;i<8;i++)
{ display(disp[i]);
delay(); /* press RB4 once for initiating display;
then press RB5 for displaying numbers
stored in eeprom; press RB4 again to
exit display mode */
}
}
}
if(chk==1)
{
if(RB5==0)
{ tadd=tadd-11;
dispreview(tadd);
if(tadd==0)
tadd=(eeprom_read(EEPROM_SIZE-1));
}
{ display(clr[i]);
16
delay();
eeprom_write((EEPROM_SIZE-1),0x00);
}
RBIF=0;
}
}
void main()
{
unsigned char com[]={0X38,0X07,0X0E,0X80,0X06};
TRISA=0XFF; // decoder o/p given to PORTA
TRISB=0XF3;
/* controls for lcd and display
RB0 : ext int. given to 'std' pin of mt8870
RB2 : data i/p or command i/p
RB3 : enable pin for lcd
RB4-RB6: as interrupt for displaying */
17
{command2(com[i]);
delay2();
}
command2(0x01);
delay2();
for(i=0;i<9;i++)
{display2(init[i]);
delay2();
}
void command(unsigned char a) // for giving commands to lcd
{
RB2=0;
PORTC=a;
RB3=1;
RB3=0;
}
void command2(unsigned char a) // for giving commands to lcd
{
RB2=0;
PORTC=a;
RB3=1;
18
RB3=0;
}
for(c=0;c<255;c++);
}
PORTC=a;
RB3=1;
RB3=0;
}
void display2(unsigned char a) // to display the argument in lcd
{
RB2=1;
PORTC=a;
19
RB3=1;
RB3=0;
}
command(0x01);
delay();
for(y=0;y<11;y++)
{display(eeprom_read(c+y));
delay();
}
}
delay();
}
}
20
PCB LAYOUT
BOTTOM LAYER
21
TOP LAYER
22
COMPONENTS USED
4.Crystal
5.Zener Diodes
6.LED’s
7.Resistors
8.Capacitors
9.Push Switches
23
SOFTWARES USED
1. Microchip MPLAB
2. Orcad Capture
4. Pic Simulator
24
CONCLUSION
25
REFERENCES
1. www.microchip.com
2. www.calmicro.com
3. www.picbasic.nl
4. www.epanorama.net
5. www.efy.com
26