Shop OBEX P1 Docs P2 Docs Learn Events
ps2 keyboard sx28 and diagram — Parallax Forums

ps2 keyboard sx28 and diagram

WillWagnerWillWagner Posts: 2
edited 2006-04-03 18:20 in General Discussion
Hi there-

Experienced gadgeter and programmer here, new to SX28.· Where can I find a simple wiring diagram and some sample code to explain connecting a canibalized HP PS2 keyboard to the SX28?

Thanks in advance.

Will

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-03-29 05:27
    http://www.beyondlogic.org/keyboard/keybrd.htm
    shows how to connect an AT keyboard to some
    microcontroller (not sx though) and it
    has sample code that should be easy to translate to sx

    regards peter
    ·
  • WillWagnerWillWagner Posts: 2
    edited 2006-03-31 18:37
    Awesome! Just what I needed. I've been fighting this sucker for a week. The guys at Parallax were helpful enough to track down one error in my code that bears sharing:

    the ShiftIn command in SX/B does not execute fast enough for this type of async comm, but by dropping in a ShiftIn Command and compiling it, you can see how the operation works enough to pair down the code to uh....essentially what peter was kind enough to point me to. [noparse]:)[/noparse]

    -Will
  • StephenStephen Posts: 53
    edited 2006-04-03 18:11
    I've attached some old code I kept which implements PS2 for a mouse. Maybe it'll be helpful...

    Cheers,
    Stephen
  • BeanBean Posts: 8,129
    edited 2006-04-03 18:20
    WillWagner said...
    the ShiftIn command in SX/B does not execute fast enough for this type of async comm, but by dropping in a ShiftIn Command and compiling it, you can see how the operation works enough to pair down the code to uh....essentially what peter was kind enough to point me to. [noparse]:)[/noparse]

    -Will
    Will,
    · One "trick" is that if you need the·SHIFTIN to run 10 times faster, just make a simple SXB program with·the frequency 10 times SLOWER with the SHIFTIN command, then compile it and copy the assembly code and paste it into your project within an ASM...ENDASM block.

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module"·available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module"·available from Parallax for only·$49.95 http://www.parallax.com/detail.asp?product_id=30015
    Product web site: www.sxvm.com

    Available now! Cheap 4-digit LED display with driver IC·www.hc4led.com

    "I reject your reality, and substitute my own." Mythbusters
    ·
Sign In or Register to comment.