EASy68K  
It is currently Thu Nov 14, 2019 3:01 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Apr 13, 2007 9:24 am 
Offline

Joined: Fri Apr 13, 2007 9:08 am
Posts: 18
Location: Windermere, UK
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 9:44 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
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.


Top
 Profile  
 
PostPosted: Fri Apr 13, 2007 9:48 am 
Offline

Joined: Fri Apr 13, 2007 9:08 am
Posts: 18
Location: Windermere, UK
So it's back to bit banging then! I wonder if anyone has done this before?


Top
 Profile  
 
PostPosted: Fri Apr 13, 2007 3:47 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1103
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.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 5:37 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
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.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 13, 2007 6:50 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1103
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.

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group