45 #include <avr/interrupt.h>
46 #include <avr/pgmspace.h>
55 #define LCD_SYMBOL_FISRT 0
56 #define LCD_SYMBOL_COUNT 34
59 #define LCD_SYMBOL_ARR_UP LCD_SYMBOL_ENV_OP
60 #define LCD_SYMBOL_ARR_DN LCD_SYMBOL_ENV_CL
62 #define LCD_CLCK_FRQ 32768
73 #define NUM_LCD_SYMBOL_A 0x01
74 #define NUM_LCD_SYMBOL_B 0x02
75 #define NUM_LCD_SYMBOL_C 0x04
76 #define NUM_LCD_SYMBOL_D 0x08
77 #define NUM_LCD_SYMBOL_E 0x10
78 #define NUM_LCD_SYMBOL_F 0x20
79 #define NUM_LCD_SYMBOL_G 0x40
84 #define LCD_SEV_SEG_INDEX_0 (0)
85 #define LCD_SEV_SEG_INDEX_1 (1)
86 #define LCD_SEV_SEG_INDEX_2 (2)
87 #define LCD_SEV_SEG_INDEX_3 (3)
88 #define LCD_SEV_SEG_INDEX_4 (4)
89 #define LCD_SEV_SEG_INDEX_5 (5)
90 #define LCD_SEV_SEG_INDEX_6 (6)
91 #define LCD_SEV_SEG_INDEX_7 (7)
92 #define LCD_SEV_SEG_INDEX_8 (8)
93 #define LCD_SEV_SEG_INDEX_9 (9)
94 #define LCD_SEV_SEG_INDEX_A (10)
95 #define LCD_SEV_SEG_INDEX_B (11)
96 #define LCD_SEV_SEG_INDEX_C (12)
97 #define LCD_SEV_SEG_INDEX_D (13)
98 #define LCD_SEV_SEG_INDEX_E (14)
99 #define LCD_SEV_SEG_INDEX_F (15)
100 #define LCD_SEV_SEG_INDEX_SPACE (16)
101 #define LCD_SEV_SEG_INDEX_MINUS (17)
104 #define lcd_symbol_set_all() lcd_symbol_set_group(0, sizeof(lcd_symbol_chart))
105 #define lcd_symbol_clr_all() lcd_symbol_clr_group(0, sizeof(lcd_symbol_chart))
108 LCD_NUM_PADDING_ZERO,
109 LCD_NUM_PADDING_SPACE
115 LCD_SYMBOL_RAVEN = (7<<5) | 3,
118 LCD_SYMBOL_BELL = (2<<5) | 17,
119 LCD_SYMBOL_TONE = (6<<5) | 17,
120 LCD_SYMBOL_MIC = (3<<5) | 3,
121 LCD_SYMBOL_SPEAKER = (2<<5) | 18,
124 LCD_SYMBOL_KEY = (3<<5) | 2,
125 LCD_SYMBOL_ATT = (7<<5) | 2,
128 LCD_SYMBOL_SUN = (6<<5) | 13,
129 LCD_SYMBOL_MOON = (6<<5) | 3,
130 LCD_SYMBOL_AM = (2<<5) | 15,
131 LCD_SYMBOL_PM = (6<<5) | 15,
134 LCD_SYMBOL_RX = (6<<5) | 18,
135 LCD_SYMBOL_TX = (5<<5) | 13,
136 LCD_SYMBOL_IP = (7<<5) | 13,
137 LCD_SYMBOL_PAN = (7<<5) | 18,
138 LCD_SYMBOL_ZLINK = (5<<5) | 8,
139 LCD_SYMBOL_ZIGBEE = (5<<5) | 3,
142 LCD_SYMBOL_ANT_FOOT= (5<<5) | 18,
143 LCD_SYMBOL_ANT_SIG1= (3<<5) | 0,
144 LCD_SYMBOL_ANT_SIG2= (7<<5) | 0,
145 LCD_SYMBOL_ANT_SIG3= (3<<5) | 1,
146 LCD_SYMBOL_ANT_DIS = (7<<5) | 1,
149 LCD_SYMBOL_BAT_CONT= (4<<5) | 18,
150 LCD_SYMBOL_BAT_CAP1= (4<<5) | 3,
151 LCD_SYMBOL_BAT_CAP2= (4<<5) | 8,
152 LCD_SYMBOL_BAT_CAP3= (4<<5) | 13,
155 LCD_SYMBOL_ENV_OP = (6<<5) | 8,
156 LCD_SYMBOL_ENV_CL = (0<<5) | 4,
157 LCD_SYMBOL_ENV_MAIN= (2<<5) | 4,
160 LCD_SYMBOL_C = (6<<5) | 16,
161 LCD_SYMBOL_F = (2<<5) | 16,
164 LCD_SYMBOL_MINUS = (7<<5) | 8,
165 LCD_SYMBOL_DOT = (4<<5) | 4,
166 LCD_SYMBOL_COL = (6<<5) | 4,
170 LCD_WAVE_DEFAULT = 0,
171 LCD_WAVE_LOW_POWER = 1
180 LCD_BLANKING_OFF = 0,
185 LCD_CLOCK_SYSTEM = 0,
197 LCD_PRESCL_128 = 0x2,
198 LCD_PRESCL_256 = 0x3,
199 LCD_PRESCL_512 = 0x4,
200 LCD_PRESCL_1024 = 0x5,
201 LCD_PRESCL_2048 = 0x6,
202 LCD_PRESCL_4096 = 0x7,
224 LCD_DRIVE_1150 = 0xC,
225 LCD_DRIVE_HALF = 0xE,
230 LCD_CONTRAST_2_60 = 0x0,
231 LCD_CONTRAST_2_65 = 0x1,
232 LCD_CONTRAST_2_70 = 0x2,
233 LCD_CONTRAST_2_75 = 0x3,
234 LCD_CONTRAST_2_80 = 0x4,
235 LCD_CONTRAST_2_85 = 0x5,
236 LCD_CONTRAST_2_90 = 0x6,
237 LCD_CONTRAST_2_95 = 0x7,
238 LCD_CONTRAST_3_00 = 0x8,
239 LCD_CONTRAST_3_05 = 0x9,
240 LCD_CONTRAST_3_10 = 0xA,
241 LCD_CONTRAST_3_15 = 0xB,
242 LCD_CONTRAST_3_20 = 0xC,
243 LCD_CONTRAST_3_25 = 0xD,
244 LCD_CONTRAST_3_30 = 0xE,
245 LCD_CONTRAST_3_35 = 0xF
251 unsigned int blanking: 1;
253 unsigned int buffer : 1;
255 unsigned int wave : 1;
263 unsigned int bias : 1;
264 unsigned int clock : 1;
270 unsigned int div : 3;
272 unsigned int prescl : 3;
279 unsigned int contrast: 4;
280 unsigned int drive : 4;
318 uint8_t
itobcd(uint8_t inNumber);
332 int lcd_puta(
size_t length,
const uint8_t *s);