[time-nuts] Lady Heather for homebrew GPSDO

Mark Sims holrum at hotmail.com
Sun Dec 18 18:06:46 UTC 2016


If you go digging in the Ladt Heather code, you will find references to a "luxor" device.  This is a LED / power analyzer device that I built.  It runs on a ATMEGA 2561 and uses the TSIP protocol.  I've also implemented the same TSIP protocol code on a '328 with 32kB of program memory.  It's not that hard to do.  At the lowest level it doesn't take much more code than a NMEA processor.  The code sends and receives properly formatted TSIP sentences.  What gets really fiddly is all the details of trying to faithfully emulate an existing GPSDO.

Binary or NMEA you need routines like send_msg_start,  send item (like integer, float, double), send_msg_end.  For received messages you need things like get_message,  get_item_from_message, etc.  The code to do that is not much more complicated for a binary protocol or an ASCII one like NMEA.

Binary messages have the little complication of what byte ordering does the CPU and protocol use.  Heather has a find_endian routine that determines the CPU ordering for getting values from the received messages and re-ordering the bytes to what the CPU expects and the output routines reformat CPU values into the byte order that the receiver wants. 

--------------------

>  Writing and *debugging* a binary protocol is a lot more involved than a serial stream. You
can argue that code it code and it’s all trivial. 


More information about the Time-nuts_lists.febo.com mailing list