What chip can handle two serial data streams?
I would like to have a chip compare two serial data streams.· Basically, I want to have two GPSs send thier NEMA sentences to the chip and then based on some calculations between the two GPS coordinates perform some functions.· I have read the comparison page, but it seems that the Stamps have one serial input and one output.··Am I reading this incorrectly?· Is there a way to do what I would like?· If so, what chip do you recommend?
Thanks,
-dave
Thanks,
-dave
Comments
Given that NEMA strings repeat, you could possibly SERIN with WAIT to get the right chunk of data from one stream, then repeat for the other stream -- but your sample rate will go way down, not sure if that matters (if one SERIN waits some seconds till the right part of the string comes around, and then the second SERIN is long, if that makes sense).
Check the commands in the Pbasic manual to get an idea of what SERIN can do, and it's limitations and features.
What are you doing with the results of parsing/calculating the incoming data streams? Are you going to display it? Re-transmit the parsed results to another micro? Control some kind of motors?
With an SX you could set up (relatively) large byte buffers to handle the incoming stream(s); the RX code runs standalone in the background (using the interrupt), so essentially the incoming serial buffers will always be filling up "on their own". Ditto for any (optional?) TX bytes. The main loop of the program would parse the buffer data (at it's leisure), perform the calculations and store/display/actuate the results. Depends too on what your learning curve (if any) may be.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
However, if your GPS units have hardware handshake, then doing 'bit-bang' serial communications is possible. Simply hold off one unit, then the other, while talking to the other.
Good luck on your project.
kenjj
On one serial port is the GPS location of where I am at.· On the other serial port is the GPS location (sent by wireless modem) of a airplane, car, biker, etc.
The two GPS coordinates are compared and the output is used to point a camera or antenna at the tracked device.· The location of where I am is relatively fixed (once I am there) but the tracked device could be anywhere and will use a 5Hz GPS (ie reporting it's location 5 times a second).· It needs to be pretty quick to keep up with a nearby fast moving object but probably less so as the object moves further away.· Hopefuly, with some code wizardry, I could somewhat predict where the object will be and be pointing ahead of the intended object rather then where is once was.·
So, any thoughts or suggestions are greatly appreciated!
Thanks,
-dave
As a side note, I strongly suggest that you don't fall into the pattern of giving a limited description of your project, then asking one question, then giving a little more information and asking again with variations. It's a waste of people's time since the details of a project and some of the seemingly smaller constraints are often the deciding pieces for the implementation and people often have to give somewhat general answers since they don't have enough information. Often people have to guess what you're trying to accomplish in order to try to help and that's not fair.
Another technique is to use some simple logic to·interface the two units·to a single UART, controlled by an output from the MCU.
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
Post Edited (Leon) : 6/15/2008 8:52:17 PM GMT
Thanks for your help.
-dave