eblc1388 Plz answer

Status
Not open for further replies.

muaz111111

New Member
I want to know that which commands i have to send to Keyboard for initilizing it nad in what sequence.
Moreover what are the necessary steps required to intilize Keyboard. I just want to have Keyboard to microcontroller (8051) communication.

Thanks in Advance.
 
A descriptive title might have gotten more interest and you might have gotten a response much sooner (or maybe your title was descriptive and I Just had no idea what it meant).

Perhaps this will help
**broken link removed**

I think the initialization commands for the keyboard (if the keyboard needs to be initialized) vary from keyboard to keyboard. SOme keyboards don't need them (if I remember right).

EDIT: I also noticed that your post is new! It was just so far down the list I thought it was old.
 
Your title is clear but it is certainly not the best one. I might not be the best person to help you as there are many other users here who can but you effectively ask them not to response.

At the bottom of the link provided by dknguyen above are the instructions for initialization handshakes between a host(your 8051) and the PS2 keyboard.

However, this is the easy part. The timing and ASCII conversion will be the hard part.

The keyboard will not send out ASCII code for any key pressed but scan codes instead. You have to receive the scan code(s) and convert them into something useful. There are ready made codes for 8051 around if you care to search using Google.
 
Ah, I thought eblc1388 was a protocal or something he was asking about.
 
i accept my fault. l have chosen that title after reading a post by eblc1388 on that topic. however thx to all of u. i will ask some more questions after reading that topic. thx once again.
 
Last edited:
I have found the following 8051 codes, after a bit of searching.

**broken link removed**

It is in ASM so if you are looking for C codes instead, then you have to look some where else.
 
muaz111111 said:
thx eblc1388. i will try this one. Any circuit diagram related to this code?

You only need two signal connections, in addition to +5V and 0V to the keyboard. The answer to your question is in the ASM file already if you have not noticed.

Code:
;------------------
; Defines
;------------------
;XXXXXXXXXXXXXXXXXXXXXXXX KeyBoard XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
.flag   KEYB_DATA,      P1.5    ; AT Keyboard data  (change this for your hardware)
.flag   KEYB_CLOCK,     P3.2    ; AT Keyboard Clock (change this for your hardware)
; This 2 pins should be connected to the keyboard crresponded pins with an 4K7 Pullup.
; The keyboard also needs GND and +5V.

p.s. I think it is a good idea you should edit/change the title of your post to "8051 and PS/2 keyboard" or something similar that people will know immediately what the thread is about without actually going into it. This also make the Forum Search function meaningful.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…