Lib for Noritake Itron CU209SCPB VFD Module (1 Line, 20 Chars), Serial interface

Dependents:   mbed_CU209SCPB_T20

More info is here.

Committer:
wim
Date:
Sun Dec 10 17:02:32 2017 +0000
Revision:
0:93ae875cbb7a
Lib for Noritake Itron VFD Module (1 Line, 20 Chars), Serial interface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wim 0:93ae875cbb7a 1 /* mbed CU209SCPB UDC Library, for Noritake Itron CU209SCPB VFD module
wim 0:93ae875cbb7a 2 *
wim 0:93ae875cbb7a 3 * Copyright (c) 2017, v01: WH, Initial version
wim 0:93ae875cbb7a 4 *
wim 0:93ae875cbb7a 5 * Permission is hereby granted, free of charge, to any person obtaining a copy
wim 0:93ae875cbb7a 6 * of this software and associated documentation files (the "Software"), to deal
wim 0:93ae875cbb7a 7 * in the Software without restriction, including without limitation the rights
wim 0:93ae875cbb7a 8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
wim 0:93ae875cbb7a 9 * copies of the Software, and to permit persons to whom the Software is
wim 0:93ae875cbb7a 10 * furnished to do so, subject to the following conditions:
wim 0:93ae875cbb7a 11 *
wim 0:93ae875cbb7a 12 * The above copyright notice and this permission notice shall be included in
wim 0:93ae875cbb7a 13 * all copies or substantial portions of the Software.
wim 0:93ae875cbb7a 14 *
wim 0:93ae875cbb7a 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
wim 0:93ae875cbb7a 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
wim 0:93ae875cbb7a 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
wim 0:93ae875cbb7a 18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
wim 0:93ae875cbb7a 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
wim 0:93ae875cbb7a 20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
wim 0:93ae875cbb7a 21 * THE SOFTWARE.
wim 0:93ae875cbb7a 22 */
wim 0:93ae875cbb7a 23 #include "CU209SCPB_Config.h"
wim 0:93ae875cbb7a 24
wim 0:93ae875cbb7a 25 #if(CU209SCPB_UDC == 1)
wim 0:93ae875cbb7a 26
wim 0:93ae875cbb7a 27 //User Defined Characters (UDCs) are a 5x7 Matrix pattern that will show on the VFD as
wim 0:93ae875cbb7a 28 // 0 P1 P2 P3 P4 P5
wim 0:93ae875cbb7a 29 // 1 P6 P7 ..... P10
wim 0:93ae875cbb7a 30 // . .............
wim 0:93ae875cbb7a 31 // . .............
wim 0:93ae875cbb7a 32 // . .............
wim 0:93ae875cbb7a 33 // 6 P31 P32 ... P35
wim 0:93ae875cbb7a 34 //
wim 0:93ae875cbb7a 35
wim 0:93ae875cbb7a 36 //UDCs are defined by sending a 5 byte bitpattern to the display.
wim 0:93ae875cbb7a 37 //UDC Command: ESC, 'C', UDC idx
wim 0:93ae875cbb7a 38 //Followed by:
wim 0:93ae875cbb7a 39 //UDC Data (4th byte .. 8th byte)
wim 0:93ae875cbb7a 40 // D7 D6 D5 D4 D3 D2 D1 D0
wim 0:93ae875cbb7a 41 // 0 P8 P7 P6 ...... P3 P2 P1
wim 0:93ae875cbb7a 42 // 1 P16 P15 P14 ........ P10 P9
wim 0:93ae875cbb7a 43 // 2 P24 P23 P22 .......... P17
wim 0:93ae875cbb7a 44 // 3 P32 P31 P30 ............ P25
wim 0:93ae875cbb7a 45 // 4 * * * .... * P35 P34 P33
wim 0:93ae875cbb7a 46 //
wim 0:93ae875cbb7a 47
wim 0:93ae875cbb7a 48 //UDCs are defined by a 5x7 matrix and stored for convenience as 7 bytes with 5 significant bits
wim 0:93ae875cbb7a 49 //The patterns below will show up in mirrored form on the display
wim 0:93ae875cbb7a 50 //
wim 0:93ae875cbb7a 51 // Some sample User Defined Chars 5x7 dots */
wim 0:93ae875cbb7a 52 const char udc_Bat_Hi[] = {0x0E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F}; // Battery Full
wim 0:93ae875cbb7a 53 const char udc_Bat_Ha[] = {0x0E, 0x11, 0x13, 0x17, 0x1F, 0x1F, 0x1F}; // Battery Half
wim 0:93ae875cbb7a 54 const char udc_Bat_Lo[] = {0x0E, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11}; // Battery Low
wim 0:93ae875cbb7a 55 const char udc_checker[] = {0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA};
wim 0:93ae875cbb7a 56
wim 0:93ae875cbb7a 57 //const char udc_PO[] = {0x04, 0x0A, 0x0A, 0x1F, 0x1B, 0x1B, 0x1B}; //Padlock Open
wim 0:93ae875cbb7a 58 //const char udc_PC[] = {0x1C, 0x10, 0x08, 0x1F, 0x1B, 0x1B, 0x1B}; //Padlock Closed
wim 0:93ae875cbb7a 59
wim 0:93ae875cbb7a 60 const char udc_LAR[] = {0x07, 0x03, 0x05, 0x04, 0x04, 0x04, 0x04}; // Left Arrow
wim 0:93ae875cbb7a 61 const char udc_RAR[] = {0x1C, 0x18, 0x14, 0x04, 0x04, 0x04, 0x04}; // Right Arrow
wim 0:93ae875cbb7a 62 #endif