The code implement timers to make a clock. The lcd16x2 is used to display the Hour, min and seconds. It also provide alarm capabilities

Committer:
EDISON_NGUNJIRI
Date:
Mon May 16 06:06:11 2022 +0000
Revision:
0:0898e006947b
LCD16X2 in 4bit mode clock

Who changed what in which revision?

UserRevisionLine numberNew contents of line
EDISON_NGUNJIRI 0:0898e006947b 1 /* mbed TextLCD Library, for LCDs based on HD44780 controllers
EDISON_NGUNJIRI 0:0898e006947b 2 * Copyright (c) 2014, WH
EDISON_NGUNJIRI 0:0898e006947b 3 * 2014, v01: WH, Extracted from TextLCD.h as of v14
EDISON_NGUNJIRI 0:0898e006947b 4 * 2015, v02: WH, Added some UDC definitions and commented out several UDCs
EDISON_NGUNJIRI 0:0898e006947b 5 * 2015, v03: WH, Added some UDC definitions
EDISON_NGUNJIRI 0:0898e006947b 6 *
EDISON_NGUNJIRI 0:0898e006947b 7 * Permission is hereby granted, free of charge, to any person obtaining a copy
EDISON_NGUNJIRI 0:0898e006947b 8 * of this software and associated documentation files (the "Software"), to deal
EDISON_NGUNJIRI 0:0898e006947b 9 * in the Software without restriction, including without limitation the rights
EDISON_NGUNJIRI 0:0898e006947b 10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
EDISON_NGUNJIRI 0:0898e006947b 11 * copies of the Software, and to permit persons to whom the Software is
EDISON_NGUNJIRI 0:0898e006947b 12 * furnished to do so, subject to the following conditions:
EDISON_NGUNJIRI 0:0898e006947b 13 *
EDISON_NGUNJIRI 0:0898e006947b 14 * The above copyright notice and this permission notice shall be included in
EDISON_NGUNJIRI 0:0898e006947b 15 * all copies or substantial portions of the Software.
EDISON_NGUNJIRI 0:0898e006947b 16 *
EDISON_NGUNJIRI 0:0898e006947b 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
EDISON_NGUNJIRI 0:0898e006947b 18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
EDISON_NGUNJIRI 0:0898e006947b 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
EDISON_NGUNJIRI 0:0898e006947b 20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
EDISON_NGUNJIRI 0:0898e006947b 21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
EDISON_NGUNJIRI 0:0898e006947b 22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
EDISON_NGUNJIRI 0:0898e006947b 23 * THE SOFTWARE.
EDISON_NGUNJIRI 0:0898e006947b 24 */
EDISON_NGUNJIRI 0:0898e006947b 25 #ifndef MBED_TEXTLCDUDC_H
EDISON_NGUNJIRI 0:0898e006947b 26 #define MBED_TEXTLCDUDC_H
EDISON_NGUNJIRI 0:0898e006947b 27
EDISON_NGUNJIRI 0:0898e006947b 28 #include "TextLCD_Config.h"
EDISON_NGUNJIRI 0:0898e006947b 29
EDISON_NGUNJIRI 0:0898e006947b 30 /** Some sample User Defined Chars 5x7 dots */
EDISON_NGUNJIRI 0:0898e006947b 31 #if(LCD_UDC == 1)
EDISON_NGUNJIRI 0:0898e006947b 32 //extern const char udc_ae[]; //æ
EDISON_NGUNJIRI 0:0898e006947b 33 //extern const char udc_0e[]; //ø
EDISON_NGUNJIRI 0:0898e006947b 34 //extern const char udc_ao[]; //å
EDISON_NGUNJIRI 0:0898e006947b 35 //extern const char udc_AE[]; //Æ
EDISON_NGUNJIRI 0:0898e006947b 36 //extern const char udc_0E[]; //Ø
EDISON_NGUNJIRI 0:0898e006947b 37 //extern const char udc_Ao[]; //Å
EDISON_NGUNJIRI 0:0898e006947b 38 //extern const char udc_PO[]; //Padlock Open
EDISON_NGUNJIRI 0:0898e006947b 39 //extern const char udc_PC[]; //Padlock Closed
EDISON_NGUNJIRI 0:0898e006947b 40
EDISON_NGUNJIRI 0:0898e006947b 41 //extern const char udc_alpha[]; //alpha
EDISON_NGUNJIRI 0:0898e006947b 42 //extern const char udc_ohm[]; //ohm
EDISON_NGUNJIRI 0:0898e006947b 43 //extern const char udc_sigma[]; //sigma
EDISON_NGUNJIRI 0:0898e006947b 44 //extern const char udc_pi[]; //pi
EDISON_NGUNJIRI 0:0898e006947b 45 //extern const char udc_root[]; //root
EDISON_NGUNJIRI 0:0898e006947b 46
EDISON_NGUNJIRI 0:0898e006947b 47 extern const char udc_0[]; // |>
EDISON_NGUNJIRI 0:0898e006947b 48 extern const char udc_1[]; // <|
EDISON_NGUNJIRI 0:0898e006947b 49 extern const char udc_2[]; // |
EDISON_NGUNJIRI 0:0898e006947b 50 extern const char udc_3[]; // ||
EDISON_NGUNJIRI 0:0898e006947b 51 extern const char udc_4[]; // |||
EDISON_NGUNJIRI 0:0898e006947b 52 extern const char udc_5[]; // =
EDISON_NGUNJIRI 0:0898e006947b 53 extern const char udc_6[]; // checkerboard
EDISON_NGUNJIRI 0:0898e006947b 54 extern const char udc_7[]; // \
EDISON_NGUNJIRI 0:0898e006947b 55
EDISON_NGUNJIRI 0:0898e006947b 56 //extern const char udc_degr[]; // Degree symbol
EDISON_NGUNJIRI 0:0898e006947b 57
EDISON_NGUNJIRI 0:0898e006947b 58 //extern const char udc_TM_T[]; // Trademark T
EDISON_NGUNJIRI 0:0898e006947b 59 //extern const char udc_TM_M[]; // Trademark M
EDISON_NGUNJIRI 0:0898e006947b 60
EDISON_NGUNJIRI 0:0898e006947b 61 //extern const char udc_Bat_Hi[]; // Battery Full
EDISON_NGUNJIRI 0:0898e006947b 62 //extern const char udc_Bat_Ha[]; // Battery Half
EDISON_NGUNJIRI 0:0898e006947b 63 //extern const char udc_Bat_Lo[]; // Battery Low
EDISON_NGUNJIRI 0:0898e006947b 64 extern const char udc_Bat_Hi[]; // Battery Full
EDISON_NGUNJIRI 0:0898e006947b 65 extern const char udc_Bat_Ha[]; // Battery Half
EDISON_NGUNJIRI 0:0898e006947b 66 extern const char udc_Bat_Lo[]; // Battery Low
EDISON_NGUNJIRI 0:0898e006947b 67 extern const char udc_AC[]; // AC Power
EDISON_NGUNJIRI 0:0898e006947b 68
EDISON_NGUNJIRI 0:0898e006947b 69 extern const char udc_smiley[]; // Smiley
EDISON_NGUNJIRI 0:0898e006947b 70 //extern const char udc_droopy[]; // Droopey
EDISON_NGUNJIRI 0:0898e006947b 71 //extern const char udc_note[]; // Note
EDISON_NGUNJIRI 0:0898e006947b 72 //extern const char udc_note_off[]; // Note Off
EDISON_NGUNJIRI 0:0898e006947b 73
EDISON_NGUNJIRI 0:0898e006947b 74 //extern const char udc_bar_1[]; // Bar 1
EDISON_NGUNJIRI 0:0898e006947b 75 //extern const char udc_bar_2[]; // Bar 11
EDISON_NGUNJIRI 0:0898e006947b 76 //extern const char udc_bar_3[]; // Bar 111
EDISON_NGUNJIRI 0:0898e006947b 77 //extern const char udc_bar_4[]; // Bar 1111
EDISON_NGUNJIRI 0:0898e006947b 78 //extern const char udc_bar_5[]; // Bar 11111
EDISON_NGUNJIRI 0:0898e006947b 79
EDISON_NGUNJIRI 0:0898e006947b 80 //extern const char udc_ch_1[]; // Hor bars 4
EDISON_NGUNJIRI 0:0898e006947b 81 //extern const char udc_ch_2[]; // Hor bars 4 (inverted)
EDISON_NGUNJIRI 0:0898e006947b 82 //extern const char udc_ch_3[]; // Ver bars 3
EDISON_NGUNJIRI 0:0898e006947b 83 //extern const char udc_ch_4[]; // Ver bars 3 (inverted)
EDISON_NGUNJIRI 0:0898e006947b 84 //extern const char udc_ch_yr[]; // Year (kana)
EDISON_NGUNJIRI 0:0898e006947b 85 //extern const char udc_ch_mo[]; // Month (kana)
EDISON_NGUNJIRI 0:0898e006947b 86 //extern const char udc_ch_dy[]; // Day (kana)
EDISON_NGUNJIRI 0:0898e006947b 87 //extern const char udc_ch_mi[]; // minute (kana)
EDISON_NGUNJIRI 0:0898e006947b 88
EDISON_NGUNJIRI 0:0898e006947b 89 //extern const char udc_bell[];
EDISON_NGUNJIRI 0:0898e006947b 90 //extern const char udc_note[];
EDISON_NGUNJIRI 0:0898e006947b 91 //extern const char udc_clock[];
EDISON_NGUNJIRI 0:0898e006947b 92 //extern const char udc_heart[];
EDISON_NGUNJIRI 0:0898e006947b 93 //extern const char udc_duck[];
EDISON_NGUNJIRI 0:0898e006947b 94 //extern const char udc_check[];
EDISON_NGUNJIRI 0:0898e006947b 95 //extern const char udc_cross[];
EDISON_NGUNJIRI 0:0898e006947b 96 //extern const char udc_retarrow[];
EDISON_NGUNJIRI 0:0898e006947b 97 //extern const char udc_OK[]; // Ok
EDISON_NGUNJIRI 0:0898e006947b 98 //extern const char udc_1_2[]; // 1/2
EDISON_NGUNJIRI 0:0898e006947b 99 //extern const char udc_Euro[]; // Euro symbol
EDISON_NGUNJIRI 0:0898e006947b 100 //extern const char udc_key[]; // Key symbol
EDISON_NGUNJIRI 0:0898e006947b 101
EDISON_NGUNJIRI 0:0898e006947b 102 //extern const char udc_None[];
EDISON_NGUNJIRI 0:0898e006947b 103 //extern const char udc_All[];
EDISON_NGUNJIRI 0:0898e006947b 104 #endif /* LCD_UDC Examples */
EDISON_NGUNJIRI 0:0898e006947b 105
EDISON_NGUNJIRI 0:0898e006947b 106 #endif // MBED_TEXTLCDUDC_H