Shop OBEX P1 Docs P2 Docs Learn Events
Looking for help converting from PBASIC to SX/B — Parallax Forums

Looking for help converting from PBASIC to SX/B

Martin HebelMartin Hebel Posts: 1,239
edited 2007-03-13 04:44 in General Discussion
Hi all,
I'm looking for someone to help convert 3 small PBASIC programs over to SX/B (with the SX28), including sending/receiving serial data to a PC. This would be considered consulting work, and I will pay a small fee. I have a deadline coming up, but no time to do it.

If you can help out, please Email me at martin@selmaware.com

Thanks,
-Martin

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
StampPlot - Graphical Data Acquisition and Control
AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·

Comments

  • Martin HebelMartin Hebel Posts: 1,239
    edited 2007-01-16 23:29
    Thanks all, someone helped me with what I needed.

    -Martin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Martin Hebel
    StampPlot - Graphical Data Acquisition and Control
    AppBee -·2.4GHz Wireless Adapters & transceivers·for the BASIC Stamp & Other controllers·
  • Capt. QuirkCapt. Quirk Posts: 872
    edited 2007-03-13 04:24
    Did you end up making some code snipets to interface the SX and Stamp Plot?. At the time you posted this, I thought there was something like that in the works, but I hadn't seen anything since.

    Since SX Serout works differently than Pbasic, is it difficult to interface the SX with Stamp Plot?

    Thanks
  • JonnyMacJonnyMac Posts: 9,214
    edited 2007-03-13 04:44
    The only thing different about SX/B SEROUT is that it just accepts a single character. That's easy to adjust for, though, which is exactly what happens on the inside of the BASIC Stamp. I always put SEROUT into a subroutine so that it just gets compiled once, like this:

    TX_BYTE:
      tmpB1 = __PARAM1
      SEROUT TX, Baud, tmpB1
      RETURN
    



    Then I have another subroutine like this to send strings (a literal string or DATA label with a z-string is passed):

    TX_STR:
      tmpW1 = __WPARAM12
      DO
        READINC tmpW1, tmpB1
        IF tmpB1 = 0 THEN EXIT
        TX_BYTE tmpB1
      LOOP
      RETURN
    



    This is pretty simple code, and with a fast oscillator you can serial data at incredibly fast rates (I routinely use 115.2K).
Sign In or Register to comment.