Shop OBEX P1 Docs P2 Docs Learn Events
bs2 hw board usb port (how to use) — Parallax Forums

bs2 hw board usb port (how to use)

softconsoftcon Posts: 217
edited 2012-09-28 05:50 in BASIC Stamp
Can someone point me to the relevant documentation on using the usb port that is built-in to the bs2 homework boards? I'd like to use it for sending/receiving data to/from the pc.
I'm fairly certain I've seen such mentioned, but I can't seem to find it at the moment.
If anyone knows where this info can be found, I sure would appreciate a heads up on where to look for it.
Thanks.
usb,bs2,homework board

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-27 06:07
    Take a look at the BasicStamp Manual for the DEBUG and DEBUGIN commands. The USB is a specialized serial port to the computer. You can go in either direction with information but DEBUG is the usual first choice as it is output from the BasicStamp.

    DEBUGIN has evolved as its mate that allows you to send data or control to the BasicStamp.

    I am assuming that you already program the BS via the USB. If that is working, the DEBUG is pretty easy to use.
  • softconsoftcon Posts: 217
    edited 2012-09-27 06:18
    Well, look at that, no wonder I missed it.
    I'd assumed the debug was only for output in the editor. I'd glossed over the debugin completely. <sigh> Teach me to skim instead of read the entire command-set.
    Thanks, that gives me what I need.
    Guess I need to read a bit more carefully. :)
    Although, to be fair, I was rereading the manual again, and hadn't gotten to the debug/debugin commands just yet.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-09-27 07:10
    DEBUG and DEBUGIN are pretty much just output and input, but the documentation goes on and on and on. Since nearly everything in DEBUG about formatting is the same in DEBUGIN, I would just focus on mastering DEBUG at first.

    Baud rate information is rather unimportant if you use defaults. And both are really just special cases of the SEROUT and SERIN command.

    In other words, there is a lot of text that just repeats the same things.
  • softconsoftcon Posts: 217
    edited 2012-09-28 05:50
    Yep, got it. Can't seem to get osx to talk to the stamp via the cua port, (the tty one doesn't accept input). I'll setup my windows machine, and see if it works. but I'm more looking to get keyboard input anyhow, so this isn't criticl. I'm guessing I'll need a setup that will translate keyboard scan codes into ascii characters (like this http://www.hobbytronics.co.uk/usb-host-keyboard) or is it possible to just plug a keyboard into the bs2, and have it work directly? Even if it does work directly, I still need to find a cable that allows pluging in keyboard to the small usb port on the bs2, so still have work to do anyhow. :)
    And hobbytronics doesn't seem to have a us distributor, so would have to locate one here. A serial ttl keyboard might work better, but the wife wants to be able to use her usb keyboard, since she has one that can roll up (gotta love those flexible keyboards). I'm sure this has been done before, so if anyone knows what to use for this, I'd appreciate some pointers.
Sign In or Register to comment.