-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 source= http://www.piclist.com/piclist/2004/03/26/132954a.txt? Francisco J. A. Ares says: >If the final meaning of this is to set the clock on the PIC board, can't >you simply make a program that sends the date/time information from the >computer first? Here's another stab at capturing the PPP packets sent from NTP. This time, I caused Win 2000 to avoid compression. I have added whitespace, and arbitrary material enclosed in () to aid understanding. I have RFC 1305 handy as well. From what I can see, beginning at about byte 56 of the packet is the current time, in elapsed seconds and fractions since Jan 1, 1900 referenced to GMT at 12:00 noon. So a fixed-point number, containing the exact time, passes through the serial line periodically. From where my system is now, I need to write a routine to recognize the packets, to put two times in a FIFO, to subtract 64 bit numbers, to keep the timer time up to 64 bits, and to do a subtract (to obtain PIC cycles per second) ( 3/27/2004 11:03:35 CDT 215 [3267]) 7E2145 00004C8C 1E000080 7D31B46D CEC4512B (vima.austin.tx.us) 9206481F (ccwf.cc.utexas.edu) 007B 007B 0038E88C 7D330406 (ntp's UDP packet) EE 000025A5 (Root Delay) 0000386B (Root Dispersion) 9206481F (Reference Clock Identifier) C41009C3 (whole.fraction) 4C6E2A80 (Reference Epoch) C4103229 (whole.fraction) F916F000 (Originate) C410322A (whole.fraction) B583621F (Receive) C4103268 (whole.fraction) 44A85CAA (Transmit) D31E7E ( 3/27/2004 11:04:40 CDT 280 [32A8]) 7E2145 00004C8C 21000080 7D31B46A CEC4512B 9206481F 007B 007B 0038E780 7D330406 EE 000025A5 000038AA 9206481F C41009C34C6E2A80 (Reference Epoch) C41032690C348000 C4103269C85436B8 C41032A85AE9BBF0 0B047E ( 3/27/2004 11:05:42 CDT 342 [32E6]) 7E2145 00004C8C 33000080 7D31B458 CEC4512B 9206481F 007B 007B 00384570 7D330406 EE 000025A5 000038E8 9206481F C41009C34C6E2A80 (Reference Epoch) C41032A921DF0000 (3DH) C41032A9DE643CC0 (3DH) C41032E8712A94FF 73797E ( 3/27/2004 11:06:48 CDT 408 [3328]) 7E2145 00004C8C 38000080 7D31B453 CEC4512B 9206481F 007B 007B 003866B9 7D330407 EE00 00307D5D 00008209 9206481F C41032E9F4AB3EDD (Reference Epoch) C41032E9378BE000 (3FH) C41032E9F4AB3EDD (3FH) C410332987D17D33 83C26D7E ( 3/27/2004 11:08:56 CDT 536 [33A8]) 7E2145 00004C8C 3E000080 7D31B44D CEC4512B 9206481F 007B 007B 0038EE47 7D330407 EE00 00307D5D 00008286 9206481F C41032E9F4AB3EDD (Reference Epoch) C410332A52D9E000 (7EH) C410332B1208BFC2 (7Dh) C41033A9B46DA448 6C327E ( 3/27/2004 11:11:06 CDT 666 [342A]) 7E2145 00004C8C 42000080 7D31B449 CEC4512B 9206481F 007B 007B 0038BBBB 7D330407 EE00 00307D5D 00008305 9206481F C41032E9F4AB3EDD (Reference Epoch) C41033AA78ED8000 (80H) C41033AB359F1AE2 (7FH) C410342AE1606317 ( 59C77E - --- Aubrey McIntosh http://www.piclist.com/member/AM-vima-Y84 PIC/PICList FAQ: http://www.piclist.com -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use iQA/AwUBQGYfsQKlSw8yssF7EQLGKgCg5mpsnmI9a/V4ezKA6OlhUMgQ2IUAoL7z 68VOtY+ye2QsVg28oqcolT1J =wYrs -----END PGP SIGNATURE----- -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads