keyboard

Jeff Fox (jfox@netcom.com)
Thu, 21 Nov 1996 23:23:20 -0800


Dear MISC readers:
Andrew asks:

>>>I guess my question is, can I just construct a system exactly as the
>>>schematic on page 92 shows with NO modifications and have a working
>>>system?  Once I accomplish that, I can test most of my questions myself
>>>instead of dumping them all on this mailing list.
>>Sure.  I didn't get a schematic, and as there may be different versions
>>I don't know what you are looking at exactly.  But the schematics I
>>have from Moore on Forth Engines are correct for that board.

>Ok, I am going to put together a system exactly as the schematic shows.
>But there is no indication anywhere in the manual that I can find as
>to how a keyboard is hooked up.  I assume it somehow connects to the
>74245, as the '245 appears to be the only way to get data into the
>system. 
> I am initially going to be running P21Forth on it, using the
>ROM image on your web site for a 128k ROM (image file is slow.rom); I
>assume that P21Forth will in fact work with this schematic.
>How does it expect a keyboard to be connected to the system?  Dos it
>expect 7 bit parallel ASCII data plus a latch pulse from the keyboard
>(such as an Apple II keyboard provides), or does it use some kind
>of serial input mechanism, or what?

P21Forth 1.01 and 1.02 work a little differently with keyboards.
Both connect a parallel keyboard on bits 0-6.  If you use a cable
from a PC parallel port then invert a key and send it out to
those 7 bits and on into P21 bits 0-6.  If you use a serial
interface then connect your tx to bit 7. 
I connected it directly dispite the 12 volts vs 5 volt problem.
P21Forth does not have inverted serial as you would see if you
use a maxim level conversion chip.

In 1.01 it checks to see if a parallel keyboard is attached
by looking for input from any of the 8 bits.  If none have
input then it assumes you have a parallel keyboard and
it starts looking for input there.  If it sees a bit it
starts timing for bitbang serial on bit 7.

In 1.02 it starts up in serial mode.  (I think so, you know I
don't really remember)

In either mode you should send a "B" or "b" to get the
serial timing.  If you  type "BOTH" on a working keyboard
then P21Forth will accept input from both keyboards.

Do not try to connect a PC keyboard.  First of all it uses
a funny clocked serial signal, and it outputs funny key codes,
not ascii.  

Of course we have a PC keyboard attached to i21 in the iTV box
so we must read those terrible key codes and convert to ascii
for KEY.

Jeff Fox
--Andrew