Shop OBEX P1 Docs P2 Docs Learn Events
BS2p to Lantronix XPort issues — Parallax Forums

BS2p to Lantronix XPort issues

JetManJetMan Posts: 39
edited 2009-10-11 00:32 in BASIC Stamp
I have a BS2p ic integrated into a jet engine controler and have been fighting for some time to get my xport and bs2 to work together. The xport and bs2 are conected as follwos.

BS2
Xport
sout
Serial Data RX
sin
Serial Data TX
Atn
CP3 / DTR

Pbasic responds with no stamp detected , echo - yes , loopback - no


Thanks,

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-10-10 18:41
    You cannot program the BASIC Stamp through the network interface you have described. Latency issues in the communication would cause you problems.

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

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
  • JetManJetMan Posts: 39
    edited 2009-10-10 18:44
    Is there a suggested interface ?? That seems odd given the xport is capable of baud rates well over 9600 . Is this true even with an intelligent serial to ip interface that can store and forward packets between interfaces?
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-10-10 19:43
    The problem here is the VERY short timing involved. The BS2 recieves the "ATN" signal to reset the chip -- within a few tens of milliseconds (or less, not sure of the timing here) the IDE software will send a few bytes and get a reply. If that doesn't happen within the time window, the IDE concludes the BS2 isn't there.

    With a 'native' 232 port, or even an appropriate USB one like the FTDI version, a PC can get the close timing needed. With all the latency of the network to the XPort hardware, the DTR Reset to Serial Data sent is too long a delay.

    Note the BS2 does not even work with all USB to Serial devices. Using DTR to reset a serial device is not a "typical" serial port action.

    Now, having said all that, it IS possible to RUN a BS2 program over the XPort.· You simply can't PROGRAM the BS2 over the XPort.
  • JetManJetMan Posts: 39
    edited 2009-10-10 19:47
    Thank you allanlane5 , this essentially confirms my fears since my last post and now with some desoldering wick and a clean slate the jet engine controller is on its way to a new heart . One without a bs ic , I'm thinking pic or rabbit this time around.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-10 22:17
    One other thing to keep in mind is that the Stamp's Sin and Sout pins are designed for direct connection to a serial port using RS232 signal levels (sort of), not the +3.3V logic levels (or +5V logic levels) that the XPort device uses. That may be why it doesn't seem to work at all. You could connect the XPort device to a group of 3 Stamp I/O pins and use the Ethernet link for everything but programming using the Stamp Editor. You can also save the binary program produced by the Stamp Editor and download it to the BS2p Stamp via the XPort using a separate loader program on both the PC and Stamp ends. Your loader program would reside in Slot 0 of the BS2p and be the initial program at startup. It can check the XPort for an incoming file and copy that to another slot (other than #0) of the BS2p, then execute the program with the RUN command. If there's no incoming file within a specified time, it can try to execute whatever program is stored in the "other" slot (which might have been downloaded earlier). It's not as convenient as using the Stamp Editor directly, but it would work and others have done similar things.
  • JetManJetMan Posts: 39
    edited 2009-10-10 22:41
    That's a lot of help , I guess i hadn't considered some of the "alternative" options here. In retrospect after a few minutes of googling it seems as if a more direct solution may be in order. i see the picaxe 40x2 is almost exactly what i need and much more application specific. I have used many a bs1 and bs2 ic's in the past yet with little complexity. this application requires the monitoring of multiple fuel and oil pressures , temperature monitoring and display pwm motor control through some very large mosfets and many other misc. items. I wonder if it may make my life easier to shelf the bs2p40 for another project here. I have noted that the use of some "creative" interfacing is required to compensate for the serial voltage differential on the two devices and i can FORCE data to pass between the two devices but ultimately the delay is causing me issues with the DTR / Reset configuration. Unfortunately if I am to sacrifice more of the stamps I/O pins then i'd have to use more PCB area for i/o multiplexing .

    Although your application of the load and serout serin commands seems doable here.


    Thanks again for your help .
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-11 00:32
    Do consider the Propeller with its 8 independent processors (cogs). It can do ADC, up to 2 per cog among other things and can certainly control an XPort.
Sign In or Register to comment.