Princeton PT6964 LED controller supports 4 Digits @ 13 Segments, 5 Digits @ 12 Segments, 6 Digits @ 11 Segments or 7 Digits @ 10 Segments. Also supports a scanned keyboard of upto 20 keys. SPI bus interface.
Princeton PT6964 LED controller supports 4 Digits @ 13 Segments, 5 Digits @ 12 Segments, 6 Digits @ 11 Segments or 7 Digits @ 10 Segments. Also supports a scanned keyboard of upto 20 keys. SPI bus interface.
See Component page here.
Font_7Seg.h
- Committer:
- wim
- Date:
- 2015-11-21
- Revision:
- 0:27f32a087e5a
- Child:
- 1:1adf993a3e34
File content as of revision 0:27f32a087e5a:
/* mbed LED Font Library, for Princeton PT6964 controller as used in DVD538A * Copyright (c) 2015, v01: WH, Initial version * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #ifndef MBED_FONT_7SEG_H #define MBED_FONT_7SEG_H // Segment bit positions for 7 Segment display using the DVD538A mapping for PT6964 // Modify this table for different 'bit-to-segment' mappings. The ASCII character defines and the FONT_7S const table below // will be adapted automatically according to the bit-to-segment mapping. Obviously this will only work when the segment // mapping is identical for every digit position. This will be the case unless the hardware designer really hates software developers. // #define S_D 0x0008 #define S_C 0x0010 #define S_B 0x0020 #define S_A 0x0040 #define S_E 0x0080 #define S_F 0x0100 #define S_G 0x0200 #define S_LD2 0x0001 #define S_LD1 0x0002 #define S_CD 0x0008 #define S_DVD 0x0010 #define S_PSE 0x0020 #define S_PLY 0x0040 #define S_COL 0x0080 #define S_MP4 0x0100 #define S_MP3 0x0200 //Mask for blending out and restoring Icons //One mask pattern will be sufficient assuming that all digits use the same mapping. #define S_ICON_MSK (0x0000) // ASCII Font definitions for segments in each character // //48 0x30 digits #define C_0 (S_A | S_B | S_C | S_D | S_E | S_F) #define C_1 (S_B | S_C) #define C_2 (S_A | S_B | S_D | S_E | S_G) #define C_3 (S_A | S_B | S_C | S_D | S_G) #define C_4 (S_B | S_C | S_F | S_G) #define C_5 (S_A | S_C | S_D | S_F | S_G) #define C_6 (S_A | S_C | S_D | S_E | S_F | S_G) #define C_7 (S_A | S_B | S_C) #define C_8 (S_A | S_B | S_C | S_D | S_E | S_F | S_G) #define C_9 (S_A | S_B | S_C | S_D | S_F | S_G) //64 0x40 #define C_A (S_A | S_B | S_C | S_E | S_F | S_G ) // Upper case alphabet #define C_B (S_C | S_D | S_E | S_F | S_G) #define C_C (S_A | S_D | S_E | S_F) #define C_D (S_B | S_C | S_D | S_E | S_G) #define C_E (S_A | S_D | S_E | S_F | S_G) #define C_F (S_A | S_E | S_F | S_G) //97 0x61 #define C_a (S_A | S_B | S_C | S_E | S_F | S_G ) // Lower case alphabet #define C_b (S_C | S_D | S_E | S_F | S_G) #define C_c (S_A | S_D | S_E | S_F) #define C_d (S_B | S_C | S_D | S_E | S_G) #define C_e (S_A | S_D | S_E | S_F | S_G) #define C_f (S_A | S_E | S_F | S_G) // Font data selection for transmission to PT6964 memory #define LO(x) ( x & 0xFF) #define HI(x) ((x >> 8) & 0xFF) // ASCII Font definition table // //#define FONT_7S_START 0x20 //#define FONT_7S_END 0x7F //#define FONT_7S_NR_CHARS (FONT_7S_END - FONT_7S_START + 1) extern const char FONT_7S[][2]; #endif