Figure 1: BASIC Stamp 2sx from Parallax Inc.
This allows the system to not only meet the current needs but also possible future requirements. The internal clock of the BS2sx was initially considered to keep track of the time of day, however, after extensive testing, the drift of the timing circuit proved to be too inaccurate. Fortunately, another added feature of the microcontroller is the ease of integrating a real time clock (RTC) through a three line serial connection. Subsequently, a Dallas Semiconductor 1302 (DS1302) trickle charge timekeeping chip was integrated into the system. The DS1302 counts seconds, minutes, hours, date of the month, month, day of the week, and year with leap year corrections through the year 2100. It also has the added ability to be connected to a rechargeable battery to keep track of time during power outages. The frequency generator was connected to the real time clock, according to the schematic shown on Figure 2 as described in Williams (1997).