Caller id project
Discussion in "Project Doubts" started by gautya123 Jul 25, 2007.
Wed Jul 25 2007, 05:05 pm
so i have created a new thread.........
so sir could u plz give me an overview of the circuit diagram.....
and the project is directly connected to the telephone line...
so sir could u plz give me an overview of the circuit diagram.....
and the project is directly connected to the telephone line...
Wed Jul 25 2007, 06:59 pm
First of all talking about the circuit. I will give a brief description of the ICs used.
1. MT8870: A DTMF decoder IC, parallel o/p.
2. AT89C2051: 8051 Controller
3. LCD: For display
4. MCT 2E: Opto coupler to check the receiver is picked or not.
Now Software..
The code is really simple, at the top is ports definition. Defining the MT8870 interface as..
To check the receiver is off hook or not this in is used
After that LCD ports are defined. i think i don't need to explain that. LCD is used in 4-bit mode.
Now let me take you to the "ORG 0H"
first two three instructions are clear, we call the routine to initialize the LCD and then display the title on the LCD. The subroutine TITLE1 is defined at the bottom you can see in the code.
Now comes this part
first we make PHONE and STD pin as i/p, i have already explained why these pins are used for. To know the detailed use of STD pin please refer to MT8870 datasheet.
in the third instruction we are checking if the phone is off-hook or not. if the phone is off-hook then call the routine DISP_NUM
i.e. Display the number which is being dialed by the user.
if the phone is not picked then, check if the STD pin is high, which means incoming call is there.. so call the subroutine DISP_CALLER
i.e. display the caller's number.
Now lastly the explanation of two routines DISP_NUM and DISP_CALLER
This routine is to display number which is being dialed by the user. So first instruction call the routine PLZDIAL. which will display "please dial..." message on the LCD.
then we make STD and PHONE pin as i/p
then we check if the phone is still off hook or not... if PHONE is set means its on-hook, so go back to label "MAINS1"
if its off-hook i.e. if PHONE bit is clear, then wait for the user to dial a number, means we wait for STD for set. and if the STD is set, then get the number from MT8870, and display it on the LCD. and wait for STD to go low, and ready to get the second DTMF decoded value. and loop goes on till phone is off-hooked.
now comes DISP_CALLER subroutine, this is very much similar to that of DISP_NUM.
first instruction will display the string "Incoming call..."
second string with display the first digit of the number obtained from MT8870 on the LCD. And check the phone is off-hooked or not.. after that working is similar to that of DISP_NUM.
Now i have explained you the core routines above, other subroutines like GET_NUMBER, initializing LCD and displaying data etc you can understand them easily. still if you feel any problem you can ask anytime.
1. MT8870: A DTMF decoder IC, parallel o/p.
2. AT89C2051: 8051 Controller
3. LCD: For display
4. MCT 2E: Opto coupler to check the receiver is picked or not.
Now Software..
The code is really simple, at the top is ports definition. Defining the MT8870 interface as..
STD EQU P3.2 Q1 EQU P3.0 Q2 EQU P3.3 Q3 EQU P3.4 Q4 EQU P3.5
To check the receiver is off hook or not this in is used
PHONE EQU P3.7
After that LCD ports are defined. i think i don't need to explain that. LCD is used in 4-bit mode.
Now let me take you to the "ORG 0H"
ORG 00H ; Reset MOV PSW,#RB0 ; Select register bank 0 MOV SP,#25H CALL RESETLCD4 CALL INITLCD4 MAINS1:CALL TITLE1 CALL DELAY CALL DELAY
first two three instructions are clear, we call the routine to initialize the LCD and then display the title on the LCD. The subroutine TITLE1 is defined at the bottom you can see in the code.
Now comes this part
MAINS: SETB PHONE SETB STD JNB PHONE,DISP_NUM JB STD,DISP_CALLER AJMP MAINS
first we make PHONE and STD pin as i/p, i have already explained why these pins are used for. To know the detailed use of STD pin please refer to MT8870 datasheet.
in the third instruction we are checking if the phone is off-hook or not. if the phone is off-hook then call the routine DISP_NUM
i.e. Display the number which is being dialed by the user.
if the phone is not picked then, check if the STD pin is high, which means incoming call is there.. so call the subroutine DISP_CALLER
i.e. display the caller's number.
Now lastly the explanation of two routines DISP_NUM and DISP_CALLER
DISP_NUM: CALL PLZDIAL SETB STD SETB PHONE UPP1: JB PHONE,MAINS1 JNB STD,UPP1 CALL GET_NUMBER MOV A,FLAGS ADD A,#30H MOV R4,A CALL WRLCDDATA JB STD,$ SETB STD SETB PHONE AJMP UPP1
This routine is to display number which is being dialed by the user. So first instruction call the routine PLZDIAL. which will display "please dial..." message on the LCD.
then we make STD and PHONE pin as i/p
then we check if the phone is still off hook or not... if PHONE is set means its on-hook, so go back to label "MAINS1"
if its off-hook i.e. if PHONE bit is clear, then wait for the user to dial a number, means we wait for STD for set. and if the STD is set, then get the number from MT8870, and display it on the LCD. and wait for STD to go low, and ready to get the second DTMF decoded value. and loop goes on till phone is off-hooked.
now comes DISP_CALLER subroutine, this is very much similar to that of DISP_NUM.
DISP_CALLER: CALL DISP_CALL CALL GET_NUMBER MOV A,FLAGS ADD A,#30H MOV R4,A CALL WRLCDDATA JB STD,$ SETB PHONE SETB STD UPP2: JNB PHONE,MAINS12 JNB STD,UPP2 CALL GET_NUMBER MOV A,FLAGS ADD A,#30H MOV R4,A CALL WRLCDDATA JB STD,$ SETB STD SETB PHONE AJMP UPP2
first instruction will display the string "Incoming call..."
second string with display the first digit of the number obtained from MT8870 on the LCD. And check the phone is off-hooked or not.. after that working is similar to that of DISP_NUM.
Now i have explained you the core routines above, other subroutines like GET_NUMBER, initializing LCD and displaying data etc you can understand them easily. still if you feel any problem you can ask anytime.
gautya123 like this.
Tags caller id project using AT89C2051AT89C2051 projectsworking of caller id projectmicrocontroller based caller ID projectAT89C2051 based Caller id project
Wed Jul 25 2007, 07:46 pm
thanx a ton..this will help a lot....lets see if our coll approves this proj.....
one more doubt can we bulid the MT 8870 IC(dtmf decoder) ourselves...........
one more doubt can we bulid the MT 8870 IC(dtmf decoder) ourselves...........
Wed Jul 25 2007, 08:00 pm
well.. nothing is impossible.. in the download section "8051 codes" i have DTMF decoding code there. you can download it. and try it out.. that will need a little bit of more workout. try if that code is giving you right results. then you can replace the MT8870 IC and also you might need to rewrite the whole code.. for caller id as many things are going to change
Powered by e107 Forum System