I found a diagram to connect a PS/2 keyboard to a 16F84A PIC with source code in assembler but I program en PICBASIC - - does anybody have some code in basic for doing that???
I guess I forget to say that i'm not an expert with pic basic. I studied the protocol an the level signals but it's difficu to me to do some thing in pic basic, for exmaple:
i have to sense the estate of a pin (PORTB.5) based on interruptions (PORTB.0) and set to a byte variable, the data consist on 11 bits, first bit is always low, then i have 8 bits of data and 2 more bits no necessary to get the data. I need to read that bit and set to the byte variable:
variable : b7 b6 b5 b4 b3 b2 b1 b0
fisrt bit read -> b0
second bit read -> b1
third bit read -> b2
.
.
.
eight bit read -> b7
then convert that value to hex
sorry for my porr english, i speak spanish so it's difficult to me explain mys ideas
fnovoac,
I make some routines to controlling keyboard AT
They are run on PIC18Fxxx, because my application need it, but the AT keyboard can run on 16F627 similar to PIC16F84.