You are on page 1of 3

convert ASCII characters to keyboard scan codes

Pgina 1 de 3

Log in
Remember Me?

Register

Lost password?

Resend activation?

Forum
New Posts

Activity Stream
Unanswered Posts FAQ

Search
Forum Actions

Help

Rules

Groups

Albums

Blogs

What's New?
Advanced Search

Community

Quick Links

Forum Rules

Forum

Digital Design and Programming

PC Programming and Interfacing

convert ASCII characters to keyboard scan codes


Results 1 to 9 of 9

+ Post New Thread


Thread: convert ASCII characters to keyboard scan codes
LinkBack Thread Tools

Search Thread

23-12-05, 06:28

#1

convert ASCII characters to keyboard scan codes


Member level 5

Hi everyone,
Join Date: Posts: Helped: Points: Level: Jan 2005 87 0/0 2,016 10

Is there a way to convert ASCII characters to keyboard scan codes in hardware implementation? thanks regards

Reply With Quote

TI's SIMPLE SWITCHER DC/DC Converters Offer Robust Power Supplies & Work w/Enhanced WEBENCH. www.ti.com

PLC Software Siemens: Your global leader for PLC programming software! siemens.com/industrial-software

23-12-05, 06:50

#2

NguyenHai
Member level 1

Re: convert ASCII characters to keyboard scan codes


You can link to: http://www.atmel.com/dyn/resources/p...ts/DOC1235.PDF. This application note of atmel for AVR

Achievements: Join Date: Posts: Helped: Points: Level: Jan 2003 37 3/3 2,263 11

Reply With Quote

23-12-05, 07:57

#3

Re: convert ASCII characters to keyboard scan codes


Advanced Member level 5

Achievements: Awards: Join Date: Location: Posts: Helped: Points: Level: Oct 2004 West Coast 7,826 2177 / 2177 156,855 94

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 Incomming '1' ASCII -->31 Outgoing 16h .. and so on .. Regards, IanP

Reply With Quote

Stepper Control Tutorials Free Web Tutorials from Galil, the Leader in Stepper Motor Control. www.GaliLmc.com

Anuncie com o Google Escolha seu oramento e anncio. Comece a anunciar online hoje. Services.Google.com/AwCreditosPromo

23-12-05, 08:18

#4

http://www.edaboard.com/thread52563.html

14/10/2012

convert ASCII characters to keyboard scan codes

Pgina 2 de 3

Re: convert ASCII characters to keyboard scan codes


Member level 5

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 thanks

Join Date: Posts: Helped: Points: Level:

Jan 2005 87 0/0 2,016 10

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 thanks

Reply With Quote

protoTx RF Upconverters Go from I/Q or IF to RF. USB programmable, 300-5000 MHz. polyphasemicrowave.com

PC USB Control Interfaces Connect your control panel switches pots, LEDs using our universal PCBs www.u-hid.com

23-12-05, 08:49

#5

Re: convert ASCII characters to keyboard scan codes


Advanced Member level 5

Achievements: Awards: Join Date: Location: Posts: Helped: Points: Level: Oct 2004 West Coast 7,826 2177 / 2177 156,855 94

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

Reply With Quote

23-12-05, 08:58

#6

The Svin
Junior Member level 3

convert ASCII characters to keyboard scan codes


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]

Join Date: Posts: Helped: Points: Level:

Mar 2005 31 3/3 1,296 8

Reply With Quote

23-12-05, 09:16

#7

Re: convert ASCII characters to keyboard scan codes


Member level 5

it depends on what you are going to do ....


Achievements:

fpga or nicro.... micro is the easiest one.... regards maxer


Join Date: Posts: Helped: Points: Level: May 2001 88 3/3 2,274 11

Reply With Quote

http://www.edaboard.com/thread52563.html

14/10/2012

convert ASCII characters to keyboard scan codes

Pgina 3 de 3

Siemens PLC Very large stock of S5 and S7 Fast worldwide shipping at low cost www.plcsweden.com

PLC Simulators Programming made easy for all types of PLCs www.plcdev.com

23-12-05, 14:50

#8

Re: convert ASCII characters to keyboard scan codes


Member level 5

Hi IanP
Join Date: Posts: Helped: Points: Level: Jan 2005 87 0/0 2,016 10

Below is actually what my intention for building my project.i require a hardware interface.Read further below: ------------------------------------------------------------------------------------------

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 windows 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 its 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 receivers 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 its correct. Thanks.

Reply With Quote

23-12-05, 15:27

#9

Re: convert ASCII characters to keyboard scan codes


Advanced Member level 5

Achievements: Awards: Join Date: Location: Posts: Helped: Points: Level: Oct 2004 West Coast 7,826 2177 / 2177 156,855 94

I would employ 89C52, 89C420, or similar microcontroller, and set its UART to 9-bit mode ( see: http://www.8052.com/tutser.phtml ) .. 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 ..

Reply With Quote

+ Post New Thread


What are the differences between rs232 and rs432? | Parallel port interfacing in Visual Basic

Similar Threads
Hi.. How to scan this keyboard? (7) Looking for resources on printing ascii codes (5) How to convert hex to ascii and display it on LCD ? (1) Looking for ASCII codes table (1)

-- Edaboard Classic

Contact Us Forum for Electronics Privacy Statement Terms of Service Top

All times are GMT +1. The time now is 01:55. Powered by vBulletin Copyright 2010 vBulletin Solutions, Inc. All rights reserved. SEO by vBSEO 2011, Crawlability, Inc.

http://www.edaboard.com/thread52563.html

14/10/2012

You might also like