electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

Interfacing keyboard to microcontroller


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers > Interfacing keyboard to microcontroller
Author Message
Drew



Joined: 15 Nov 2004
Posts: 6


Post09 May 2005 8:01   

keyboard microcontroller


I'm having a problem getting my 5 pin keyboard to interface to my microcontroller. I have the Vcc and GND lines connected to 5V and ground. I'm using an oscilloscope to read the Data and Clock lines but come up short. Even when I'm holding a key down continuously, the oscilloscope doesn't pick up any signals. Do the DATA and Clock lines have to be connected to 5V through external pull up resistors? I thought keyboards had internal pull up resistors. Thanks for any responses.
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6661
Helped: 1577
Location: West Coast


Post09 May 2005 8:15   

interfacing keyboard to 8051


It is possible that there are no pull-ups inside the keyboard, so you can easily connect ≈4.7kΩ as pull-ups.
What happens when you apply power to the keyboard, do the 3 LEDs flash a couple of times as normal?
Back to top
Drew



Joined: 15 Nov 2004
Posts: 6


Post09 May 2005 8:20   

interfacing keyboard with 8051


The lights don't flash after power up. However, it does work when plugging it into a motherboard. When I press a key continuously should I see signals on the Data and Clocks lines using the oscilloscope? I've tried this test on 3 keyboards already, coming up short each time.
Back to top
Google
AdSense
Google Adsense




Post09 May 2005 8:20   

Ads




Back to top
bogdanm



Joined: 24 Jun 2003
Posts: 112
Helped: 1


Post09 May 2005 8:34   

keyboard interfacing with 8051


The keyboard should perform a RESET on startup, and this should be visible by looking at the LEDs, they should blink briefly. Check your electrical connections. Also be aware that the KB may need well above 100mA to function properly, so check if your power source meets this requirement.
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6661
Helped: 1577
Location: West Coast


Post09 May 2005 8:37   

keyboard with microcontroller


Make sure you connect power (+5V and 0V) correctly: it should flash after power is applied.
Both lines, clock and data, are HIGH at the idle stage. When you press a button you should see pulses from High/Low/High ..
Are we talking about the same keyboards: PS/2 .. AT?
Back to top
Drew



Joined: 15 Nov 2004
Posts: 6


Post09 May 2005 9:25   

interfacing keyboard to microcontroller


My bad. The three LED lights DO flash after power up. The Data and Clock lines are held high at 5 V and remain there even when pressing on a key continuously. I'm using an AT keyboard.
Back to top
bogdanm



Joined: 24 Jun 2003
Posts: 112
Helped: 1


Post09 May 2005 9:27   

interfacing keyboard with microcontroller


This is strange. Is the keyboard connected to a microcontroller which I/O pins force the data and/or clock lines to logical 1, by any chance?
Back to top
Drew



Joined: 15 Nov 2004
Posts: 6


Post09 May 2005 9:35   

related:electrosofts.com/8051/keyboard.html


The data and clocks lines are connected to 5V through 5 Kohm external pullups. and to the oscilloscope. There are no connections to the microcontroller. Do I have to give it a permission-to-send command?
Back to top
bogdanm



Joined: 24 Jun 2003
Posts: 112
Helped: 1


Post09 May 2005 9:41   

microcontroller keyboard


No, it needs no special permissions, both clock and data are idle. Very weird. Check your oscilloscope settings.
Back to top
zhanhualiu



Joined: 09 Mar 2004
Posts: 18
Helped: 1


Post09 May 2005 10:20   

keyboard interfacing with 8051 microcontroller


Maybe this application note is useful for you.


Sorry, but you need login in to view this attachment

Back to top
fnovoac



Joined: 01 Oct 2005
Posts: 12


Post07 Oct 2005 7:38   

keyboard interfacing to 8051


does anybody have some similar code in pic basic pro???
Back to top
harshaperla



Joined: 21 Nov 2005
Posts: 7


Post15 Nov 2006 8:03   

8051 microcontroller interfacing with keyboard


Interfacing the Keyboard to 8051 microcontroller:

http://electrosofts.com/8051/keyboard.html
Back to top
jayavardhan



Joined: 01 Sep 2006
Posts: 125
Helped: 3
Location: India


Post23 Nov 2006 9:22   

interfacing of keyboard with 8051


Is the keyboard connected to a microcontroller? then force the data and/or clock to pull up.
Back to top
aviv6371



Joined: 07 Jul 2006
Posts: 47
Helped: 1


Post23 Nov 2006 22:23   

interfacing keyboard microcontroller


hi,

if u send the electric diagram it will be much more easy to help u.
r u using bi-directional communication or uni ?? make sure that the microcontroller's control pins are configured as input when using uni direction (in my opinion keyboard-host is enough).
one more thing the ideal state is reached automatically by using the pull up resistors, the micro controller should not force there "1" !!!

avi.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers > Interfacing keyboard to microcontroller
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
interfacing usb keyboard to 16f877A microcontroller (9)
Interfacing ASCII keyboard with 8051 microcontroller board (2)
USB based Keyboard Interfacing with a 8051 Microcontroller (4)
keyboard and LCD interfacing with 89C51 microcontroller (2)
interfacing PC keyboard to uC (1)
interfacing keyboard to 8051... need urgent help!!! (4)
How to keyboard to interpacing to Microcontroller MCS-51? (2)
help to chose microcontroller to interface pc keyboard & (4)
interfacing a webcam to microcontroller (1)
Interfacing W5100 to microcontroller (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS