EASy68K
http://www.easy68k.com/EASy68Kforum/

Using PS/2 Keyboard from 6850
http://www.easy68k.com/EASy68Kforum/viewtopic.php?f=6&t=383
Page 1 of 1

Author:  urbancamo [ Fri Apr 13, 2007 9:24 am ]
Post subject:  Using PS/2 Keyboard from 6850

Hi,

Does anyone have any code for interfacing a standard IBM PS/2 Keyboard to a 6850? I have a MECB clone board to which I would like to communicate with an IBM PC compatible as a keyboard emulator, and would also like to connect a PS/2 keyboard to the 68k board directly.

Many thanks for the help.

Mark.

Author:  lee [ Fri Apr 13, 2007 9:44 am ]
Post subject: 

It's impractical to try to interface a synchronous PC keyboard to the asynchronous 6850.

You would be much better off using a couple of I/O port lines.

Lee.

Author:  urbancamo [ Fri Apr 13, 2007 9:48 am ]
Post subject:  MC68K <-> PS/2 Keyboard interface

So it's back to bit banging then! I wonder if anyone has done this before?

Author:  profkelly [ Fri Apr 13, 2007 3:47 pm ]
Post subject:  PC keyboard interfaced to 6850

I have interfaced a PC keyboard to a 6850 before. Here is the code I used to setup the 6850.
Code:
* ACIA setup code
* Note on ACIA setup. The IBM keyboard sends 8 Data, Odd Parity and 1 Stop Bit,
* but the stop bit is the wrong logic level for an ACIA. To make it work
* the ACIA is set to 8/N/1. This causes the parity bit to be ignored and
* results in many framing errors but the data is still valid.
  MOVE.B #03,ACIA               ; MASTER RESET
  MOVE.B #%10010100,ACIA        ; Rec. Int On,Xmit Int Off,8,N,1,/1

The PC keyboard sends a key scan code for each key, not the ASCII code. You'll need to write code to do the conversion including handling the modifier keys such as shift and control.

Author:  lee [ Fri Apr 13, 2007 5:37 pm ]
Post subject: 

profkelly wrote:
I have interfaced a PC keyboard to a 6850 before.

I didn't say it was impossible. 8^)=

How did you provide the clock for the 6850 baud rate? I found I had to use another oscillator that I could tweak to get it to work.

Did it work for more than one keyboard? Even keyboards from one manufacturer varied too much for me to be able to get it to work with more than one or two of them without adjustment.

urbancamo wrote:
So it's back to bit banging then!

One advantage with bit banging the interface is you can send data to the keyboard to set the LEDs.

Quote:
I wonder if anyone has done this before?

Lots of people, a quick google search for ps2 keyboard interface should find you some of them.


Lee.

Author:  profkelly [ Fri Apr 13, 2007 6:50 pm ]
Post subject: 

lee wrote:
How did you provide the clock for the 6850 baud rate? I found I had to use another oscillator that I could tweak to get it to work.

I really don't remember. It's been too many years.

lee wrote:
Did it work for more than one keyboard? Even keyboards from one manufacturer varied too much for me to be able to get it to work with more than one or two of them without adjustment.

It may have been manufacturer specific, again I don't recall. We were using them in hundreds of devices but I'm pretty sure we always purchased the same brand keyboard.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/