Lightweight proportional text library for C12832 LCD. Easy to modify, fast, robust and compact. Nice font, good for text driven menus, messages, etc. Fell free to use and modify in any projects.

Dependents:   app-board-lcd128

Documentation will be here later.

Usage sample:

Import programapp-board-lcd128

Sample usage of lightweight C12832 LCD library

Committer:
medvdv
Date:
Tue Oct 07 20:50:41 2014 +0000
Revision:
6:5cd32671a837
Parent:
5:ff31feb7d966
Experimental menu driven interface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
medvdv 0:6ac8f630d9a0 1 //
medvdv 0:6ac8f630d9a0 2 // MBED Application Board
medvdv 0:6ac8f630d9a0 3 // Lightweight C12832 LCD library
medvdv 0:6ac8f630d9a0 4 // 2014, Alexander Medvedev, @medvdv
medvdv 0:6ac8f630d9a0 5 //
medvdv 0:6ac8f630d9a0 6
medvdv 0:6ac8f630d9a0 7 //
medvdv 0:6ac8f630d9a0 8 // Nice proportional font with 8px height
medvdv 0:6ac8f630d9a0 9 //
medvdv 0:6ac8f630d9a0 10
medvdv 5:ff31feb7d966 11 const unsigned char lcd_font8p_widths[] = {
medvdv 0:6ac8f630d9a0 12 2, 1, 3, 5, 5, 5, 5, 1, 2, 2, 5, 5, 4,
medvdv 0:6ac8f630d9a0 13 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 6, 5, 6, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 3,
medvdv 0:6ac8f630d9a0 14 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4,
medvdv 5:ff31feb7d966 15 1, 3, 4, 1, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 4, 4, 4, 2, 4, 5, 4,
medvdv 6:5cd32671a837 16 5, 5, 5, 5, 1, 3, 3, 5, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5
medvdv 0:6ac8f630d9a0 17 };
medvdv 0:6ac8f630d9a0 18
medvdv 5:ff31feb7d966 19 const unsigned char * lcd_font8p[] = {
medvdv 5:ff31feb7d966 20 (const unsigned char[]){ 0x00, 0x00 },
medvdv 5:ff31feb7d966 21 (const unsigned char[]){ 0x2F },
medvdv 5:ff31feb7d966 22 (const unsigned char[]){ 0x03, 0x00, 0x03 },
medvdv 5:ff31feb7d966 23 (const unsigned char[]){ 0x14, 0x3E, 0x14, 0x3E, 0x14 },
medvdv 5:ff31feb7d966 24 (const unsigned char[]){ 0x24, 0x6A, 0x3E, 0x2B, 0x12 },
medvdv 5:ff31feb7d966 25 (const unsigned char[]){ 0x22, 0x10, 0x08, 0x04, 0x22 },
medvdv 5:ff31feb7d966 26 (const unsigned char[]){ 0x14, 0x2A, 0x2A, 0x14, 0x20 },
medvdv 5:ff31feb7d966 27 (const unsigned char[]){ 0x03 },
medvdv 5:ff31feb7d966 28 (const unsigned char[]){ 0x1E, 0x21 },
medvdv 5:ff31feb7d966 29 (const unsigned char[]){ 0x21, 0x1E },
medvdv 5:ff31feb7d966 30 (const unsigned char[]){ 0x14, 0x08, 0x3E, 0x08, 0x14 },
medvdv 5:ff31feb7d966 31 (const unsigned char[]){ 0x08, 0x08, 0x3E, 0x08, 0x08 },
medvdv 5:ff31feb7d966 32 (const unsigned char[]){ 0x00, 0x80, 0x70, 0x30 },
medvdv 5:ff31feb7d966 33 (const unsigned char[]){ 0x08, 0x08, 0x08, 0x08, 0x08 },
medvdv 5:ff31feb7d966 34 (const unsigned char[]){ 0x00, 0x00, 0x30, 0x30, 0x00 },
medvdv 5:ff31feb7d966 35 (const unsigned char[]){ 0x20, 0x10, 0x08, 0x04, 0x02 },
medvdv 5:ff31feb7d966 36 (const unsigned char[]){ 0x1E, 0x31, 0x2D, 0x23, 0x1E },
medvdv 5:ff31feb7d966 37 (const unsigned char[]){ 0x00, 0x00, 0x02, 0x3F, 0x00 },
medvdv 5:ff31feb7d966 38 (const unsigned char[]){ 0x22, 0x31, 0x29, 0x25, 0x22 },
medvdv 5:ff31feb7d966 39 (const unsigned char[]){ 0x12, 0x21, 0x25, 0x25, 0x1A },
medvdv 5:ff31feb7d966 40 (const unsigned char[]){ 0x18, 0x14, 0x12, 0x3F, 0x10 },
medvdv 5:ff31feb7d966 41 (const unsigned char[]){ 0x17, 0x25, 0x25, 0x25, 0x19 },
medvdv 5:ff31feb7d966 42 (const unsigned char[]){ 0x1E, 0x25, 0x25, 0x25, 0x18 },
medvdv 5:ff31feb7d966 43 (const unsigned char[]){ 0x01, 0x01, 0x39, 0x05, 0x03 },
medvdv 5:ff31feb7d966 44 (const unsigned char[]){ 0x1A, 0x25, 0x25, 0x25, 0x1A },
medvdv 5:ff31feb7d966 45 (const unsigned char[]){ 0x06, 0x29, 0x29, 0x29, 0x1E },
medvdv 5:ff31feb7d966 46 (const unsigned char[]){ 0x00, 0x00, 0x36, 0x36 },
medvdv 5:ff31feb7d966 47 (const unsigned char[]){ 0x00, 0x80, 0x76, 0x36 },
medvdv 5:ff31feb7d966 48 (const unsigned char[]){ 0x08, 0x08, 0x14, 0x14, 0x22, 0x22 },
medvdv 5:ff31feb7d966 49 (const unsigned char[]){ 0x14, 0x14, 0x14, 0x14, 0x14 },
medvdv 5:ff31feb7d966 50 (const unsigned char[]){ 0x22, 0x22, 0x14, 0x14, 0x08, 0x08 },
medvdv 5:ff31feb7d966 51 (const unsigned char[]){ 0x02, 0x01, 0x29, 0x05, 0x02 },
medvdv 5:ff31feb7d966 52 (const unsigned char[]){ 0x3E, 0x41, 0x5D, 0x55, 0x5E, 0x20 },
medvdv 5:ff31feb7d966 53 (const unsigned char[]){ 0x3E, 0x09, 0x09, 0x09, 0x3E },
medvdv 5:ff31feb7d966 54 (const unsigned char[]){ 0x3F, 0x25, 0x25, 0x25, 0x1A },
medvdv 5:ff31feb7d966 55 (const unsigned char[]){ 0x1E, 0x21, 0x21, 0x21, 0x12 },
medvdv 5:ff31feb7d966 56 (const unsigned char[]){ 0x3F, 0x21, 0x21, 0x22, 0x1C },
medvdv 5:ff31feb7d966 57 (const unsigned char[]){ 0x3F, 0x25, 0x25, 0x25, 0x21 },
medvdv 5:ff31feb7d966 58 (const unsigned char[]){ 0x3F, 0x05, 0x05, 0x05, 0x01 },
medvdv 5:ff31feb7d966 59 (const unsigned char[]){ 0x1E, 0x21, 0x21, 0x29, 0x1A },
medvdv 5:ff31feb7d966 60 (const unsigned char[]){ 0x3F, 0x04, 0x04, 0x04, 0x3F },
medvdv 5:ff31feb7d966 61 (const unsigned char[]){ 0x21, 0x3F, 0x21 },
medvdv 5:ff31feb7d966 62 (const unsigned char[]){ 0x18, 0x20, 0x21, 0x1F, 0x01 },
medvdv 5:ff31feb7d966 63 (const unsigned char[]){ 0x3F, 0x04, 0x04, 0x0A, 0x31 },
medvdv 5:ff31feb7d966 64 (const unsigned char[]){ 0x3F, 0x20, 0x20, 0x20, 0x20 },
medvdv 5:ff31feb7d966 65 (const unsigned char[]){ 0x3F, 0x02, 0x04, 0x02, 0x3F },
medvdv 5:ff31feb7d966 66 (const unsigned char[]){ 0x3F, 0x02, 0x04, 0x08, 0x3F },
medvdv 5:ff31feb7d966 67 (const unsigned char[]){ 0x1E, 0x21, 0x21, 0x21, 0x1E },
medvdv 5:ff31feb7d966 68 (const unsigned char[]){ 0x3F, 0x09, 0x09, 0x09, 0x06 },
medvdv 5:ff31feb7d966 69 (const unsigned char[]){ 0x1E, 0x21, 0x29, 0x31, 0x3E },
medvdv 5:ff31feb7d966 70 (const unsigned char[]){ 0x3F, 0x09, 0x09, 0x19, 0x26 },
medvdv 5:ff31feb7d966 71 (const unsigned char[]){ 0x12, 0x25, 0x25, 0x25, 0x1A },
medvdv 5:ff31feb7d966 72 (const unsigned char[]){ 0x01, 0x01, 0x3F, 0x01, 0x01 },
medvdv 5:ff31feb7d966 73 (const unsigned char[]){ 0x1F, 0x20, 0x20, 0x20, 0x1F },
medvdv 5:ff31feb7d966 74 (const unsigned char[]){ 0x03, 0x0C, 0x30, 0x0C, 0x03 },
medvdv 5:ff31feb7d966 75 (const unsigned char[]){ 0x1F, 0x20, 0x18, 0x20, 0x1F },
medvdv 5:ff31feb7d966 76 (const unsigned char[]){ 0x21, 0x12, 0x0C, 0x12, 0x21 },
medvdv 5:ff31feb7d966 77 (const unsigned char[]){ 0x03, 0x04, 0x38, 0x04, 0x03 },
medvdv 5:ff31feb7d966 78 (const unsigned char[]){ 0x31, 0x29, 0x25, 0x23, 0x21 },
medvdv 5:ff31feb7d966 79 (const unsigned char[]){ 0x00, 0x3F, 0x21, 0x21 },
medvdv 5:ff31feb7d966 80 (const unsigned char[]){ 0x02, 0x04, 0x08, 0x10, 0x20 },
medvdv 5:ff31feb7d966 81 (const unsigned char[]){ 0x00, 0x00, 0x21, 0x21, 0x3F },
medvdv 5:ff31feb7d966 82 (const unsigned char[]){ 0x04, 0x02, 0x01, 0x02, 0x04 },
medvdv 5:ff31feb7d966 83 (const unsigned char[]){ 0x20, 0x20, 0x20, 0x20, 0x20 },
medvdv 5:ff31feb7d966 84 (const unsigned char[]){ 0x00, 0x01, 0x03, 0x04 },
medvdv 5:ff31feb7d966 85 (const unsigned char[]){ 0x10, 0x2A, 0x2A, 0x3C },
medvdv 5:ff31feb7d966 86 (const unsigned char[]){ 0x3F, 0x24, 0x22, 0x1C },
medvdv 5:ff31feb7d966 87 (const unsigned char[]){ 0x1C, 0x22, 0x22, 0x14 },
medvdv 5:ff31feb7d966 88 (const unsigned char[]){ 0x1C, 0x22, 0x24, 0x3F },
medvdv 5:ff31feb7d966 89 (const unsigned char[]){ 0x1C, 0x2A, 0x2A, 0x2C },
medvdv 5:ff31feb7d966 90 (const unsigned char[]){ 0x3E, 0x09, 0x01, 0x02 },
medvdv 5:ff31feb7d966 91 (const unsigned char[]){ 0x0C, 0x52, 0x4A, 0x3C },
medvdv 5:ff31feb7d966 92 (const unsigned char[]){ 0x3F, 0x04, 0x02, 0x3C },
medvdv 5:ff31feb7d966 93 (const unsigned char[]){ 0x3D },
medvdv 5:ff31feb7d966 94 (const unsigned char[]){ 0x40, 0x40, 0x3D },
medvdv 5:ff31feb7d966 95 (const unsigned char[]){ 0x3F, 0x08, 0x0C, 0x32 },
medvdv 5:ff31feb7d966 96 (const unsigned char[]){ 0x3F },
medvdv 5:ff31feb7d966 97 (const unsigned char[]){ 0x3C, 0x02, 0x3C, 0x02, 0x3C },
medvdv 5:ff31feb7d966 98 (const unsigned char[]){ 0x3C, 0x02, 0x02, 0x3C },
medvdv 5:ff31feb7d966 99 (const unsigned char[]){ 0x1C, 0x22, 0x22, 0x1C },
medvdv 5:ff31feb7d966 100 (const unsigned char[]){ 0x7E, 0x22, 0x22, 0x1C },
medvdv 5:ff31feb7d966 101 (const unsigned char[]){ 0x1C, 0x22, 0x22, 0x7E },
medvdv 5:ff31feb7d966 102 (const unsigned char[]){ 0x02, 0x3C, 0x02, 0x02 },
medvdv 5:ff31feb7d966 103 (const unsigned char[]){ 0x24, 0x2A, 0x2A, 0x12 },
medvdv 5:ff31feb7d966 104 (const unsigned char[]){ 0x02, 0x1F, 0x22, 0x22 },
medvdv 5:ff31feb7d966 105 (const unsigned char[]){ 0x1E, 0x20, 0x20, 0x3E },
medvdv 5:ff31feb7d966 106 (const unsigned char[]){ 0x06, 0x18, 0x20, 0x3C, 0x02 },
medvdv 5:ff31feb7d966 107 (const unsigned char[]){ 0x1E, 0x20, 0x1C, 0x20, 0x1E },
medvdv 5:ff31feb7d966 108 (const unsigned char[]){ 0x22, 0x14, 0x08, 0x14, 0x22 },
medvdv 5:ff31feb7d966 109 (const unsigned char[]){ 0x0E, 0x50, 0x50, 0x3E },
medvdv 5:ff31feb7d966 110 (const unsigned char[]){ 0x22, 0x32, 0x2A, 0x26 },
medvdv 5:ff31feb7d966 111 (const unsigned char[]){ 0x00, 0x08, 0x36, 0x41 },
medvdv 5:ff31feb7d966 112 (const unsigned char[]){ 0x00, 0x7F },
medvdv 5:ff31feb7d966 113 (const unsigned char[]){ 0x00, 0x41, 0x36, 0x08 },
medvdv 5:ff31feb7d966 114 (const unsigned char[]){ 0x08, 0x04, 0x08, 0x10, 0x08 },
medvdv 6:5cd32671a837 115 (const unsigned char[]){ 0x2A, 0x55, 0x2A, 0x55 }, // 127
medvdv 6:5cd32671a837 116 (const unsigned char[]){ 0x1c, 0x22, 0x22, 0x22, 0x1c }, // 128 Radio off
medvdv 6:5cd32671a837 117 (const unsigned char[]){ 0x1c, 0x3e, 0x3e, 0x3e, 0x1c }, // 129 Radio on
medvdv 6:5cd32671a837 118 (const unsigned char[]){ 0x3e, 0x22, 0x22, 0x22, 0x3e }, // 130 Checkbox off
medvdv 6:5cd32671a837 119 (const unsigned char[]){ 0x3e, 0x3e, 0x3e, 0x3e, 0x3e }, // 131 Checkbox on
medvdv 6:5cd32671a837 120 (const unsigned char[]){ 0x00 }, // 132 Short space
medvdv 6:5cd32671a837 121 (const unsigned char[]){ 0x3e, 0x1c, 0x08 }, // 133 Play
medvdv 6:5cd32671a837 122 (const unsigned char[]){ 0x3e, 0x00, 0x3e }, // 134 Pause
medvdv 6:5cd32671a837 123 (const unsigned char[]){ 0x3e, 0x1c, 0x3e, 0x1c, 0x08 }, // 135 Forward
medvdv 6:5cd32671a837 124 (const unsigned char[]){ 0x08, 0x1c, 0x3e, 0x1c, 0x3e }, // 136 Reverse
medvdv 6:5cd32671a837 125 (const unsigned char[]){ 0x3e, 0x08, 0x1c, 0x3e, }, // 137 Begin
medvdv 6:5cd32671a837 126 (const unsigned char[]){ 0x3e, 0x1c, 0x08, 0x3e, }, // 138 End
medvdv 6:5cd32671a837 127 (const unsigned char[]){ 0x3e, 0x00, 0x3e, 0x1c, 0x08 }, // 139 Play+Pause
medvdv 6:5cd32671a837 128 (const unsigned char[]){ 0x1c, 0x22, 0x2e, 0x22, 0x1c }, // 140 Clock (0)
medvdv 6:5cd32671a837 129 (const unsigned char[]){ 0x1c, 0x22, 0x2a, 0x26, 0x1c }, // 141 Clock (1)
medvdv 6:5cd32671a837 130 (const unsigned char[]){ 0x1c, 0x22, 0x2a, 0x2a, 0x1c }, // 142 Clock (2)
medvdv 6:5cd32671a837 131 (const unsigned char[]){ 0x1c, 0x22, 0x2a, 0x32, 0x1c }, // 143 Clock (3)
medvdv 6:5cd32671a837 132 (const unsigned char[]){ 0x1c, 0x22, 0x3a, 0x22, 0x1c }, // 144 Clock (4)
medvdv 6:5cd32671a837 133 (const unsigned char[]){ 0x1c, 0x32, 0x2a, 0x22, 0x1c }, // 145 Clock (5)
medvdv 6:5cd32671a837 134 (const unsigned char[]){ 0x1c, 0x2a, 0x2a, 0x22, 0x1c }, // 146 Clock (6)
medvdv 6:5cd32671a837 135 (const unsigned char[]){ 0x1c, 0x26, 0x2a, 0x22, 0x1c }, // 147 Clock (7)
medvdv 0:6ac8f630d9a0 136 };
medvdv 0:6ac8f630d9a0 137