Parent Directory | Revision Log | Patch
revision 100 by torben, Mon May 7 19:42:43 2007 UTC | revision 101 by torben, Fri May 25 14:20:54 2007 UTC | |
---|---|---|
# | Line 1 | Line 1 |
1 | ||
2 | #include <pic18.h> | #include <pic18.h> |
3 | #include <stdio.h> | #include <stdio.h> |
4 | ||
5 | #include "delay.h" | #include "delay.h" |
#include "lcd.h" | ||
6 | #include "myi2c.h" | #include "myi2c.h" |
7 | #include "barcode.h" | #include "barcode.h" |
8 | #include "globals.h" | #include "globals.h" |
9 | #include "keyboard.h" | #include "keyboard.h" |
10 | ||
11 | ||
12 | ||
13 | #define USE_EXTERNAL_LCD | |
14 | ||
15 | #ifdef USE_EXTERNAL_LCD | |
16 | #include "mylcd.h" | |
17 | #else | |
18 | #include "lcd.h" | |
19 | #endif | |
20 | ||
21 | ||
22 | /* | /* |
23 | void i2c_init(void) | void i2c_init(void) |
24 | { | { |
# | Line 29 void i2c_init(void) | Line 40 void i2c_init(void) |
40 | */ | */ |
41 | ||
42 | ||
43 | ||
44 | ||
45 | ||
46 | void main(void) | void main(void) |
47 | { | { |
48 | char key, key2; | char key, key2; |
49 | char buffer[5]; | char buffer[5]; |
50 | int i; | int i; |
51 | lcd_init(0); | char x = 0; |
52 | char y = 'A'; | |
53 | TRISB0= 0; | |
54 | ||
55 | InitI2C(); | InitI2C(); |
56 | barcode_init(); | barcode_init(); |
57 | ||
58 | #ifdef USE_EXTERNAL_LCD | |
59 | mylcd_init(); | |
60 | #else | |
61 | lcd_init(0); | |
62 | #endif | |
63 | ||
64 | ||
65 | ||
66 | while (1) | while (1) |
67 | {/* | {/* |
68 | if (barcode_is_ready()) | if (barcode_is_ready()) |
# | Line 77 void main(void) | Line 102 void main(void) |
102 | */ | */ |
103 | ||
104 | key = keyboard_read_safe(); | key = keyboard_read_safe(); |
105 | key = 'a'; //debug | |
106 | if (key) | if (key) |
107 | { | |
108 | #ifdef USE_EXTERNAL_LCD | |
109 | mylcd_putch(key); | |
110 | #else | |
111 | lcd_putch(key); | lcd_putch(key); |
112 | #endif | |
113 | } | |
114 | ||
115 | ||
116 | DelayMs(30); | DelayMs(30); |
117 | ||
118 | x++; | |
119 | RB0 = x; | |
120 | ||
121 | ||
122 | } | } |
123 | } | } |
124 |
|
ViewVC Help | |
Powered by ViewVC 1.1.20 |