Arduino Mega PS2, don't work after power on off

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1.  I am using arduino mega 2560. A PS2 keyboard is connected to read keys & display on segment. Library used is PS2Keyboard.cpp - PS2Keyboard library Written by Christian Weichel <info@32leaves.net>

 

2. Issue faced is, when power in turned off & applied again on entire system(MCU+PS2 converter+usb keyboard), keyboard don't get initialized again automatically, that is I am not able to read any keys unless I remove the keyboard from socket & connect again, then I can read again.

 

3. There is small USb to PS2 converter used. Keyboard is usb.

 

4. what could be issue.

 

5. below is keyboard code:

 

const int DataPin = 19;
const int IRQpin =  18;
PS2Keyboard keyboard;

    keyboard.begin(DataPin, IRQpin);  
    keyboard.clear();

            c = keyboard.read();
            Serial.println(c);    

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to allow time for the usb converter to reset and/or issue a reset command.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you sure that your keyboard is USB and not a PS/2 keyboard using a USB connector?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. Keyboard is usb, as it works with my laptop fine.

2. bought a usb to ps2 converter.

3. how to send " usb converter to reset and/or issue a reset command. " ? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Advice is free, but if you want me to solve your problem, you’ll need to spread the love a bit. My advice today is - you chose the code, you read the instructions.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

this is written on converter:

https://www.ebay.com/itm/MOUSE-A...

 

501215-B004