Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

communijcation between PC keyboard and Microcontroller

Status
Not open for further replies.

HiteshDR

New Member
hello,

i want to communicate the PC keyboard with microcontroller (89S51/52) through serial communication.
i am confused about that how microcontroller will read the pressed key on PC keyboard, and how it will do the action based on it.

if it would be in C then we can just take ASCII value of pressed key and compare it.
can we do here in same way or is there any other way..???
 
If you want to connect an AT keyboard to microcontroller, looks here:

**broken link removed**
 
but it is for 68HC705J1A micro controller chip.
i am using 89S51 microcontroller.
so is there any link related to 89S51 microcontroller & PC Keyboard communication??
 
You can also read this one: https://www.electro-tech-online.com/threads/at-keyboard-with-8051-µc.31446/?highlight=keyboard

If by "serial comm" you mean the RTX en TXD pins of port 3 and SFR "SBUF" of your µC : you can't for several reasons.

Remember that the clock is generated by the keyboard. You have check for every edge and clock the dataline in or out.
Even when you want to send a code to the keyboard you have to wait for the clock coming from the keyboard and then start sending your command on every edge.

If you have further specific questions I'm willing to answer them... ...
 
Last edited:
thanks...

simrantogether said:


thanks for your reply but L.Chung also had sent me same link.
Simran i want to communicate PC keyboard with microcontroller (89S51/52) of atmel 8051 series.
if any one have then please forward me the link.

Thanks to you alll...!!!!!!!
 
Last edited:
HiteshDR said:
... ... i want it to convert hex file to asm file of atmel 8051 series.... ...
Are you sure about the direction? hex to asm ??
That mean you have a programm from I don't know where and you want to convert it to assembler code so that you can read it. Wright?

You didn't write your own code using assembler and want to make a hex file for you controller. Wright?

Just ask this because you asked for an assembler in another thread and here you ask for a disassembler.
I'm a little confused :(
 
HiteshDR said:
thanks for your reply but L.Chung also had sent me same link.
Simran i want it to convert hex file to asm file of atmel 8051 series.
if any one have then please forward me the link.

Thanks to you alll...!!!!!!!

Won't work, you need to re-compile the source code.
 
Hi HitectDR,

The following is exactly what you have wanted. The website is in Polish but all information like schematic and source file are there.

The author uses AT89C2051 which has the same ASM code as 8051 so you should have no problem coding it on 8051. The obtained keypress is sent out via RS232 using a MAX232 chip.

**broken link removed**
 
eblc1388 said:
Hi HitectDR,

The following is exactly what you have wanted. The website is in Polish but all information like schematic and source file are there.

The author uses AT89C2051 which has the same ASM code as 8051 so you should have no problem coding it on 8051. The obtained keypress is sent out via RS232 using a MAX232 chip.

**broken link removed**


hey L.Chung

thanks for replying well.
it's good link & little bit to understand the schematic.
but Sir, i didnt understand the language used in tutorial link & coding.
if you dont mind can you please guide me to translete it in English, so i can understand it.

thanks again
 
HiteshDR said:
thanks for your reply but L.Chung also had sent me same link.
Simran i want it to convert hex file to asm file of atmel 8051 series.
if any one have then please forward me the link.

Thanks to you alll...!!!!!!!


hello all,

i am sorry to say but
i have replied wrong by mistake
because i want keyboard interfacing with 89S51 or 52.
so, if any one can guide me for this interfacing then it would be beter.
thank you all...!!!
 
Hi HiteshDR,
Did you read this one, not only the post but also the other tread :)

mcs51mc said:
You can also read this one: https://www.electro-tech-online.com/threads/at-keyboard-with-8051-µc.31446/?highlight=keyboard

If by "serial comm" you mean the RTX en TXD pins of port 3 and SFR "SBUF" of your µC : you can't for several reasons.

If you have further specific questions I'm willing to answer them... ...
I have working code for 8051 system documented partially in English and Dutch but I will not give it away so easily, you have to prove me you working on it, not just asking for working code and expect it to fall into your hands. What's the point getting it just like that with no effort?

Please allow me te repeat myself "If you have further specific questions I'm willing to answer them... ..." in other words, show me what you already did, tell me your technical, coding, ... ... problems and I will answer them as good as I can.

What do you think about the mode 2 and mode 3 thing?
Is any mode all right for you or not?
I assign personal codes to specific non-printable keys, is that ok for you?
How will you implement the code, interrupt based or not?
How will you handle the "Pause" key in normal mode (7 bytes for one key :D)?

PS: That other code is in Polish, you know from Poland somewhere in Eastern Europe... ... I didn't understand the language either but I managed to understand some parts of what he's doing :(:):(
 
Status
Not open for further replies.

Latest threads

Back
Top