|
117 | 117 | //! The [`Display`] expects to control a single timer. It can use the
|
118 | 118 | //! micro:bit's `TIMER0`, `TIMER1`, or `TIMER2`.
|
119 | 119 | //!
|
120 |
| -//! This uses a 6ms period to light each of the three internal LED rows, so |
121 |
| -//! that the entire display is updated every 18ms. |
| 120 | +//! For the micro:bit v1 this uses a 6ms period to light each of the three |
| 121 | +//! internal LED rows, so that the entire display is updated every 18ms. |
| 122 | +//! |
| 123 | +//! For the micro:bit v2 this uses a 3ms period to light each of the five |
| 124 | +//! internal LED rows, so that the entire display is updated every 15ms. |
122 | 125 | //!
|
123 | 126 | //! When rendering greyscale images, the `Display` requests extra interrupts
|
124 |
| -//! within each 6ms period. It only requests interrupts for the greyscale |
125 |
| -//! levels which are actually required for what's currently being displayed. |
| 127 | +//! within each 6ms or 3ms period. It only requests interrupts for the |
| 128 | +//! greyscale levels which are actually required for what's currently being |
| 129 | +//! displayed. |
126 | 130 | //!
|
127 | 131 | //! ### Technical details
|
128 | 132 | //!
|
129 |
| -//! The timer is set to 16-bit mode, using a 62.5kHz clock (16 µs ticks). It |
130 |
| -//! resets every 375 ticks. |
| 133 | +//! The timer is set to 16-bit mode, using a 62.5kHz or 135Khz clock (16 µs or |
| 134 | +//! 8µs ticks). It resets every 375 ticks. |
131 | 135 | //!
|
132 | 136 | //! ## Usage
|
133 | 137 | //!
|
|
137 | 141 | //! - create a [`Display`] struct passing the timer and
|
138 | 142 | //! [`gpio::DisplayPins`](crate::gpio::DisplayPins) to [`Display::new()`].
|
139 | 143 | //!
|
140 |
| -//! In an interrupt handler forthe timer call [`.handle_display_event()`](Display::handle_display_event) |
| 144 | +//! In an interrupt handler for the timer call [`.handle_display_event()`](Display::handle_display_event) |
141 | 145 | //!
|
142 | 146 | //! To change what's displayed; pass an image ([`GreyscaleImage`] or [`BitImage`]) to [`Display::show`].
|
143 | 147 | //!
|
|
0 commit comments