Rev Author Line No. Line
3352 kaklik 1 #include "main.h"
2  
3 #define LCD_ENABLE_PIN PIN_E0 ////
4 #define LCD_RS_PIN PIN_E1 ////
5 #define LCD_RW_PIN PIN_E2 ////
6 #define LCD_DATA4 PIN_D4 ////
7 #define LCD_DATA5 PIN_D5 ////
8 #define LCD_DATA6 PIN_D6 ////
9 #define LCD_DATA7 PIN_D7
10 #include <lcd.c>
11  
12 void main()
13 {
14 int16 i=0;
15  
16 setup_adc_ports(NO_ANALOGS|VSS_VDD);
17 setup_adc(ADC_CLOCK_DIV_2);
18 setup_spi(SPI_SS_DISABLED);
19 setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
20 setup_timer_1(T1_DISABLED);
21 setup_timer_2(T2_DISABLED,0,1);
22 setup_ccp1(CCP_OFF);
23 setup_comparator(NC_NC_NC_NC); // This device COMP currently not supported by the PICWizard
24 setup_oscillator(OSC_8MHZ);
25  
26 lcd_init();
27 lcd_putc("(c) Kaklik 2013");
28 lcd_gotoxy(3,2);
29 lcd_putc("www.mlab.cz");
30 Delay_ms(2000);
31 lcd_init();
32  
33 while (TRUE)
34 {
35 lcd_gotoxy(1,1);
36  
37 printf(lcd_putc,"LCD test");
38 lcd_gotoxy(1,2);
39 printf(lcd_putc,"%c %x ",i,i);
40 i++;
41  
42 Delay_ms(500);
43 }
44  
45 }