--- trunk/PIC/Torbens/main.c 2007/05/25 08:34:08 100 +++ trunk/PIC/Torbens/main.c 2007/05/25 14:20:54 101 @@ -1,13 +1,24 @@ #include #include + #include "delay.h" -#include "lcd.h" #include "myi2c.h" #include "barcode.h" #include "globals.h" #include "keyboard.h" + + +#define USE_EXTERNAL_LCD + +#ifdef USE_EXTERNAL_LCD +#include "mylcd.h" +#else +#include "lcd.h" +#endif + + /* void i2c_init(void) { @@ -29,15 +40,29 @@ */ + + + void main(void) { char key, key2; char buffer[5]; int i; - lcd_init(0); + char x = 0; + char y = 'A'; + TRISB0= 0; + InitI2C(); barcode_init(); +#ifdef USE_EXTERNAL_LCD + mylcd_init(); +#else + lcd_init(0); +#endif + + + while (1) {/* if (barcode_is_ready()) @@ -77,9 +102,23 @@ */ key = keyboard_read_safe(); + key = 'a'; //debug if (key) + { +#ifdef USE_EXTERNAL_LCD + mylcd_putch(key); +#else lcd_putch(key); +#endif + } + DelayMs(30); + + x++; + RB0 = x; + + } } +