Shop OBEX P1 Docs P2 Docs Learn Events
Communication between Propeller's Board of Education — Parallax Forums

Communication between Propeller's Board of Education

Lino_GerolinLino_Gerolin Posts: 2
edited 2016-09-07 07:53 in General Discussion
Goodmorning everyone,

I Am new to the forum,
I have to ask politely if you can help.
I need to know if you can connect a card:
A - Propeller Board of Education with a card
B - Board of Education carrier board and BASIC Stamp 2 module.

To connect I mean:

- The program on "A" card must be able to interface and interact
with the "B" card and vice versa.

I do not understand whether the actions of the actuators in "A" can succeed
to enable the signals in the "B" by means of appropriate sensors.
I hope I was clear.
I apologize for the language,

thank you and
I offer
Yours sincerely

LinoG

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2016-09-07 14:15
    Hello,

    Both systems can communicate serially and exchange data about what they want to the other side to do. The only thing is that the Propeller uses 3.3V signals while the BASIC Stamp uses 5V signals. So you would need something, even a resistor between the TX pin from the BASIC Stamp to the Propeller. The other direction should be fine connected directly.

    I don't know the details of what you're trying to do, but the two systems could communicate with each other.

    One thing to keep in mind besides signal levels is that the BASIC Stamp can only do one thing at a time. So if it is waiting for serial data from the Propeller it won't be able to do anything else (execute any instructions). While it is executing other instructions it won't be ready to receive anything from the Propeller. So some coordination would also need to be implemented to ensure the BASIC Stamp doesn't miss anything from the Propeller.
  • What function is the Basic Stamp performing?

    I can't think of anything the Basic Stamp can do which the Propeller can't. I'd be surprised if whatever you want to accomplish can't be done with the Propeller alone.

    Of coarse if what you want to accomplish is having two microcontrollers communicate with each other then the Basic Stamp is fine.
  • Of course the standard BS2 can only do 9600 baud. To get 19,200 you have to go with the BS2PX.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    The BS2 can do 19,200 bps and I actually use it at that baud rate every day. The caveats are in how you're using it. When I am displaying information on a Parallax serial LCD @ 19.2 Kbps everything is fine. When I used to use the original Parallax Servo Controller, even at 38.4 Kbps with the BS2, it worked just fine. But the servo controller was only ever sending a few bytes at a time back to the BS2.

    I even see people posting that the BS2 doesn't work reliably at 9600 baud. It works great! But if you try using formatters on the SERIN or capturing large amounts of data at higher baud rates with close pacing, it can miss data. But seriously...if a BS2 is being set up to communicate with another MCU to exchange command data it could be done at 19.2 Kbps or even 38.4 Kbps. It's going to be more reliable at 9600, but even then you can overload things with a lot of formatters on the SERIN command.

    The strong point for the BS2p isn't just the speed, it's the SPRAM which can directly buffer 126 bytes of data outside the normal variable space.
  • Thank you all for the support.
    I answer two of the questions that you have done to me:

    1) Chris Savage - I do not know the details of what you're trying to do, but the two systems could communicate with each other.
    1) Should I build an autonomous system capable of interfacing with me and the surrounding environment. At the hardware level I need to figure out if the two systems [A and B] I can be able to manage the entire system. In fact I think I will find myself in difficulty at the time of programming.
    No problem for the assembly of my automaton. I forgot to say that I will have also an Arduino board.

    2) Duane Degn - What function Is The Basic Stamp performing?
    2) If I understand the question, and if I understand the explanation of Mr. Chris Savage, I think I have to consider the BASIC Stamp to handle the signals from the various sensors of my automaton. And bring the states of the signal input in the Propeller program.

    IN SHORT:
    I realize now, that maybe my problem was understand whether to programmatically could handle the two cards ... that is, if I write a [A] program which needs to receive data from and viceversa, this is can do?
    If I understand the concept of Sub-Routine, can I do so that [A] interrogate or draw a sub-routine in ? I miss out this step.

    That is, if I have a motherboard, I write the program inside and connecting the sensors, the system performs. Ok.
    In this case I have two boards, two languages, but only one automaton, I do not understand how to do it at the program level seeing that is a single component.

    Thanks for your help.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2016-09-08 16:59
    Often when someone is connecting the BASIC Stamp 2 to another MCU it is because they are using the second, more powerful MCU to handle things the BS2 cannot handle itself. Since the BASIC Stamp 2 is a single-tasking MCU it can only do so many tasks before noticeable delays. Often times programmers will prefer the ease of programming the BASIC Stamp 2, but need to perform more actions than it cannot handle. In these cases the Propeller could handle those tasks, directed by commands from the BASIC Stamp 2.

    In such a system the BASIC Stamp 2 isn't doing much more than making decisions and issuing commands. Perhaps receiving back acknowledgements as well. If this is what you're trying to accomplish then you really need to decide on the communication and command structure and then build your code accordingly.
Sign In or Register to comment.