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.

PS/2 to serial

Status
Not open for further replies.

zhi_yi

New Member
Hi there, please help me, I want to make a circuit that can do such task:

the circuit would receive input from a barcode scanner's output, and then the circuit would transmit the received data to the PC's serial port. Normally, the barcode scanner's output is connected to the PC using PS/2 keyboard interface. I want to convert it into serial.

Please guide me how to build such circuit..

Thank You..
 
Last edited:
PS/2 is a synchronous serial protocol but RS232 is asynchronous.

The so called PS/2<->Serial adaptors only take care of wire connections but does not work except only for a "Combo Mouse" that is designed to work with both PS/2 AND Serial Mode.

You do realise that there is no simple answer to your problem except something intelligent sitting between these two protocols doing protocol conversion.

That said, it can be done using a microcontroller and a TTL to RS232 chip(MAX232).

An example using AVR is here, in Japanese:

**broken link removed**

All the information like circuit diagram, source and binary code are there. You can use ATTiny2313 to replace the AT90S2313.
 
What is the difference between synchronous and asynchronous serial transmission?

What is the data format from the output of a barcode scanner? Is it ASCII or specific key code?

I am sorry, I do not understand japanese language, do you have another resources in english language? How about if I use AT89S52? Is it possible?

Thank You very much..
 
Last edited:
zhi_yi said:
What is the difference between synchronous and asynchronous serial transmission?

I can only give you an overly simplified view regarding actual usage. Synchronous transfer is controlled via a master clock common to both parties and both parties know exactly when the data is coming.

The asynchronous transfer is done with both sides agree on a clock rate but in real life they will not be exactly the same due to many factors. Both parties don't know exactly when the next piece of data is going to arrive/begin. Communication is still possible with slight baudrate difference between two parties. E.g. one is at 9600 bps while another is at 9603bps.

What is the data format from the output of a barcode scanner? Is it ASCII or specific key code?

I remembered most barcode scanners output emulate a keyboard so it is like someone typing out the actual barcode using a keyboard to a computer.

I am sorry, I do not understand japanese language, do you have another resources in english language? How about if I use AT89S52? Is it possible?

I don't understand Japanese too. The software is specific to the MCU being used so it is not possible to use AT89S52 without software changes.
 
Okay, thank you very much for the answer, Do you have any tutorials regarding how to interface the barcode scanner?

I remembered most barcode scanners output emulate a keyboard so it is like someone typing out the actual barcode using a keyboard to a computer.

The keyboard have the scancode, is it? How about the barcode reader? what is the format of data transmitted? is it ASCII or scancode?
 
Keyboards output a scancode, so I assume a barcode scanner does too.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top