Subject: Re: Keyboard PS/2 to Parallel converter
From: "Dave Dunfield" <dave06a at dunfield.com>
Date: Mon, 07 Jan 2008 19:51:21 -0500
To: "General Discussion: On-Topic and Off-Topic Posts" <cctalk at
classiccmp.org>
> > Date: Mon, 7 Jan 2008 08:54:38 -0800 (PST)
> > From: Fred Cisin <cisin at xenosoft.com>
>
> > It would seem that the cheapest way to do it is a discardable PC.
> >
> > Input character
> > print it
> > loop
Not cheap and noisy. You could yank the 8042 used in 386 through
early P1 boards as the first level interface. But that does not
translate the scan code to ASCII serial or parallel wich is what
most people would like.
> Only barely possibly the cheapest. A $2 PIC or
AVR or even 8051-
> family chip can do the same job for a fraction of the power and space
> and noise. And the code is out there--I've seen code for getting
> PS/2 keyboard data into both PICs and AVRs. The output side would be
> a piece of soup.
Absolutely. Even an 8048 (8035 or 8748) pull from a older keyboard
is more than enough CPU for the job. The DEC LK20X (30x/40x) series keyboards used an
8051, pull the EA line high and it's a 8031 (add a
latch and external rom).
And a PIC could be considered "retro"; certainly an 8051 would be.
Both are descended from mid-70's chip designs.
But to answer an earlier question--no, a simple serial-in, parallel-
out shift register won't do the job with a PS/2 keyboard--the
interface has a bidirectional protocol--it just doesn't blindly send
out scan codes.
If anyone is interested, I have a very small bit of 8051 code which reads an attached PC
keyboard,
providing the scan codes over an RS-232 link. It also supports commands to set LEDs on/off
etc.
I'd be interested. PS2 in and ASCII serial (or parallel with strobe,
output only) out is most useful in vintage designs. Most vintage
machines do not need bidirectional control but the local CPU (8051)
would have to echo the state of the NUM and shiftlock keys to the LEDs
and do code conversion accordingly.
Allison
I specifically avoided using the P1 line in my design (full 8-bits
parallel I/O available even on an 8031), so these are free, making it very trivial to
modify this
to output parallel instead of serial - it
would also be very easy to add a translate table and recognition of
shift/ctrl modifiers so that it would output fully decided ASCII.
Dave
--
dave06a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools:
www.dunfield.com
com Collector of vintage computing equipment:
http://www.classiccmp.org/dunfield/index.html