LTlib LaurTec Library
4.0.3
Open Source C Library for Microchip Microcontrollers based on XC8 Compiler
Main Page
Data Structures
Files
File List
Globals
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 "
PCF8563.h
"
15
#include "
PCF8563.c
"
16
17
#include "
LCD_44780.h
"
18
#include "
LCD_44780.c
"
19
20
int
main
(
void
) {
21
22
IO_set_all_ports_as_inputs
();
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
35
LCD_backlight
(
LCD_TURN_ON_LED
);
36
37
while
(1){
38
LCD_home
();
39
LCD_write_message
(
"Date : "
);
40
LCD_write_string
(
RTCC_get_date
());
41
LCD_goto_line
(2);
42
LCD_write_message
(
"Time : "
);
43
LCD_write_string
(
RTCC_get_time_seconds
());
44
45
delay_ms
(100);
46
}
47
}
LTlib_v_4.0.3
ex
PIC18
PCF8563
01 - PCF8563_Time_and_Date_on_LCD.X
main.c
Generated on Wed Aug 3 2016 19:57:31 for LTlib LaurTec Library by
1.8.3.1