Shop OBEX P1 Docs P2 Docs Learn Events
Confused - Converting SX/B programs written for SX28 to SX52 — Parallax Forums

Confused - Converting SX/B programs written for SX28 to SX52

Mike CookMike Cook Posts: 829
edited 2005-10-17 18:44 in General Discussion

Ok if you can't tell yet I'm new to the SX/B compiler!

I loaded the September Nut's & Volts SX/B program on my SX Tech board (SX28), changed the:

FREQ 20_000_000

Baud CON "T115200" ' use with MAX232

to

FREQ 4_000_000

Baud CON "T9600" ' use with MAX232

because I did not have a 20 mhz resonator on hand and I like to work at 9600 baud. Compiled the program and programmed the chip. Program worked as described. Yea! Proceeded to the next step of changing the program to run on the SX52 Proto board. Changed the Device and Freq lines to the following:

DEVICE SX52, OSCHS2, BOR42

FREQ 50_000_000

Compiled the program and programmed the chip. This time, running on the SX52 Proto Board, when you issue the "V"+<CR> command (version information - prints a text string), the program prints the Carriage Return and line feed, however the text string:

Version:

DATA CR, LF, " PC_PORT16 Version 1.0", CR, LF, 0

prints on the new line but the character column does not increment (each character that the SX52 sends out prints over the top of the last character.

Using a Port monitoring program reveals that the SX52 is sending out 250+ character ASCII Decimal 13 (Carriage Returns 0x0D) and then the next character in the string.

What else do I need to change or add to make this work on the SX52 Proto Board?

I have attached a copy of the orignial September Nut's & Volts SX/B program and my modified version.

Thanks in Advance,

Mike

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"OEM NMEA GPS Module" Now available on ebay for only $19.99

Product web site: http://www.allsurplus.net/Axiom/

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 15:15
    Hey, Mike, I'm confused too -- am getting the same results. We're going to have to look under the hood to see what's happening. Most of my projects use the SX28 so I don't test them on the 48/52 or I'd have seen this sooner. Sorry for the troubles, but we will get it sorted out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Mike CookMike Cook Posts: 829
    edited 2005-10-16 15:54
    Not a problem, I new to this compiler so I assumed it was something I "glossed over" in one of the manuals. Sure wished they would have put a SX52 on that pretty PDB! I know that's your platform of choice!

    I've got a simpler serial out program (biased on one of yours also) and that works fine.

    Thanks for the help!

    Mike

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "OEM NMEA GPS Module" Now available on ebay for only $19.99

    Product web site: http://www.allsurplus.net/Axiom/

  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2005-10-16 16:00
    Mike,

    although this is a bit out of topic, I followed the link to the GPS Module. Nice little device - any chance that you can ship one into Germany?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-16 16:04
    I've got an SX52 on my PDB ... by using the Con Carne module.· That let me switch back-and-forth between the 28 and 52 versions of the program.· What's wierd is that the 52 version, in addition to all the extra characters, seems to be running in slow motion.

    SX52 Con Carne module: http://www.parallax.com/detail.asp?product_id=45207

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Mike CookMike Cook Posts: 829
    edited 2005-10-16 16:10
    Jon - Noticed the slow motion behavior too, pretty weird.

    G
  • Mike CookMike Cook Posts: 829
    edited 2005-10-17 18:02
    Thanks Jon!

    http://forums.parallax.com/showthread.php?p=554085

    1.42.01 Fixed the issue.

    Can't beat that for support! ·Only about 24 hours from problem found to a Fix, and on a weekend to boot!

    Mike



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "OEM NMEA GPS Module" Now available on ebay for only $19.99

    Product web site: http://www.allsurplus.net/Axiom/

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-10-17 18:44
    You're welcome, Mike. Sorry for any inconvenience or stress that bug may have caused for you. Between trying to track that down (I didn't, our compiler engineer did) and the Cowboys nearly losing yesterday, it was rough afternoon!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.