Line 59... |
Line 59... |
59 |
else |
59 |
else |
60 |
{ |
60 |
{ |
61 |
set_pwm2_duty((int16)MAXDUTY); |
61 |
set_pwm2_duty((int16)MAXDUTY); |
62 |
output_high(LED2); |
62 |
output_high(LED2); |
63 |
} |
63 |
} |
- |
|
64 |
read_adc(ADC_START_ONLY); |
64 |
} |
65 |
} |
65 |
|
66 |
|
66 |
void sound_beep( unsigned int lenght, int16 frequency) |
67 |
void sound_beep( unsigned int lenght, int16 frequency) |
67 |
{ |
68 |
{ |
68 |
unsigned int i; |
69 |
unsigned int i; |
Line 114... |
Line 115... |
114 |
lcd_putc("\f"); |
115 |
lcd_putc("\f"); |
115 |
|
116 |
|
116 |
|
117 |
|
117 |
while(true) |
118 |
while(true) |
118 |
{ |
119 |
{ |
119 |
read_adc(ADC_START_ONLY); |
- |
|
120 |
|
- |
|
121 |
if(input(OUTPUT_ENABLE)) output_permit=TRUE; |
120 |
if(input(OUTPUT_ENABLE)) output_permit=TRUE; |
122 |
else output_permit=FALSE; |
121 |
else output_permit=FALSE; |
123 |
|
122 |
|
124 |
lcd_gotoxy(1,1); |
123 |
lcd_gotoxy(1,1); |
125 |
printf(lcd_putc,"%4lu",adc_value); |
124 |
printf(lcd_putc,"%4lu",adc_value); |