template<BOARD::pin_t SCE_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
class MAX72XX< SCE_PIN, SDIN_PIN, SCLK_PIN >
Device driver for MAX72XX Serially Interfaced, 8-Digit LED Display Drivers.
The MAX7219/MAX7221 are compact, serial input/output common-cathode display drivers that interface microprocessors (μPs) to 7-segment numeric LED displays of up to 8 digits, bar-graph displays, or 64 individual LEDs. Included on-chip are a BCD code-B decoder, multiplex scan circuitry, segment and digit drivers, and an 8x8 static RAM that stores each digit.
References
- Product Specification, MAXIM, MAX7219/7221, 19-5542, Rev.4, 7/03. http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf
- Parameters
-
[in] | SCE_PIN | screen chip enable pin. |
[in] | SDIN_PIN | screen data pin. |
[in] | SCLK_PIN | screen clock pin. |
Definition at line 46 of file MAX72XX.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
Register Address Map (Table 2, pp 7).
Enumerator |
---|
NOP |
No-operation.
|
DIGIT0 |
Digit 0 (encode or segment data).
|
DIGIT1 |
Digit 1 (encode or segment data).
|
DIGIT2 |
Digit 2 (encode or segment data).
|
DIGIT3 |
Digit 3 (encode or segment data).
|
DIGIT4 |
Digit 4 (encode or segment data).
|
DIGIT5 |
Digit 5 (encode or segment data).
|
DIGIT6 |
Digit 6 (encode or segment data).
|
DIGIT7 |
Digit 7 (encode or segment data).
|
DECODE_MODE |
Decode Mode (0..255, digit bitset).
|
INTENSITY |
Intensity (0..15, level).
|
SCAN_LIMIT |
Scan Limit (0..7, digits 1..8).
|
DISPLAY_MODE |
Display Mode (shutdown, normal).
|
DISPLAY_TEST |
Display Test (0..1, on/off).
|
Definition at line 329 of file MAX72XX.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
MAX72XX< SCE_PIN, SDIN_PIN, SCLK_PIN >::MAX72XX |
( |
const uint8_t * |
font = NULL | ) |
|
|
inline |
Construct display device driver with given io adapter and font. The font should be a character to segment mapping table in program memory for character codes SPACE(0x20) to DEL(0x7f). No-Decode Mode Data Bits and Corresponding Segment Lines (Table 6, pp 8.).
A
+---+
F| G |B
+---+ Standard 7-Segment LED
E| |C
+---+ DP
D
D7 D6 D5 D4 D3 D2 D1 D0
DP A B C D E F G
- Parameters
-
[in] | font | program memory (Default NULL). |
Default font table; SPACE(0x20) to DEL(0x7f).
Definition at line 73 of file MAX72XX.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
virtual bool MAX72XX< SCE_PIN, SDIN_PIN, SCLK_PIN >::end |
( |
| ) |
|
|
inlinevirtual |
Stop sequence of interaction with device. Puts the display in shutdown mode.
- Returns
- true(1) if successful otherwise false(0)
Reimplemented from LCD::Device.
Definition at line 203 of file MAX72XX.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
virtual size_t MAX72XX< SCE_PIN, SDIN_PIN, SCLK_PIN >::write |
( |
uint8_t |
c | ) |
|
|
inlinevirtual |
Write character to display. Handles carriage-return-line-feed, backspace, alert, horizontal tab and form-feed. The period character is translated to the 7-segment LED decimal point of the previous written character. Returns number of characters(1) or zero(0) on error.
- Parameters
-
- Returns
- number of characters written(1) or zero(0) for error.
Definition at line 272 of file MAX72XX.h.