Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Translation from one code to the other is not difficult thing at all ..
You will need a microcontroller which will take an ASCII character from serial port and, using a look-up table, will translate it from ASCII to PS/2 keyboard, and will output the new code through the same port or in any different way ..
You will have to create a look-up table by yourself, but don't worry, it is not that difficult ..
For example:
Incomming character '0' (zero) in ASCII --> 30h
Outgoing number (equivalent in PS/2 scan code) -->45h
actually i have created the lookup table to convert ASCII to keyboard scancode.
Now i just cannot figure out how to send the scancode(which is ASCII) serially and then be interpreted as keystrokes at the destinated PC's application.This will require a HARDWARE circuit.
Qn1. How should i do to build this HARDWARE circuit
thanks
Added after 2 minutes:
hi LanP,
actually i have created the lookup table to convert ASCII to keyboard scancode.
Now i just cannot figure out how to send the scancode(which is ASCII) serially and then be interpreted as keystrokes at the destinated PC's application.This will require a HARDWARE circuit.
Qn1. How should i do to build this HARDWARE circuit
If you would like to feed these codes through the serial port of the other PC then you don't need additional hardware, but a DLL that will somehow deliver these codes to WORD or other WINDOWS applications ..
Or, am I missing something here ???
Regards,
IanP
1. It depends on page code,'cause in different page code you have different ASCII code for the same charater.
2.Easiest and the fastest way is to create table with relation scancode=byte ptr table[ASCII code]. And use ASCII code as INDEX to scan
mov al,byte ptr [pointer to string]
movzx eax,al
mov al,table[eax]
I have written a C++ application for sending RS232 serial data in single PC and I want the data to be received on another PC and captured as keystrokes. These keystrokes can then be used in any window’s word applications and appeared as though they are typed from the keyboard.
I have also coded the program such that for each ASCII character, it is converted into it’s corresponding set of scancode. For example,’a’ is translated into IC FO IC and sends as string “ICF0IC” over the serial link. This ensures the scancode is correctly interpreted by the keyboard controller on the receiver’s side PC.
However I do not know how to go about implementing a hardware device that can achieve the conversion of RS232 data to keyboard data.
Qn(a): Can anyone help me with the schematic design or give some advice? I have come up with overall diagram. How the device should behave but I am unsure if it’s correct.
I would employ 89C52, 89C420, or similar microcontroller, and set its UART to 9-bit mode ( see: **broken link removed** ) .. The micro should use serial port interrupt and a small serial port receive buffer ..This will take care of receiving data ..
As far as transmitting data to the Keyboard Port (I suspected that earlier but wasn't sure) I would use two general I/Os from PORT1 (open drain), one as DATA the other as CLOCK, and TIMER2 to generate 16.7kHz clock as required, so it will be like creating another UART but in software, or take clock from an external source and just shift data out ..
Regards,
IanP
BTW, why do you have 8-bit+Parity? I don't see any reason for the parity bit, and then the UART can ge configured for standard 8-bit word+1Start+1Stop ..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.