Shop OBEX P1 Docs P2 Docs Learn Events
Migrating designs from Stamp P24 to SX/28 — Parallax Forums

Migrating designs from Stamp P24 to SX/28

geekythinggeekything Posts: 53
edited 2004-11-18 02:51 in General Discussion
Hi all...

For my first 'real' product design, I've chosen to prototype using the Stamp 2P24 and then migrate the hardware and software to run on the SX/28 (using the SX/B Compiler, of course). I *think* this is relatively sensible as I have a Stamp 2P24 already and am now familiar with getting that to do what I want, but I'm open to heckles on this plan wink.gif

My first question is what pitfalls might I encounter? I understand that SX/B creates inline assembly rather than bytecode, and that's actually preferable to me. I understand that there's only a subset (currently) of PBASIC commands. But is there anything that's relatively trivial in PBASIC that becomes a huge challenge requiring much assembly coding in SX/B?

Thanks in advance.


-marc

Comments

  • BeanBean Posts: 8,129
    edited 2004-11-14 22:47
    Well for one there is no EEPROM on the SX, also no DEBUG, but there is BREAKPOINTS and SINGLE STEPPING and true INTERRUPTS.

    Can you tell a little about what the controller will be doing ?

    Bean.
  • geekythinggeekything Posts: 53
    edited 2004-11-14 22:58
    I could tell you, but then there'd be a knock on your door and then you'd disappear into the night wink.gif

    Seriously, though...it's a pretty simple design/application. A character LCD controller, SIRCS IR receiver (might implement RC5, too), some digital/analog I/O and USB communications via an FTDI USB chip to a host system. You can probably guess what it's for.

    No DEBUG I can work around. EEPROM isn't a concern for me. And true interrupts would definitely assist this app, and I'd even break-out the assembly programming manual for that.


    -marc
  • BeanBean Posts: 8,129
    edited 2004-11-14 23:07
    I think SX/B would be a good fit. Jon already has an LCD example.
    Bean.
  • geekythinggeekything Posts: 53
    edited 2004-11-14 23:20
    Well, the 'alternatives' would be an OEM Stamp (too bulky, too expensive) or a PIC. For some reason, me and PICs just don't get on wink.gif

    Thanks for your input.

    -marc
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-11-15 05:14
    And today I finished a serial LED controller that will control up to eight, 7-segment displays that uses an interrupt (assembly and SX/B statements combined) to receive and buffer serial data as well as multiplex the 7-segment LEDs. You'll be able to get full details from my January Nuts & Volts column. I will also put the project into the next major version of the SX/B help file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-11-15 05:27
    Here's a project I did using SX/B that will appear in the December issue of Nuts & Volts magazine.· It is a serial line follower module for the Boe-Bot robot.

    attachment.php?attachmentid=36581

    The project files include the schematic and board files for ExpressPCB, but instead of ordering boards yourself you can get a full kit for the project from Parallax in December.· The kit will include a production board (silkscreen and solder mask) and all the parts -- you supply a soldering iron and about 30 minutes of labor.

    The code is entirely SX/B -- no assembly was required, and the board is able to have bi-directional communications with the BASIC Stamp.· Once the article is out I will attached the code to this post.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
    300 x 225 - 36K
    SLF.GIF 36.1K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-11-16 00:19
    Great Work·Jon!· You can put me down for one when they're available...I love the design.· BTW, I just purchased the QTI Line Follower kit today...It will be interesting to compare performance of an assembled module to a discrete unit.· Obviously yours has the advantages of less I/O lines right off the start!



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-11-16 01:05
    That was why I designed it -- to reduce IO count requirments.· I've been asking for a serial line follower since we came out with our original; with SX/B I was able to do it myself!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-11-16 23:17
    As many years as I have been using Parallax products, I feel I should know this, but:

    Is there a document that lists the specs for the AppMod protocol so that designers can use it when designing new AppMods?



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-11-17 09:35
    We never published a spec ... but it's pretty easy:

    1) Uses open-true baudmode so that modules can be bussed without danger
    2) Header starts with "!" -- this is used by some modules for auto-baud rate detection
    3) Rest of header is usally two or three characters, sometimes with a module ID number.

    For example, the line follower uses "!SLF" as the header. I just finished an LED multiplexer that uses "!SS8" as the header. The LED multiplexer will be publisehd in the January issue of Nuts & Volts. It uses an ISR to receive and buffer incoming serial data, as well as multiplex the LEDs (I used an 8-digit, 7-segment display).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-11-18 02:51
    Well, I guess that's why I don't know about it!· Thanks Jon!



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
Sign In or Register to comment.