Line 57... |
Line 57... |
57 |
lcd_gotoxy(1,2); |
57 |
lcd_gotoxy(1,2); |
58 |
printf(lcd_putc,"ESC"); |
58 |
printf(lcd_putc,"ESC"); |
59 |
while(input(BUTTON1)) // testuje dokud nekdo nezmackne tlacitlo |
59 |
while(input(BUTTON1)) // testuje dokud nekdo nezmackne tlacitlo |
60 |
{ |
60 |
{ |
61 |
lcd_gotoxy(5,2); |
61 |
lcd_gotoxy(5,2); |
62 |
Output_toggle(PIN_A0); |
- |
|
63 |
delay_ms(100); |
62 |
delay_ms(100); |
64 |
printf(lcd_putc,"%x",input_b()); |
63 |
printf(lcd_putc,"%x ",input_b()); |
65 |
} |
64 |
} |
66 |
} |
65 |
} |
67 |
void send_measuring() |
66 |
void send_measuring() |
68 |
{ |
67 |
{ |
69 |
printf(usb_cdc_putc, "\n\r %5u %5u %5u %5u %5u", run, section[0], section[1], section[2], section[3]); |
68 |
printf(usb_cdc_putc, "\n\r %5lu %5lu %5lu %5lu %5lu", run, section[0], section[1], section[2], section[3]); |
70 |
} //*0.000010667 |
69 |
} //*0.000010667 |
71 |
|
70 |
|
72 |
void main() |
71 |
void main() |
73 |
{ |
72 |
{ |
74 |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
73 |
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
Line 104... |
Line 103... |
104 |
lcd_gotoxy(1,1); |
103 |
lcd_gotoxy(1,1); |
105 |
printf(lcd_putc,"\f PC connected..."); |
104 |
printf(lcd_putc,"\f PC connected..."); |
106 |
beep(10); |
105 |
beep(10); |
107 |
|
106 |
|
108 |
run=0; |
107 |
run=0; |
- |
|
108 |
section[0] = 0; |
- |
|
109 |
section[1] = 0; |
- |
|
110 |
section[2] = 0; |
- |
|
111 |
section[3] = 0; |
- |
|
112 |
|
109 |
while (TRUE) |
113 |
while (TRUE) |
110 |
{ |
114 |
{ |
111 |
run++; |
115 |
run++; |
112 |
printf(lcd_putc,"\f\nSTART"); |
116 |
printf(lcd_putc,"\f\nSTART"); |
113 |
|
117 |
|