Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Proto Board USB + Accessory Kit: Projects? In General? — Parallax Forums

Propeller Proto Board USB + Accessory Kit: Projects? In General?

Rick314Rick314 Posts: 11
edited 2013-09-20 20:02 in Propeller 1
I am new to Parallax products and inherited a Propeller Proto Board USB (#32812, now obsolete/replaced) with installed Accessory Kit (#130-32212, PS-2 keyboard/mouse & VGA connectors). I have Propeller Tool v1.3.2 working with it and can load it with code.

#1) What code in OBEX or elsewhere will demonstrate the keyboard/mouse/VGA functionality?

#2) More important and in general, how can I start with a Parallax hardware platform (Proto Board, Education Kit, QuickStart board, Board of Education, robots... so many choices!) and find code that is meant to run on it? It seems OBEX authors frequently assume readers understand what hardware the code is meant to run on instead of detailing the intended Propeller chip hardware environment.

Comments

  • Ken GraceyKen Gracey Posts: 7,392
    edited 2013-09-19 16:45
    Hey Rick,

    Welcome to the forums and we're pleased to have another Propeller programmer on board!

    You're going to get lots of replies from people far more qualified than myself, but I'll just start with a brief reply. The Propeller Proto Board was replaced with a newer version, but the one you have would still be a first-want for anybody on Parallax staff because it is far from obsolete though not sold anymore. This board was designed just after the Prop Demo Board, and some steps were taken to ensure object example I/O compatibility with some of the more popular OBEX examples (like those using video, mice, keyboards). Unless I'm off, I remember the two having very similar pinouts. I think that stacking connector is routed to the same pins as the Prop Demo Board.

    If you're in this for hobby or commercial use, stick with Spin/ASM. If you're more of an educational learner, you could take a look at Learn.parallax.com and use our C compiler. Feel free to use these forums for guidance and feedback, no matter how brief your question. There's a ton of experience here and people are more than willing to help. Just be sure to check back on your posts and thank the posters for their responses.

    If you have any trouble with your hardware don't be afraid to ask us for repairs or replacements. I'm crazy about seeing that we offer our customers the service they deserve, often no matter what kind of mistake they've made.

    Again, welcome to the forums!

    Ken Gracey
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-09-19 17:35
    Rick314: Since you have the VGA connected, take a look at the VGA demos in the OBEX. Most of them come with a simple spin demo file to get them running - just displaying something standalone on your screen. Most of the OBEX files have a writeup in the source file, so download them a take a look with PropTool. Then compile and download to your board to see them run. Sometimes you need to change your clock frequency (xtal) as some use other than 5MHz, so just check.

    So, just get going. If you download something and you cannot get it to work, just ask here, stating precisely what does not work.

    Note also, that PropTool also downloads some of these objects and also has a set of example programs that are well documented.
  • AribaAriba Posts: 2,690
    edited 2013-09-19 17:36
    Rick314 wrote: »
    ....
    #1) What code in OBEX or elsewhere will demonstrate the keyboard/mouse/VGA functionality?

    #2) More important and in general, how can I start with a Parallax hardware platform (Proto Board, Education Kit, QuickStart board, Board of Education, robots... so many choices!) and find code that is meant to run on it? It seems OBEX authors frequently assume readers understand what hardware the code is meant to run on instead of detailing the intended Propeller chip hardware environment.

    All the boards use the same Propeller chip (there is only one at the moment),. One of the best features of the Propleller is that all pins are equal and you can use the software peripherals on every pin (TV and VGA on several pin-groups). The objects in the OBEX let you normally define the pins they should use when you start the object.
    So most objects are not written for a specific board. But for sure a VGA object makes no sense if the board has no VGA connector.

    In your case (Protoboard with Accessory kit) you can just try the code in the _Demos directory. You will find demos for PS/2 keyboard, mouse and VGA which all should work without any pin changes.

    Andy
  • dgatelydgately Posts: 1,630
    edited 2013-09-19 19:11
    Rick314,

    Kye's OBEX drivers are a good start for this. Take a look at what pins the demo code for each of these expect, but I think they may be the same as used on the protoboards... Even if not, it's easy to change the pins used for keyboard, mouse and VGA to what you need.

    The schematic at the bottom of this document is for the USB Protoboard and it shows what pins are used for these devices when the Accessory Kit is installed:

    http://www.parallax.com/sites/default/files/downloads/32212-Propeller-ProtoBoard-Documentation-v1.3.pdf

    Keyboard & mouse: http://obex.parallax.com/object/182

    VGA: http://obex.parallax.com/object/83

    Once you get these demos running, you'll have enough experience to try some of the other OBEX objects that include VGA as well as mouse & keyboard input in the same source code.


    dgately
  • Rick314Rick314 Posts: 11
    edited 2013-09-19 22:21
    Thank you to all that answered! I have the following code running with no changes necessary:
    • C:\Program Files (x86)\Parallax Inc\Propeller Tool v1.3.2\Library\_Demos\
      • VGA_512x384_Bitmap_Demo.spin (VGA works!)
      • VGA_HiRes_Text_Demo.spin (VGA works!)
      • VGA_Tile_Driver_Demo2.spin (VGA with Mouse works!)
    • PS2_HIDDemo_2.zip from http://obex.parallax.com/object/182 (VGA with Mouse works!)
    But I can't see keyboard events echoed to the VGA display. See the attached photo of my setup and VGA display using PS2_HIDDemo_2. Mouse events are being echoed (good). The keyboard is getting power (see Num Lock LED on) but pressing keys does nothing on the VGA display. Any ideas before I re-solder my Accessory Kit parts related to the keyboard? (I am guessing at what PS2_HIDDemo_2 should be doing at this point...)

    DSCN1212.jpg
    1024 x 768 - 93K
  • dgatelydgately Posts: 1,630
    edited 2013-09-19 23:31
    Well, it is seeing that the Num Lock key is set (evidenced by the N:1 on the video screen)...

    Did you try typing the Num Lock key to see if it gets reset to off (Num Lock LED turns off)? Try the Caps Lock key to see if you get "C:1" on the display.


    I wouldn't attempt re-soldering until you are sure that there is hardware problem. Probably more likely a software issue or something about the keyboard's config. There are config options in the HID driver. You may want to examine that code for some debugging ideas.


    dgately
  • Rick314Rick314 Posts: 11
    edited 2013-09-19 23:47
    dgately wrote: »
    ... Did you try typing the Num Lock key to see if it gets reset to off (Num Lock LED turns off)? Try the Caps Lock key to see if you get "C:1" on the display. ...

    Thank you dgately -- I get no response to pressing either Num Lock or Caps Lock. I will pursue the other things you suggested after waiting awhile for other comments. Hopefully someone knows my hardware good enough to tell me exactly what config options might be questionable. I sent a private message to the driver author asking for their response here in the thread too.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-09-20 05:15
    Sorry I am away fom home with just a tablet.
    What you need is a simple spin program that ties the keyboard input to the vga output. It is just a simple combination of the two spin demo program sections. So it is not a hardware problem. Someone with proper acess should hopefully chime in shortly.
  • KyeKye Posts: 2,200
    edited 2013-09-20 05:37
    Hi, Rick,

    My keyboard driver doesn't work with every keyboard. Just try another if you have one. Sorry about that. All the keyboards I've ever used with it work. But, its hard to get universal support when most computer interface protocols are just a "suggestion" on how things should work. Not every device talks the protocol correctly. Computer manufacturers for PS2 mouse and keyboards have a lot more resources to test every possible combination.

    Thanks,
  • AribaAriba Posts: 2,690
    edited 2013-09-20 08:11
    Cluso99 wrote: »
    Sorry I am away fom home with just a tablet.
    What you need is a simple spin program that ties the keyboard input to the vga output. It is just a simple combination of the two spin demo program sections. So it is not a hardware problem. Someone with proper acess should hopefully chime in shortly.

    Here is such a Spin program:
    CON
      _clkmode        = xtal1 + pll16x
      _xinfreq        = 5_000_000
    
    OBJ
      vga : "vga_text"
      kb  : "keyboard"
    
    PUB start | i
    
      'start VGA
      vga.start(16)
      vga.str(string("Keyboard Test...",13))
    
      'start the keyboard
      kb.start(26, 27)
    
      'echo keystrokes in hex
      repeat
        vga.hex(kb.getkey,3)
        vga.out(" ")
    
    Just make a new empty Tab and copy and paste that code. The Keyboard on the Protoboards is on Pins 26 and 27, that is the default in most demos.

    Andy
  • Rick314Rick314 Posts: 11
    edited 2013-09-20 13:38
    Thanks Andy. The code you provided showed that both my PS/2 keyboards are being read fine. (A related subject -- I am new to Spin programming. It appears to me that "PUB start | i" declares local variable i that is unused. Is the "| i" there for a reason? It seems to run fine without it.)

    Thanks to you too Kye. But neither of my PS/2 keyboards seem to work with your PS2_HIDDemo_2.zip demo code. For reference, I tried a Gateway P/N: 7001603 (104 keys + media/shortcuts) and a Dell Model SK-8110 (104 keys, nothing extra). These same 2 keyboards did work with Andy's code. I would be glad to test them for you if you ever update the drivers or have code changes you'd like me to try for you. And a suggestion -- It would help to say what you said above about the keyboard driver maybe working or maybe not in the OBEX description, even mentioning the 2 keyboards I listed as known problem hardware. It might help others in the future.
  • AribaAriba Posts: 2,690
    edited 2013-09-20 14:42
    Rick314 wrote: »
    ...(A related subject -- I am new to Spin programming. It appears to me that "PUB start | i" declares local variable i that is unused. Is the "| i" there for a reason? It seems to run fine without it.)
    .....

    You are right, this is just a relict from my copy and paste.

    Andy

    Edit: This combined Mouse/Keyboard object worked for me: http://obex.parallax.com/object/181
  • KyeKye Posts: 2,200
    edited 2013-09-20 20:02
    I think there's an error in my with how I send and receive serial data from the keyboard. I wrote that code many years ago now as a way to learn how to program on the propeller. Please add a comment with your experiences. I'm too busy now to fix the code up anymore.

    Thanks,
Sign In or Register to comment.