In order to maximize battery life, we also used a couple of tricks. For the I2C bus we used higher value pull-up resistors (10k vs 4.7k) to reduce
current and for the one unused pin on the PIC we set it to be a low logic value output (Microchip’s spec sheets, recommend this as a power
saving set up). In testing the watch’s current draw, we estimated that given the average power of a CR2032 battery, the watch should keep the
time for five years, before needing a battery swap in stand-by mode. Overall battery life will depend on how often the display is turned on.
Seven Segment Display:
The LEDs: One of the objectives when designing the Solder : Time was to make sure that all of the segments of the digits had equal brightness.
In some cases only two segments are lit, as is the case for the number “1”, When the “8” is on, all seven segments are lit. Battery power was also
a concern, the battery we chose for this project is the CR2032 which is a 3v low current battery. Our solution was to light only one single
segment at a time, this way if the digit being displayed was a “1” or an “8” all the segments would be equally bright and we wouldn’t over tax
the battery by drawing too much current. (If you wave the watch in the dark, you may be able to see the flashing pattern.)
Use a timer:
To light only one segment at a time we used one of the internal timer peripherals in the PIC. A timer may also be used as a counter, but in this
case we used it as a timer to time the on time of each segment. When the timer runs out, the PIC programming jumps into a interrupt routine. To
display a number, the PIC looks up the segments in a table that stores the on and off values for the segments. It starts with the first segment of
whichever number it is displaying and then turns the segment on (or not, if that segment isn’t on). After this, the program returns to the normal
main loop of the program and waits for the timer to run out again. When it does, the PIC turns on the next segment of the current digit. Even if
the segment of the current digit is not turned on, the timer still waits.
After all of the segments of a digit are displayed, the next digit is displayed, and after the last digit is displayed the colon is displayed and then it
starts over at the first digit.
Flashing Colon:
There is a special case when displaying the colon. It flashes when in time setting mode. It took a few tries to get the flashing to look good and
steady in the three states of the time setting mode; slow forward, fast forward and idle. To achieve a steady flash rate we used another timer. This
timer simply toggles the colon on or off ever time that it times out, then when it is time to display the colon it is simply lit or not.
Sleep Mode:
For the Solder : Time’s sleep mode we use a manual counter variable. This variable is incremented every time the program goes through a loop,
and when it over flows (gets too big for the size of the variables holder) a sleep flag is set and the watch goes to sleep. If the button is pressed
before the watch goes into sleep mode, the sleep counter is reset to zero and counting starts again. This way, the watch will go to sleep
consistently after about 5 seconds from the last time you pressed the button.
Before the watch goes to sleep it turns off the LEDs. The watch button is set to wake the watch up if it is pressed. Nothing is done to the RTC
since it goes into stand-by mode when no data is being transfered and it simply keeps the time.
Using the Solder : Time
To check the time:
1.
•
On the right side of the Solder : Time, press button once and release.
2.
•
Current time will display and after ~ five seconds display will go to sleep
To set the time:
1.
•
Press the button twice and hold it.
Содержание Solder:Time 495
Страница 3: ......
Страница 9: ...HEX Watch HEX zip ...