
Originally Posted by
Squibcakes
The only thing I can suggest to you is rather than use the pic to serial receive / send the data, use the pic to control a digital switch (isolated).
The switch would then cycle and pass through each talker's NMEA data. You could also use the PIC to detect the CR/LF at end of each string to trigger the digital switch to cycle to the next talker.
Squib,
I totally agree,
MUXing NMEA Data without loosing too much data and not adding too much delay is not one of the easiest tasks.
With the switch approach you'll need a MCU to control the switch.
And you have got to do a bit more than just triggering on "$" and "CRLF"
many talkers send out telegrams consisting of more than one sentence.
(I have actually not seen any talker sending out just a single sentence)
Every single sentence within that telegram starts with "$" and ends with "CRLF"
(Think of a GPS Unit)
By simply triggering on "$" and "CRLF" you will randomly get one sentences out of the telegram,
but this is most likely not the one you really need.
And due to undefined timing between different talkers transmissions will most likely be overlapping and you will still miss data.
So switching in a pure electrical sense does not really help.
What you need is some smart "store and forward" mechanism.
Sure,
if there aren't too many talkers to be MUXed and you can afford to miss one or the other sentence
a simple switch controlled by a simple timer (no MCU at all) would do.
But bear in mind that this solution will create some garbage on the MUXed bus (incomplete sentences).
I have seen Listeners being locked up by garbage on the bus.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks