Shop OBEX P1 Docs P2 Docs Learn Events
BS2e v1.1 vs v1.2 serial comm — Parallax Forums

BS2e v1.1 vs v1.2 serial comm

TSlocumTSlocum Posts: 6
edited 2013-09-23 14:25 in General Discussion
I have taken over a project that was done a few years ago. The stamp intercepts the the serial communications between a control application running on a PC, and an embedded microprocessor. The stamp program display some of this serial data on an LCD screen. I can program the old PCB, which had the stamp soldered in place, with some updated software and it works perfectly. I have a second PCB that didn't have a stamp on it. I ordered some new stamps and put one on the second PCB. After programing that stamp with the same software it displays the text that is hard coded into the software on the display, but won't display the data it is supposed to be getting from the serial port.

The stamp that works properly is a v1.1, the other is v1.2. Is it possible to put the v1.1 firmware on the newer stamp? Are there any changes in the serial port setup or usage between v1.1 , and v1.2?

I have limited experience with pbasic. Any help would be greatly appreciated.

Terry

Comments

  • GadgetmanGadgetman Posts: 2,436
    edited 2013-09-16 11:30
    That was strange.

    According to the docs, the only change between the 1.1 and 1.2 versions is that an internal brownout detector is disabled.
    Nothing that should affect serial at all.
    http://parallax.com/sites/default/files/downloads/BS2E-IC-Firmware-Revision-Details-07-2007.pdf

    Are you certain that that other PCB is OK?
  • TSlocumTSlocum Posts: 6
    edited 2013-09-16 12:07
    Gadgetman wrote: »
    Are you certain that that other PCB is OK?

    Fairly certain. The guy I inherited the project from says it worked before he pulled the stamp. This one was in a socket so I wouldn't expect there would have been any damage. I may need to go back to the schematics and trace the circuit.

    I was really hoping it would be a simple firmware change. Thanks for your help.

    Terry
  • GadgetmanGadgetman Posts: 2,436
    edited 2013-09-16 12:50
    And if you take the working BS2e and install that in the other PCB?

    Are you using the same version BASIC Stamp Editor as was used originally?

    Do the files have $STAMP and $PBASIC lines in th start?

    This is an 'e' model. The important change from the stock BS2 to this one is that it has 8 separate Program memories.
    Are you loading all the program files to the BS2e?
    (Look for a command 'RUN' with a number after it in the main file to see if other Program memories are used)
  • TSlocumTSlocum Posts: 6
    edited 2013-09-16 14:17
    Gadgetman wrote: »
    And if you take the working BS2e and install that in the other PCB?
    That stamp is solidered in. It has several jumper wires soldiered to the pins. I hate to take a chance with the only working example I have.
    Are you using the same version BASIC Stamp Editor as was used originally?

    I'm not sure. Since I made some changes to the original code and loaded it into the old board without a problem I didn't think this could be an issue.
    Do the files have $STAMP and $PBASIC lines in th start?
    It has the $STAMP directive, but no $PBASIC directive. I'm using ver. 2.5.3 of the editor. With no directive how dose it know which version of PBasic to use?
    This is an 'e' model. The important change from the stock BS2 to this one is that it has 8 separate Program memories.
    Are you loading all the program files to the BS2e?
    (Look for a command 'RUN' with a number after it in the main file to see if other Program memories are used)

    I have 3 files loading into memories 0, 1, and 2. The main runs program memory 1, the memory 1 file runs program memory 2, and the memory 2 file runs program memory 0. They show three separate status bars when I use the 'run' tool to load them. I have seen the run window close with the last status bar being completely filled in. Usually when that happens I hit run again just to be safe.

    That actually brings up a question I should have asked before. There is a "Generate Object Code" menu item. I'm wondering if I need to use that to change the version of PBasic on the stamp.
  • Mike GreenMike Green Posts: 23,101
    edited 2013-09-16 14:24
    "Generate Object Code" generates a PC program that downloads your PBasic object code to the Stamp. It's used when someone wants to distribute their program to others without distributing the source code like for a maintenance update. You don't normally need to use that. When you use the Run menu item, it automatically downloads the program to the Stamp.
  • GadgetmanGadgetman Posts: 2,436
    edited 2013-09-16 14:42
    The PBASIC directive can be 1, 2 or 2.5
    1 is only used for BS1
    If it doesn't have the directive it will default to using PBASIC 2 syntax.

    There may be something special going on with the jumper wires.
    Have you recreated them on the 'new' PCB?

    Can we have a photo of the boards?
  • TSlocumTSlocum Posts: 6
    edited 2013-09-16 14:55
    That's what I originally thought. It had an option for "Object Code and Stamp Bootloader" that made me think it might update the PBasic interpreter. There was also a "Single Executable" option that I assume compiles to machine code for faster execution. I haven't tried either yet.
  • TSlocumTSlocum Posts: 6
    edited 2013-09-16 15:22
    Gadgetman wrote: »
    There may be something special going on with the jumper wires.
    Have you recreated them on the 'new' PCB?

    Can we have a photo of the boards?
    This is one of those situations where the hardware guy says "The boards work it must be your code". I have to prove to him that there is nothing wrong with the code before he will look for a hardware problem. It's even better if I can find the hardware issue. You guys have given me enough to push back. Let me try to track it down and I'll get back to you when I know a little more.
  • TSlocumTSlocum Posts: 6
    edited 2013-09-23 13:20
    Problem Solved! It turns out the board was good, the code was good, but the brand new BS2e was defective. At least that is my assumption. After tracing back all the connections on the PCB, without finding a problem, I got another new Stamp that was the same rev. as the one I had problems with, programmed it in the same way, and now everything is working.

    Thank you, to everyone that helped. Thank you, Gadgetman in particular. I learn enough to move ahead with a little more confidence. It's also nice to know that the stamp community is responsive to noob questions;-)

    Terry

    BTW: I can't find a way to mark this thread solved.
  • GadgetmanGadgetman Posts: 2,436
    edited 2013-09-23 14:25
    You're not a Noob, you're a newbie.

    The difference is quite significant...

    A Newbie is a newcomer, just beginning to learn...
    A Noob, though... Isn't interested in learning, often thinks that he's great and that he can do no wrong...
    (I play World of Tanks... I hunt Noobs... It's fun... )
Sign In or Register to comment.