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 "MCP7940.h"
15 #include "MCP7940.c"
16 
17 #include "MCP2300x.h"
18 #include "MCP2300x.c"
19 
20 #include "LCD_44780_I2C.h"
21 #include "LCD_44780_I2C.c"
22 
23 int main(void) {
24 
26 
27  LCD_initialize(20);
28  RTCC_initialize(400);
29 
30  RTCC_set_years(0x15);
31  RTCC_set_months(0x11);
32  RTCC_set_days(0x22);
33 
34  RTCC_set_hours(0x16);
35  RTCC_set_minutes(0x20);
36  RTCC_set_seconds(0x22);
37 
39 
40  while(1){
41  LCD_home();
42  LCD_write_message("Date : ");
44  LCD_goto_line(2);
45  LCD_write_message("Time : ");
47 
48  delay_ms (100);
49  }
50 }