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 "LTlib_delay.h"
9 #include "LTlib_delay.c"
10 
11 #include "GLCD_KS0108B.h"
12 #include "GLCD_KS0108B.c"
13 
14 int main(void) {
15 
16  unsigned int i = 0;
17 
19 
20  GLCD_initialize ();
21 
23 
24  while (1) {
25 
27 
28  GLCD_draw_window ( 0, 0, 127, 63, GLCD_FILLING_BLACK);
29  GLCD_draw_window ( 2, 2, 123, 59, GLCD_FILLING_BLACK);
30 
31  delay_ms (2000);
33 
34  GLCD_write_message (25,28,"Loading... %");
35 
36  for (i = 0; i < 100 ; i+= 5) {
37  GLCD_write_integer (90,28, i, 2);
38  delay_ms (100);
39  }
40 
42  GLCD_write_message (30,28,"Hello World");
43  delay_ms (300);
45  delay_ms (300);
47  delay_ms (2000);
48 
49  }
50  while(1);
51 }