LTlib LaurTec Library  4.0.3
Open Source C Library for Microchip Microcontrollers based on XC8 Compiler
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
main.c
Go to the documentation of this file.
1 #include <xc.h>
2 
3 #include "LTlib.h"
4 
5 #include "module_IO.h"
6 #include "module_IO.c"
7 
8 #include "module_I2C.h"
9 #include "module_I2C.c"
10 
11 #include "LTlib_delay.h"
12 #include "LTlib_delay.c"
13 
14 #include "DS1337.h"
15 #include "DS1337.c"
16 
17 #include "LCD_44780.h"
18 #include "LCD_44780.c"
19 
20 int main(void) {
21 
23 
24  LCD_initialize(20);
25  RTCC_initialize(100);
26 
27  RTCC_set_years(0x15);
28  RTCC_set_months(0x11);
29  RTCC_set_days(0x22);
30 
31  RTCC_set_hours(0x16);
32  RTCC_set_minutes(0x20);
33  RTCC_set_seconds(0x22);
34 
36 
37  while(1){
38  LCD_home();
39  LCD_write_message("Date : ");
41  LCD_goto_line(2);
42  LCD_write_message("Time : ");
44 
45  delay_ms (100);
46  }
47 }