| Line 16... |
Line 16... |
| 16 |
setup_ccp1(CCP_OFF); |
16 |
setup_ccp1(CCP_OFF); |
| 17 |
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
17 |
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
| 18 |
setup_oscillator(OSC_8MHZ); |
18 |
setup_oscillator(OSC_8MHZ); |
| 19 |
|
19 |
|
| 20 |
output_high(T1); |
20 |
output_high(T1); |
| 21 |
output_high(T2); |
21 |
output_low(T2); |
| 22 |
delay_ms(1000); |
22 |
delay_ms(1000); |
| 23 |
|
23 |
|
| 24 |
while(true) |
24 |
while(true) |
| 25 |
{ |
25 |
{ |
| 26 |
output_low(T1); // charge |
26 |
output_low(T1); // charge |
| 27 |
delay_ms(1000); |
27 |
delay_ms(2000); |
| 28 |
output_high(T1); // charge off |
28 |
output_high(T1); // charge off |
| 29 |
delay_ms(300); |
29 |
delay_ms(300); |
| 30 |
output_low(T2); // discharge |
30 |
output_high(T2); // discharge |
| 31 |
delay_ms(200); |
31 |
delay_ms(200); |
| 32 |
output_high(T2); // discharge off |
32 |
output_low(T2); // discharge off |
| 33 |
delay_ms(300); |
33 |
delay_ms(300); |
| 34 |
} |
34 |
} |
| 35 |
|
35 |
|
| 36 |
} |
36 |
} |