Library for Princeton PT6961 LED driver. Supports 6 digits @ 12 segments or 7 digits @ 11 segments. Also supports keyboard scanning of upto 30 keys. SPI interface.

Dependents:   mbed_PT6961

This LED driver is found in frontpanel controllers of consumer electronics such as DVD players. The added features such as the matrix keyboard scanning are useful in these applications.

Additional information is available on the component page here

Committer:
wim
Date:
Thu Jan 14 20:03:13 2016 +0000
Revision:
2:c6883ede8d8b
Parent:
1:eb4758bba68a
Refactored display and keyboard defines

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wim 1:eb4758bba68a 1 /* mbed VFD Font Library, for Princeton PT6961 LED controller as used in V56S
wim 1:eb4758bba68a 2 * Copyright (c) 2015, v01: WH, Initial version, Test V56S
wim 1:eb4758bba68a 3 *
wim 1:eb4758bba68a 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
wim 1:eb4758bba68a 5 * of this software and associated documentation files (the "Software"), to deal
wim 1:eb4758bba68a 6 * in the Software without restriction, including without limitation the rights
wim 1:eb4758bba68a 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
wim 1:eb4758bba68a 8 * copies of the Software, and to permit persons to whom the Software is
wim 1:eb4758bba68a 9 * furnished to do so, subject to the following conditions:
wim 1:eb4758bba68a 10 *
wim 1:eb4758bba68a 11 * The above copyright notice and this permission notice shall be included in
wim 1:eb4758bba68a 12 * all copies or substantial portions of the Software.
wim 1:eb4758bba68a 13 *
wim 1:eb4758bba68a 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
wim 1:eb4758bba68a 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
wim 1:eb4758bba68a 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
wim 1:eb4758bba68a 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
wim 1:eb4758bba68a 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
wim 1:eb4758bba68a 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
wim 1:eb4758bba68a 20 * THE SOFTWARE.
wim 1:eb4758bba68a 21 */
wim 1:eb4758bba68a 22 #include "Font_7Seg.h"
wim 1:eb4758bba68a 23
wim 1:eb4758bba68a 24 // Select one of the testboards for Princeton PT6961 controller
wim 1:eb4758bba68a 25
wim 1:eb4758bba68a 26 #if (HR734_TEST == 1)
wim 1:eb4758bba68a 27
wim 1:eb4758bba68a 28 //Mask for blending out and restoring Icons
wim 1:eb4758bba68a 29 const char MASK_ICON_GRID[][2] = {
wim 1:eb4758bba68a 30 {LO(S7_ICON_GR1), HI(S7_ICON_GR1)},
wim 1:eb4758bba68a 31 {LO(S7_ICON_GR2), HI(S7_ICON_GR2)},
wim 1:eb4758bba68a 32 {LO(S7_ICON_GR3), HI(S7_ICON_GR3)},
wim 1:eb4758bba68a 33 {LO(S7_ICON_GR4), HI(S7_ICON_GR4)},
wim 1:eb4758bba68a 34 {LO(S7_ICON_GR5), HI(S7_ICON_GR5)},
wim 1:eb4758bba68a 35 {LO(S7_ICON_GR6), HI(S7_ICON_GR6)},
wim 1:eb4758bba68a 36 {LO(S7_ICON_GR7), HI(S7_ICON_GR7)}
wim 1:eb4758bba68a 37 };
wim 1:eb4758bba68a 38
wim 1:eb4758bba68a 39
wim 2:c6883ede8d8b 40 // ASCII Font definition table for transmission to PT6961
wim 1:eb4758bba68a 41 //
wim 1:eb4758bba68a 42 //#define FONT_7S_START 0x20
wim 1:eb4758bba68a 43 //#define FONT_7S_END 0x7F
wim 1:eb4758bba68a 44 //#define FONT_7S_NR_CHARS (FONT_7_END - FONT_7S_START + 1)
wim 1:eb4758bba68a 45
wim 1:eb4758bba68a 46 const short FONT_7S[] = {
wim 1:eb4758bba68a 47 C7_0, //48 0x30
wim 1:eb4758bba68a 48 C7_1,
wim 1:eb4758bba68a 49 C7_2,
wim 1:eb4758bba68a 50 C7_3,
wim 1:eb4758bba68a 51 C7_4,
wim 1:eb4758bba68a 52 C7_5,
wim 1:eb4758bba68a 53 C7_6,
wim 1:eb4758bba68a 54 C7_7,
wim 1:eb4758bba68a 55 C7_8,
wim 1:eb4758bba68a 56 C7_9,
wim 1:eb4758bba68a 57 C7_A, //65 0x41, A
wim 1:eb4758bba68a 58 C7_B,
wim 1:eb4758bba68a 59 C7_C,
wim 1:eb4758bba68a 60 C7_D,
wim 1:eb4758bba68a 61 C7_E,
wim 1:eb4758bba68a 62 C7_F
wim 2:c6883ede8d8b 63 };// 127
wim 1:eb4758bba68a 64
wim 1:eb4758bba68a 65 #endif
wim 1:eb4758bba68a 66
wim 1:eb4758bba68a 67 #if (V56S_TEST == 1)
wim 1:eb4758bba68a 68
wim 1:eb4758bba68a 69 //Mask for blending out and restoring Icons
wim 1:eb4758bba68a 70 const char MASK_ICON_GRID[][2] = {
wim 1:eb4758bba68a 71 {LO(S7_ICON_GR1), HI(S7_ICON_GR1)},
wim 1:eb4758bba68a 72 {LO(S7_ICON_GR2), HI(S7_ICON_GR2)},
wim 1:eb4758bba68a 73 {LO(S7_ICON_GR3), HI(S7_ICON_GR3)},
wim 1:eb4758bba68a 74 {LO(S7_ICON_GR4), HI(S7_ICON_GR4)},
wim 1:eb4758bba68a 75 {LO(S7_ICON_GR5), HI(S7_ICON_GR5)},
wim 1:eb4758bba68a 76 {LO(S7_ICON_GR6), HI(S7_ICON_GR6)},
wim 1:eb4758bba68a 77 {LO(S7_ICON_GR7), HI(S7_ICON_GR7)}
wim 1:eb4758bba68a 78 };
wim 1:eb4758bba68a 79
wim 1:eb4758bba68a 80
wim 2:c6883ede8d8b 81 // ASCII Font definition table for transmission to PT6961
wim 1:eb4758bba68a 82 //
wim 1:eb4758bba68a 83 //#define FONT_7S_START 0x20
wim 1:eb4758bba68a 84 //#define FONT_7S_END 0x7F
wim 1:eb4758bba68a 85 //#define FONT_7S_NR_CHARS (FONT_7_END - FONT_7S_START + 1)
wim 1:eb4758bba68a 86
wim 1:eb4758bba68a 87 const short FONT_7S[] = {
wim 1:eb4758bba68a 88 C7_0, //48 0x30
wim 1:eb4758bba68a 89 C7_1,
wim 1:eb4758bba68a 90 C7_2,
wim 1:eb4758bba68a 91 C7_3,
wim 1:eb4758bba68a 92 C7_4,
wim 1:eb4758bba68a 93 C7_5,
wim 1:eb4758bba68a 94 C7_6,
wim 1:eb4758bba68a 95 C7_7,
wim 1:eb4758bba68a 96 C7_8,
wim 1:eb4758bba68a 97 C7_9,
wim 1:eb4758bba68a 98 C7_A, //65 0x41, A
wim 1:eb4758bba68a 99 C7_B,
wim 1:eb4758bba68a 100 C7_C,
wim 1:eb4758bba68a 101 C7_D,
wim 1:eb4758bba68a 102 C7_E,
wim 1:eb4758bba68a 103 C7_F
wim 2:c6883ede8d8b 104 };// 127
wim 1:eb4758bba68a 105
wim 1:eb4758bba68a 106 #endif