Shop OBEX P1 Docs P2 Docs Learn Events
Keyboard Problem! — Parallax Forums

Keyboard Problem!

Brandon C.Brandon C. Posts: 106
edited 2009-08-07 13:48 in Propeller 1
I am trying to run the keyboard driver on a GadgetGangster BossBoard. I just bought a brand new PS/2 keyboard to use for it and all three lights (Num Lock, Caps Lock and Scroll Lock) are blinking at a constant rate. I am running the Keyboard demo and there is nothing outputting to the screen when I press a key. is this normal? is there some parameter I need to change (besides I/O pins)?

Thanks!

Brandon C.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
No purchase necessary. See back panel for more details.

Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-06 17:41
    The lights should not be blinking. There may be a hardware problem causing the Propeller to reset over and over again or there may be something wrong with how you compiled the keyboard demo. When you ask a question like this, you need to supply more information. How do you have your BossBoard wired up? Have you been able to run other programs on it?
  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-06 17:48
    Sorry, I was kinda busy.

    I am having my program load into RAM. That means that if it was really resetting, the RAM would have no program loaded onto it.
    I am absolutely sure I wired everything up the way it is supposed to be. I even looked at the Demo Board schematic. Yes, I am able to run all programs just fine. I also tested the keyboard on my computer to make sure it works.

    Brandon C.

    BTW, in the schematic, it says I need to "use 10K-ohm resistors to pull jack-side signals to VDD ". does that mean 3.3v, or 5v? I have the signals pulled to 3.3v right now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-06 17:53
    The 10K resistors can be connected to 3.3V or 5V. The Demo Board uses 3.3V while some other boards use 5V.

    Exactly what program are you running? Have you modified it at all? What I/O pins are you using for the keyboard connections? Which one is Dta and which is Clk?
  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-06 17:58
    I am using the keyboard.spin file that comes with the Propeller Library and have not made any modifications to it. I am using pin 17 for the Data and 18 for Clock.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-08-06 18:13
    I have one keyboard that refuses to work on a prop demo board (homemade). I have always put the pullups to +5V.

    The keyboard is ok on a PC, its what I am typing this on.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • KyeKye Posts: 2,200
    edited 2009-08-06 18:51
    Hey Brandon. The wiring is fine because the propeller chip is telling the keyboard to reset since it does not follow protocol specs.

    This means that the keyboard has bad timing and is outputing corrupted bytes to the propeller chip which in turn the propeller chip then tells the keyboard to reset because it cannot continue if the keyboard sends bad data.

    There is no way to fix this problem without modifying the keyboard driver's communication sub rountines. If you are up to that go ahead. However te easier fix is just to get a new keyboard.

    Cheaper keyboards seem to work better than more expensive ones with the propeller chip. Look arround at www.newegg.com for some good deals. You can get a keyboard and mouse for $10.

    ...

    The communication problem you are expierencing is an imperfection within the keyboard.spin driver and is pretty hard to weed out.

    The reason PS2 keyboards seem to always work on the PC and not the propeller is because the PC is extremely lax with following the communication protocol.

    Basically the PC will never bother to reset the keyboard if it seends out·garbage. It just accepts that garbage.

    The keyboard.spin driver sends a reset out to the keyboard on any mistakes during transmission.

    So if your keyboards lights are constantly flashing the propeller then is telling the keyboard to reset. Which in turn the keyboard must be receiving propellerly because it is reseting.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-06 18:52
    So if I switch the Pullups to 5v it will work?

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-06 18:56
    @Kye:
    Which part of the code would I change to stop the resetting?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

  • KyeKye Posts: 2,200
    edited 2009-08-06 19:02
    Search for all the labels and jmp reference to reset in the asm code and comment them out and see if that helps. The driver may or may not work.

    Basically find the transmit and receive sub rountines and comment all the resets in them out.
    ...

    The reason this is happening however is because the propeller chip cannot receive the bytes sent from the keyboard properly. So this may not work. More likely you will need to relax the timing controls in the driver. (Freaking hard because of the way its programed.)

    Best soultion is to get a new keyboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • KyeKye Posts: 2,200
    edited 2009-08-06 19:05
    Great cheap keyboard that works.

    http://www.newegg.com/Product/Product.aspx?Item=N82E16823157004

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-06 19:14
    Thanks Kye, I did find several lines that I commented out. I will try the code out later.

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-06 20:47
    I commented out line 432 of the keyboard diver and the blinking stopped. but I am still not getting anything out of the terminal.

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

  • KyeKye Posts: 2,200
    edited 2009-08-06 21:09
    Okay, try this·driver. It may work.

    Its a completely different·different driver·however.

    You should be able to understand it however. Read the documentation.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-07 00:29
    Nope - sorry. still just blinks.

    In case you were wondering, I am running my prop at 96mhz. this wouldn't effect the keyboard, would it?

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

  • KyeKye Posts: 2,200
    edited 2009-08-07 13:06
    Shouldn't but try it at 80Mhz. The code should be clock independent.

    Mmm, well I would say you should just cut your losses and buy the cheap keyboard I posted above. Time is money.

    And, yes the one I mentioned above does work with keyboard.spin or atleast my driver file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Brandon C.Brandon C. Posts: 106
    edited 2009-08-07 13:48
    The keyboard I am using is just a cheap keyboard. I only paid $9 for it and I'm not sure it's worth returning...
    www.amazon.com/I-Concepts-90050N-107-Key-Keyboard/dp/B000NKANUE/ref=sr_1_15?ie=UTF8&s=electronics&qid=1249327417&sr=8-15

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

    Tired of the same old robot brains? not enough processing power? Get the Propeller Robot Module now!!

Sign In or Register to comment.