Fastest Communication between 2 Basic Stamp Modules
G McMurry
Posts: 134
Good Morning,
Here is my challenge for today:
I would like to be able to move a small amount (maybe 20 bytes) of data between 2 Basic Stamp modules ASAP. I am already using 2p and/or sx modules.
Basically, I have two Basic Stamp modules. Lets call them Master and Slave.
Slave is doing a large amount of data acquisition (RCTIME, COUNT, etc.) and Master is handling larger overhead communication tasks. I need to move about 20 bytes of data, on demand and as quickly as possible from the Slave and the Master.
I would like to use something synchronous such as SHIFTOUT to SHIFTIN but I can see how is probably not possible to use those two commands together. I know how I can do this using the asynchronous SEROUT to SERIN but even at the fastest baud rates that can be slow, waiting for a serial stream to start, etc.
I am hoping I can find some way to perhaps use SHIFTIN on the Master and some other means to clock out data fast from the SLAVE. Or, perhaps the other way around, SHIFTOUT from the SLAVE (when it is ready) and a flag that the Master sees to know when it should start clocking in data from the SLAVE. Could this possibly be faster?
The two Basic Stamps would reside on the same board. I would like to use no more than 3 lines, though I might be able to find a 4th.
I was looking at the Microchip 24LC41A Dual Port I2C Serial EEPROM. However, the overhead of I2C may be slower than just using regular SEROUT / SERIN. Put a piece of Dual Port Serial RAM in between the two Stamps. Slave stores it data in the ram and Master reads it whenever it has time.
I would appreciate any thoughts on this topic.
Greg
Here is my challenge for today:
I would like to be able to move a small amount (maybe 20 bytes) of data between 2 Basic Stamp modules ASAP. I am already using 2p and/or sx modules.
Basically, I have two Basic Stamp modules. Lets call them Master and Slave.
Slave is doing a large amount of data acquisition (RCTIME, COUNT, etc.) and Master is handling larger overhead communication tasks. I need to move about 20 bytes of data, on demand and as quickly as possible from the Slave and the Master.
I would like to use something synchronous such as SHIFTOUT to SHIFTIN but I can see how is probably not possible to use those two commands together. I know how I can do this using the asynchronous SEROUT to SERIN but even at the fastest baud rates that can be slow, waiting for a serial stream to start, etc.
I am hoping I can find some way to perhaps use SHIFTIN on the Master and some other means to clock out data fast from the SLAVE. Or, perhaps the other way around, SHIFTOUT from the SLAVE (when it is ready) and a flag that the Master sees to know when it should start clocking in data from the SLAVE. Could this possibly be faster?
The two Basic Stamps would reside on the same board. I would like to use no more than 3 lines, though I might be able to find a 4th.
I was looking at the Microchip 24LC41A Dual Port I2C Serial EEPROM. However, the overhead of I2C may be slower than just using regular SEROUT / SERIN. Put a piece of Dual Port Serial RAM in between the two Stamps. Slave stores it data in the ram and Master reads it whenever it has time.
I would appreciate any thoughts on this topic.
Greg
Comments
You will spin your wheels (and chew through valuable code space) trying to use anything other than serial coms for this kind of app -- just my opinion.
Another thought, of course, is to replace the two BS2 modules with a single Propeller. No wires necessary to communicate between processors; it all happens through shared RAM.
I still would like to know if anyone has experience with any two port serial RAM/ROM chips. I think that would be my best solution anyway.
Greg