how to detect numbers from phone keypad?

Discussion in 'Embedded Systems and Microcontrollers' started by tuanvoi, Mar 3, 2009.

  1. tuanvoi

    Thread Starter Active Member

    Oct 31, 2008
    56
    0
    Hi all,
    I'm using PIC18F4550. Could someone help me with this?
    I want the PIC to detect the numbers the I press from the phone. Any sample codes or hints would be very appreciate. Thank you!
    Tom
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,641
    2,344
  3. tuanvoi

    Thread Starter Active Member

    Oct 31, 2008
    56
    0
    so when I use the external DTMF decoder, what will PIC will see at the output of the decoder? Thanks
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,641
    2,344
    Hello,

    When you read teh datasheet you will find this table:

    [​IMG]

    Greetings,
    Bertus
     
  5. tuanvoi

    Thread Starter Active Member

    Oct 31, 2008
    56
    0
    Can someone give me available decoders? The one above is no more available. Thanks
     
  6. masoodiqbal

    New Member

    Mar 8, 2009
    3
    0
    #include <16f877a.h>
    #fuses hs,put,nowdt,NOPROTECT
    #use delay (clock=20000000)
    #use rs232(baud=9600,parity=n,bits=8, xmit=PIN_C6,rcv=PIN_C7)
    #byte portc=7//virtual terminal
    #byte kbd = 6
    #include <kbd.c> //key pad driver file see in compiler folder(driver)
    #include <LCD_1.c> //Lcd driver
    unsigned int c;
    void main (void){

    set_tris_c(0b10000000);
    portc=0;
    kbd_init();
    lcd_init();
    lcd_putc('\f');

    while(1){
    c = kbd_getc();
    if (c>0)
    printf(lcd_putc,"\fNow %c Pressed ",c);
    if(c>0)
    printf("\f Now %c Pressed",c);
    }//while
    }//main
     
Loading...