avr ntp clock 2x.


Posted on Feb 6, 2014

The Network Time Protocol (NTP) has revolutionized the world. Suddenly one could have anywhere in the world accurate time and date. NTP is a simple UDP based protocol and can be implemented in a microcontroller. The tuxgraphics NTP clock has been very popular over the years. This version 2. 0 has a built-in DHCP client. You just plug this clock int


avr ntp clock 2x.
Click here to download the full size of the above Circuit.

o any network and everything else is automatic. You don`t need any knowledge about IP networking. The NTP protocol is described in RFC958. Essentially it is just a 64 bit time-stamp. 32 bits of this time-stamp are the seconds in UTC (=GMT Greenwich mean time) since since Jan. 1st 1900. The other 32 bits are fractions of a second. In other words NTP can be very very accurate. For our purposes it is however enough if we just evaluate the seconds. The AVR NTP clock synchronizes at startup with a NTP server and uses then a timer interrupt to maintain time locally. Every hour it tries then to synchronize again. If your DSL router is however off during the night then it`s not a problem. The clock just continues. We use the on board crystal to maintain accurate time over several week. Once the network connection is back it will just synchronize again. A little status indicator appears in the lower right corner while the clock is waiting for an answer from the NTP server. Public NTP servers are maintained by various universities, government organizations and big computer companies like apple. A suitable server is already pre-configured in the tuxgraphics ntp server code. A clock is essentially just a counter. Since NTP is already a 32-bit "counter" we just take a 32bit variable and increment it. That is: the initial setting of the counter comes via NTP and then we just count up every second. A NTP server sends out the time as...




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

Nocturnal Animals Whisker
Touch Light Dimmer circuit
LCD to USB interface
Logic Probe with Pulse Indicator Circuit
Solar panel
Seismic detectors
NE555 Timer
Automatic Garden Lamp Simple Electronic Circuit Schematic for Turn-on and Turn-off Lamp Automatically
Intelligent transformer temperature monitor circuit module design



Top