Automatically synchronises its time with your PC and by extension, an
internet time server.
Internal rechargeable battery to keep the time while disconnected from
4-digit LCD with optional dimming LED backlight.
All settings are changed by connecting to a PC.
Can display supply voltage and battery charge status, as well as date and
Low-power CMOS design for extended battery life.
Automatic backlighting mode.
Displays time in either 24-hour or 12-hour format.
All recent PC operating systems, including Windows, provide
services for NTP (Network Time Protocol), a protocol that’s used to synchronise
your PC’s local time with an internet time server. This USB Clock in turn
synchronises with your PC’s clock and provided you boot your PC regularly (and
synchronise it to an internet time server), it will maintain accurate
In operation, the USB Clock is powered via the PC’s USB port
when the PC is on. This also charges an internal NiMH battery. This battery
powers the clock when the PC is off or when the clock is disconnected from the
When the PC is off, the clock’s timekeeping is maintained by a
32.768kHz watch crystal. This is accurate to within ±20ppm, giving a timekeeping
accuracy of better than two seconds a day in stand-alone
By now, you’ve probably guessed that the LCD USB Clock is based
on a microcontroller. In this case, we’re using a PIC18F4550 micro to provide
all the necessary functions.
In addition, a small command-line program (usbclock.exe) is used to
change the USB clock’s settings and to synchronise the clock’s time with your
PC’s clock. This will be described next month. We’ll even show you how to set-up
your Windows operating system (using an entry in the Start-up folder) to
automatically synchronise the USB Clock to the PC’s clock each time the machine
That way, you can install the software and forget it. In fact,
this system will even take care of daylight saving time shifts. When your PC
automatically adjusts for daylight saving it automatically adjusts the USB clock
as well (when it is next synchronised).
|1||VPP||Programming voltage (typically 13V)|
|2||PGC||Programming clock signal|
|5||VDD||Supply voltage (typically 5V)|
|6||PGD||Programming data signal|
Table 1: this table shows the pin-out of the ICSP (in-circuit serial programming) header CON1. It can be used to program IC1 in-circuit using a programmer like the dsPIC Programmer featured in the May 2008 issue. Other programmers like Microchip’s PICKit2 can also be used, by connecting the pins appropriately.