Wim Huiskamp / PT6301
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PT6301_UDC.inc Source File

PT6301_UDC.inc

00001 /* mbed PT6301 UDC Library, for Princeton PT6301 VFD controller
00002  *             The controller is used by Futaba 'Chip In Glass' (CIG) VFD tubes. 
00003  *
00004  * Copyright (c) 2021, v01: WH, Initial version
00005  *
00006  * Permission is hereby granted, free of charge, to any person obtaining a copy
00007  * of this software and associated documentation files (the "Software"), to deal
00008  * in the Software without restriction, including without limitation the rights
00009  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00010  * copies of the Software, and to permit persons to whom the Software is
00011  * furnished to do so, subject to the following conditions:
00012  *
00013  * The above copyright notice and this permission notice shall be included in
00014  * all copies or substantial portions of the Software.
00015  *
00016  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00017  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00018  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00019  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00020  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00021  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00022  * THE SOFTWARE.
00023  */
00024 #include "PT6301_Config.h"
00025 
00026 #if(PT6301_UDC == 1)
00027 
00028 // User Defined Characters (UDCs) are defined by a 5 byte bitpattern.
00029 // The C0..C34 form the character pattern.
00030 //     D7 D6  D5  D4  D3 D2 D1 D0 
00031 // 0   x  C30 C25 C20 ......   C0
00032 // 1   x  C31 C24  ........... C1
00033 // .       .............
00034 // 4   x  C34 C29  ........... C4
00035 //
00036 //
00037 // The UDC matrix will show on the VFD as
00038 // 0   C0  C1  C2  C3  C4
00039 // 1   C5  C6 .....    C9
00040 // .    .............
00041 // .    .............
00042 // .    .............
00043 // 6   C30 C31 ...     C34
00044 //
00045 //
00046 // Some sample User Defined Chars 5x7 dots
00047 // Note that these are mirrored vertically (ie upside down) due to LSB first bitswapping of data by this lib.
00048 const char udc_Bat_Hi[]  = {0x0E, 0x1F, 0x1F, 0x1F, 0x1F};  // Battery Full
00049 const char udc_Bat_Ha[]  = {0x0E, 0x11, 0x13, 0x17, 0x1F};  // Battery Half
00050 const char udc_Bat_Lo[]  = {0x0E, 0x11, 0x11, 0x11, 0x11};  // Battery Low
00051 const char udc_checker[] = {0xAA, 0x55, 0xAA, 0x55, 0xAA};                          
00052                                           
00053 //const char udc_PO[] = {0x04, 0x0A, 0x0A, 0x1F, 0x1B, 0x1B};  //Padlock Open
00054 //const char udc_PC[] = {0x1C, 0x10, 0x08, 0x1F, 0x1B, 0x1B};  //Padlock Closed
00055 
00056 const char udc_LAR[]  = {0x07, 0x03, 0x05, 0x78, 0x00};   // Left Arrow
00057 const char udc_RAR[]  = {0x00, 0x78, 0x05, 0x03, 0x07};   // Right Arrow
00058 
00059 //const char udc_LF[]   = {0x08, 0x1C, 0x3E, 0x00, 0x3E};   // Left 
00060 //const char udc_RT[]   = {0x3E, 0x00, 0x3E, 0x1C, 0x08};   // Right
00061 //const char udc_UP[]   = {0x28, 0x2C, 0x2E, 0x2C, 0x28};   // Up 
00062 //const char udc_DW[]   = {0x0A, 0x1A, 0x2A, 0x1A, 0x0A};   // Down
00063 #endif