+ Reply to Thread
Results 1 to 9 of 9

Thread: Atmel AT89C51 Keyboard Interface

  1. #1
    joshr Newbie
    Join Date
    Jun 2006
    Posts
    2

    Default Atmel AT89C51 Keyboard Interface

    I am looking for a little help from somebody that has experience connecting a matrix style keypad to the Keyboard IF on the AT89C51.

    I have a 4x4 matrix style keypad and I am not quite sure the proper method of connecting, debouncing and scanning for keypresses. My best assumption is to debounce the 4 row pins and connect them to the keyboard interrupts on Port1. Then I would leave the other 4 column pins bouncy and connect them to regular inputs. Upon interupt I would scan the inputs to see which key was pressed....

    Is there a better method of interfacing with the keypad?


  2. #2
    akg
    akg is offline
    akg Newbie
    Join Date
    Sep 2005
    Location
    India
    Posts
    1,406

    Default

    i'll redirect u to
    http://www.winpicprog.co.uk/pic_tuto...ypad_board.htm
    http://www.winpicprog.co.uk/pic_tutorial9.htm - > the first part explaines the method

    HTH
    Gods own Country
    Incredible !ndia

    www.flickr.com/photos/_akg/

    "Give a man a fish, and he will eat for a day. Teach that man to fish, and he will eat for a lifetime."

  3. #3
    joshr Newbie
    Join Date
    Jun 2006
    Posts
    2

    Default What Atmel said

    Hello

    You can use 4 bit of a port like port1 for 4 lines you pull alternately one after the other, and use the remaining 4 bit of the port1 with activated interrupt to scan the column. You can do the debounce with a timer activated in the keyboard interrupt routine.


    Best regards
    Michel Passemard
    Atmel 8051 Technical Support

    --
    I wonder if I can leave the lines going into the interrupt bouncy?

  4. #4
    johnsmith123 Newbie
    Join Date
    Sep 2005
    Posts
    125

    Default 89C51 keypad interface

    this is a 4 x 4 interface with code. The code is in C and it includes debouncing.

    I can't remember where I got this.
    I hope this helps.
    Attached Files

  5. #5
    mcs51mc Newbie
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    339

    Default Assembler

    Do you prefer assembler?
    Did you use the search function of this forum? I presume not because if you did, you find this one
    4x4 key pad programing - please help
    with HW description and assembler code...
    Good luck

  6. #6
    johnsmith123 Newbie
    Join Date
    Sep 2005
    Posts
    125

    Default A51 sources?

    Quote Originally Posted by mcs51mc
    Do you prefer assembler?
    Did you use the search function of this forum? I presume not because if you did, you find this one
    4x4 key pad programing - please help
    with HW description and assembler code...
    Good luck
    mcs51mc I saw that post and was just wondering what assembler to use for these sources. Is it A51.exe? IF so where to download? Any links?

    Thanks

  7. #7
    mcs51mc Newbie
    Join Date
    Feb 2006
    Location
    Belgium
    Posts
    339

    Default Yes it is

    and you can download it from http://www.ustr.net/files/download.shtml

    Have fun...

  8. #8
    maha Newbie
    Join Date
    Jun 2006
    Posts
    2

    Default Best Assembler

    I've worked with this assembler. it is so clean . produces 2 files .lst file and the hex file. the simulator also i found it very very useful, though it is a demo version i used to seperate the codes into blocks and will execute it. Hence i recommend you all this assembler and simulator. the later is dos based but that's really fun with few keys as input.

    Regards,
    maha
    Attached Files

  9. #9
    ansarirahim Newbie
    Join Date
    Nov 2008
    Posts
    2

    Default

    Dear All
    Can anybody tell me to interface LCD 16pin (2 pin for back light) with AT89c2051 which is receiving serial data from pc and will display accordingly.
    Pls do urgent....i will be too much gratefull ..

+ Reply to Thread

Tags for this Thread