Library for Princeton PT6302 VFD controller. Note the PT6302 is identical to the OKI ML9208.

Dependents:   mbed_PT6302 mbed_PT6301

More information is here.

Committer:
wim
Date:
Sun Dec 03 18:02:15 2017 +0000
Revision:
0:ecc29c13a997
Library for Princeton PT6302 VFD controller.; Note the PT6302 is identical to the OKI ML9208.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wim 0:ecc29c13a997 1 /* mbed PT6302 UDC Library, for Princeton PT6302 VFD controller
wim 0:ecc29c13a997 2 * Note the PT6302 is identical to the OKI ML9208
wim 0:ecc29c13a997 3 *
wim 0:ecc29c13a997 4 * Copyright (c) 2017, v01: WH, Initial version
wim 0:ecc29c13a997 5 *
wim 0:ecc29c13a997 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
wim 0:ecc29c13a997 7 * of this software and associated documentation files (the "Software"), to deal
wim 0:ecc29c13a997 8 * in the Software without restriction, including without limitation the rights
wim 0:ecc29c13a997 9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
wim 0:ecc29c13a997 10 * copies of the Software, and to permit persons to whom the Software is
wim 0:ecc29c13a997 11 * furnished to do so, subject to the following conditions:
wim 0:ecc29c13a997 12 *
wim 0:ecc29c13a997 13 * The above copyright notice and this permission notice shall be included in
wim 0:ecc29c13a997 14 * all copies or substantial portions of the Software.
wim 0:ecc29c13a997 15 *
wim 0:ecc29c13a997 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
wim 0:ecc29c13a997 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
wim 0:ecc29c13a997 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
wim 0:ecc29c13a997 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
wim 0:ecc29c13a997 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
wim 0:ecc29c13a997 21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
wim 0:ecc29c13a997 22 * THE SOFTWARE.
wim 0:ecc29c13a997 23 */
wim 0:ecc29c13a997 24 #include "PT6302_Config.h"
wim 0:ecc29c13a997 25
wim 0:ecc29c13a997 26 #if(PT6302_UDC == 1)
wim 0:ecc29c13a997 27
wim 0:ecc29c13a997 28 // User Defined Characters (UDCs) are defined by a 5 byte bitpattern.
wim 0:ecc29c13a997 29 // The C0..C34 form the character pattern.
wim 0:ecc29c13a997 30 // D7 D6 D5 D4 D3 D2 D1 D0
wim 0:ecc29c13a997 31 // 0 x C30 C25 C20 ...... C0
wim 0:ecc29c13a997 32 // 1 x C31 C24 ........... C1
wim 0:ecc29c13a997 33 // . .............
wim 0:ecc29c13a997 34 // 4 x C34 C29 ........... C4
wim 0:ecc29c13a997 35 //
wim 0:ecc29c13a997 36 //
wim 0:ecc29c13a997 37 // The UDC matrix will show on the VFD as
wim 0:ecc29c13a997 38 // 0 C0 C1 C2 C3 C4
wim 0:ecc29c13a997 39 // 1 C5 C6 ..... C9
wim 0:ecc29c13a997 40 // . .............
wim 0:ecc29c13a997 41 // . .............
wim 0:ecc29c13a997 42 // . .............
wim 0:ecc29c13a997 43 // 6 C30 C31 ... C34
wim 0:ecc29c13a997 44 //
wim 0:ecc29c13a997 45 //
wim 0:ecc29c13a997 46 // Some sample User Defined Chars 5x7 dots */
wim 0:ecc29c13a997 47 const char udc_Bat_Hi[] = {0x0E, 0x1F, 0x1F, 0x1F, 0x1F}; // Battery Full
wim 0:ecc29c13a997 48 const char udc_Bat_Ha[] = {0x0E, 0x11, 0x13, 0x17, 0x1F}; // Battery Half
wim 0:ecc29c13a997 49 const char udc_Bat_Lo[] = {0x0E, 0x11, 0x11, 0x11, 0x11}; // Battery Low
wim 0:ecc29c13a997 50 const char udc_checker[] = {0xAA, 0x55, 0xAA, 0x55, 0xAA};
wim 0:ecc29c13a997 51
wim 0:ecc29c13a997 52 //const char udc_PO[] = {0x04, 0x0A, 0x0A, 0x1F, 0x1B, 0x1B}; //Padlock Open
wim 0:ecc29c13a997 53 //const char udc_PC[] = {0x1C, 0x10, 0x08, 0x1F, 0x1B, 0x1B}; //Padlock Closed
wim 0:ecc29c13a997 54
wim 0:ecc29c13a997 55 const char udc_LAR[] = {0x07, 0x03, 0x05, 0x78, 0x00}; // Left Arrow
wim 0:ecc29c13a997 56 const char udc_RAR[] = {0x00, 0x78, 0x05, 0x03, 0x07}; // Right Arrow
wim 0:ecc29c13a997 57 #endif