Quiz: Real-Time Clocks and Display Drivers for Clocks and Watches¶
Test your understanding of real-time clocks and display drivers for clocks and watches with these review questions.
1. What is epoch time?¶
- The fixed number of hours a local clock differs from UTC
- A low-power state where the processor pauses but can wake quickly
- The deliberately chosen delay between one redraw of a clock face and the next
- The number of seconds elapsed since a fixed reference moment, January 1, 1970, at 00:00:00 UTC
Show Answer
The correct answer is D. Epoch time is the number of seconds that have elapsed since a fixed reference moment — January 1, 1970, at 00:00:00 UTC for nearly every system — so any two devices comparing the same epoch number are guaranteed to mean the exact same instant. Option A describes time zone offset, option B describes sleep mode, and option C describes clock update interval.
Concept Tested: Epoch Time
2. What is a shift register?¶
- A dedicated hardware module that tracks the current date and time independent of the microcontroller
- A chip that converts a serial stream of bits into multiple parallel output signals held steady on separate pins
- A display driver chip specialized for lighting seven-segment digit combinations
- A small disc-shaped battery that powers only an RTC's clock-keeping circuitry
Show Answer
The correct answer is B. A shift register is a digital chip that converts a serial stream of bits, sent one at a time over a single data wire, into multiple parallel output signals held steady on separate output pins, letting a Pico control many more outputs than it has physical pins. Option A describes a real-time clock, option C describes a TM1637 driver, and option D describes a coin cell battery.
Concept Tested: Shift Register
3. How does deep sleep differ from sleep mode on the Pico?¶
- Deep sleep uses more power than sleep mode but wakes up faster
- Sleep mode and deep sleep are two names for exactly the same power state
- Deep sleep shuts down far more internal circuitry than sleep mode, using less power but typically requiring a full reset to wake rather than resuming where the program left off
- Sleep mode can only be used with a DS3231 module, while deep sleep works with any RTC
Show Answer
The correct answer is C. Deep sleep is an even lower-power state than sleep mode, shutting down far more of the microcontroller's internal circuitry in exchange for a slower, more limited wake-up process — typically a full reset rather than resuming exactly where the program left off. Option A reverses the power/wake-speed relationship. Option B incorrectly treats them as identical, and option D invents an RTC dependency the chapter does not describe.
Concept Tested: Deep Sleep
4. What is the key functional difference between a stopwatch feature and a timer feature?¶
- A stopwatch counts upward from zero until manually stopped, while a timer counts downward from a chosen duration to zero and signals when it completes
- A stopwatch requires a DS3231 module, while a timer can run on the Pico's internal clock alone
- A stopwatch and a timer both count downward, differing only in their sound alert
- A stopwatch can only be used with an analog clock face, while a timer requires a digital format
Show Answer
The correct answer is A. A stopwatch feature measures and displays elapsed time counting upward from the moment it was started, while a timer feature counts downward from a chosen starting duration to zero and signals when the countdown completes. Option B invents a hardware requirement not stated in the chapter. Option C incorrectly claims both count in the same direction, and option D wrongly ties either feature to a specific display format.
Concept Tested: Stopwatch Feature
5. Why does this chapter favor a round display, driven by the GC9A01 driver, specifically for watch-face projects?¶
- Round displays are the only display type capable of showing analog clock hands
- Round displays consume significantly less power than any other display family
- The GC9A01 driver is the only chip in this chapter compatible with I2C communication
- A round display's circular screen area matches the shape of a traditional analog watch face far more naturally than a rectangular TFT
Show Answer
The correct answer is D. The chapter explains that a round display's circular visible screen area matches the shape of a traditional analog watch face far more naturally than a rectangular TFT ever could. Option A is false since analog hands can be drawn on any display type, including rectangular ones. Option B is not a claim the chapter makes, and option C is incorrect since the GC9A01, like the ILI9341, is SPI-controlled, not I2C.
Concept Tested: Round Display
6. Using the chapter's hand_angle_degrees(value, max_value) function, what angle in degrees does the minute hand point to when minute = 15?¶
- 15 degrees
- 60 degrees
- 90 degrees
- 150 degrees
Show Answer
The correct answer is C. The function computes (value / max_value) * 360. For the minute hand, max_value is 60, so (15 / 60) * 360 = 0.25 * 360 = 90 degrees. Option A confuses the raw minute value with the angle. Option B mistakes the max_value for the answer, and option D would require a minute value of 25, not 15.
Concept Tested: Time Formatting Code
7. A student's watch project redraws its face once per second during the day but needs to conserve maximum power overnight, when the display doesn't need to update at all for eight hours. Which combination of machine calls best matches the chapter's guidance?¶
- machine.deepsleep(1000) repeated every second, both day and night
- machine.lightsleep(1000) between each daytime redraw, and machine.deepsleep(8 * 60 * 60 * 1000) for the overnight stretch
- machine.lightsleep(8 * 60 * 60 * 1000) for the overnight stretch, and machine.deepsleep(1000) between daytime redraws
- Neither sleep mode nor deep sleep should be used in a battery-powered watch project
Show Answer
The correct answer is B. The chapter's own example uses lightsleep() (sleep mode) for the natural one-second gap between clock updates, since the program can resume exactly where it left off, and deepsleep() for a long idle stretch like eight hours overnight, where waking from a full reset is an acceptable tradeoff for much lower power draw. Option A wastes deep sleep's benefit on tiny gaps requiring frequent resets, option C swaps the two use cases, and option D contradicts the chapter's explicit low-power design guidance.
Concept Tested: Sleep Mode
8. A student wants to build a full-color, circular analog watch face. Which display driver chip from this chapter best fits this requirement?¶
- TM1637 driver
- 74HC595 chip
- ILI9341 driver
- GC9A01 driver
Show Answer
The correct answer is D. The GC9A01 driver is a TFT-style driver chip built specifically for round display modules, SPI-controlled and supporting full color, wired to a circular pixel layout — exactly matching the requirement. The TM1637 (option A) drives seven-segment digits, the 74HC595 (option B) is a general-purpose shift register, not a display driver, and the ILI9341 (option C) drives rectangular, not round, TFT displays.
Concept Tested: GC9A01 Driver
9. A student's clock code applies the time zone offset to a timestamp, stores that adjusted value, and later performs date-math calculations directly on it, occasionally producing times that are off by exactly one hour after a daylight saving transition. What does the chapter's guidance suggest is the likely design mistake?¶
- The code should have stored and compared epoch time internally, applying the time zone offset and any daylight-saving adjustment only at the very last step before formatting for display
- The DS3231 module's coin cell battery is failing intermittently
- NTP time sync was never called, so the underlying clock is simply wrong
- The shift register's latch step was skipped, corrupting the displayed digits
Show Answer
The correct answer is A. The chapter explicitly warns that epoch time, time zone offset, and daylight saving time are three separate, stackable adjustments, and that a clock's internal math should always store and compare epoch time, applying the offset and any DST adjustment only at the very last step before formatting — doing the adjustment earlier risks exactly the kind of one-hour error described. Options B, C, and D introduce unrelated hardware or workflow failures that don't match the described symptom pattern.
Concept Tested: Time Zone Offset
10. A student's analog watch face is supposed to show a smoothly sweeping second hand, but during testing the hand visibly jumps in noticeable steps rather than sweeping continuously. What is the most likely cause, based on the chapter's discussion of clock update interval?¶
- The RTC module has lost its backup battery power
- The clock update interval is set too long, so the face redraws too infrequently to look continuous
- The hand_angle_degrees() function was given the wrong max_value argument
- The watch is using digital clock format instead of analog clock hands
Show Answer
The correct answer is B. The chapter's discussion of clock update interval notes that at a large update interval, the second hand visibly jumps in noticeable steps rather than sweeping smoothly, while very low intervals make the motion look continuous — exactly matching the described symptom. Option A would cause incorrect time values, not choppy motion. Option C would cause a wrong angle, not choppiness, and option D describes an unrelated display format choice.
Concept Tested: Clock Update Interval