Line 119... |
Line 119... |
119 |
|
119 |
|
120 |
while(true) |
120 |
while(true) |
121 |
{ |
121 |
{ |
122 |
if(input(OUTPUT_ENABLE)) output_permit=TRUE; |
122 |
if(input(OUTPUT_ENABLE)) output_permit=TRUE; |
123 |
else output_permit=FALSE; |
123 |
else output_permit=FALSE; |
124 |
|
- |
|
125 |
lcd_gotoxy(1,1); |
- |
|
126 |
printf(lcd_putc,"%4lu",adc_value); |
- |
|
127 |
lcd_gotoxy(1,2); |
- |
|
128 |
|
124 |
|
129 |
output_voltage = adc_value * 0.316142 + 223.294; |
125 |
output_voltage = adc_value * 0.316142 + 223.294; |
130 |
|
126 |
|
- |
|
127 |
lcd_gotoxy(1,1); |
- |
|
128 |
printf(lcd_putc,"%3.0f",output_voltage); |
- |
|
129 |
lcd_gotoxy(1,2); |
- |
|
130 |
|
131 |
if(input(OUTPUT_ENABLE))printf(lcd_putc,"Set:%3.0f "output_voltage); |
131 |
if(input(OUTPUT_ENABLE))printf(lcd_putc,"Set:%lu "setpoint); |
132 |
else printf(lcd_putc,"DISABLED"); |
132 |
else printf(lcd_putc,"DISABLED"); |
133 |
|
133 |
|
134 |
if(button_press==false ) // tlacitka se ctou znovu pouze pokud v redchozim cyklu nebyla zmacknuta. |
134 |
if(button_press==false ) // tlacitka se ctou znovu pouze pokud v redchozim cyklu nebyla zmacknuta. |
135 |
{ |
135 |
{ |
136 |
if(!input(S1)) |
136 |
if(!input(S1)) |