Writting to Buffer for LEd display...

Status
Not open for further replies.
Hi again,

I want to add keyboard with this AT/2 6 pin..what will be the procedure? i am preparing code for PC keyboard .

 
**broken link removed**

Try this page.... I think the source is there.
 
With your abilities, as demonstrated by your website, you shouldn't need his code. It seems that you are very capable of writing it yourself.

Mike.

Should this be the standard reply to all Ritesh's posts?

Just curious.

Mike.
 
Hi again,

i am using this code for display keyboard char to terminal window at show 'k' as per testing serial comm. after that 0xFB is coming cont pressing keyboard is doing nothing,why???
 

Attachments

  • keyboard.txt
    2 KB · Views: 189
0xFB Scancode for key Set specific key to typematic/autorepeat only (scancode set 3 only)
but when i press any key then also it does not change why??
 
I have noticed one thing the uc is sending cont 0XFB ...
just for checking i have disconnected the Vcc from PS/2 and some time shorted the Data with gnd for testing to see some changes on terminal wind but nothing happen don't know why??

i think some problem is here it is not updating scan code from keyboard.
Code:
while(1)
   {



ch=Scan_Data;
 Hserout( ch);
__delay_ms(1000);

ch=0;

      
      Capture_init();//Initialise once again for next capture

   }

the problem is something else not keyboard it is in code i have cut three wire from ps/2 then also FB is coming...
 
Last edited:
You have misunderstood the protocol.. You need to issue commands to the keyboard to receive the correct results.

0xFB seems to be a error code.... If 0xFA is an "ack" I would think 0xFB would be a "nack" Error in receiving a command.

Here's a list of viable commands.

 
I am also working blind here.... I have never done a keyboard interface..... Maybe that's why he only waits until a specific character has been sent!!!

You'll have to go by trail and error... Also you are running twice as fast as he is...
 
Why not test the keyboard interface on an HD44780 LCD? It's the easiest, you punch in A, and if it's correct, it's an A in front.

After the PS2 interface is correct, it's much easier to hook it up to the LED board or whatever it is.
 
Why not test the keyboard interface on an HD44780 LCD? It's the easiest, you punch in A, and if it's correct, it's an A in front.

After the PS2 interface is correct, it's much easier to hook it up to the LED board or whatever it is.

i am not testing on led ,see the code i am testing on serial window.
 
Hi
The scandata function is giving fb only why what the problem in this function i have not connected the keyboard than also fb?
 
according to this he is not sending any command to ps.
**broken link removed**

HI,

i have noticed in this many problem i have wasted time on it here is some:

const unsigned char Key[]={"0F FFFFF FFFFt` as cQ1 ZSAW2 CXDE43 VFTR5 NBHGY6 MJU78 ,KIO09 ./L;P- ' [=\\"};
some other also....
any way the is not working at all..
I have just connected my serial to USB RS232 and watching whether PS/2 is working yes it is working.
on giving supply all 3 led blink and pressing key give serial output i don't have oscilloscope so, after changing baund rate data also changing....
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…