/Designs/Measuring_instruments/GM_counter/SW/HV_source/main.c
78,6 → 78,7
void main()
{
unsigned int1 button_press; // semafor pro cteni tlacitek
float output_voltage;
 
setup_adc_ports(sAN0|VSS_VREF);
setup_adc(ADC_CLOCK_DIV_32);
125,7 → 126,9
printf(lcd_putc,"%4lu",adc_value);
lcd_gotoxy(1,2);
 
if(input(OUTPUT_ENABLE))printf(lcd_putc,"Set:%lu "setpoint);
output_voltage = adc_value * 0.316142 + 223.294;
 
if(input(OUTPUT_ENABLE))printf(lcd_putc,"Set:%3.0f "output_voltage);
else printf(lcd_putc,"DISABLED");
 
if(button_press==false ) // tlacitka se ctou znovu pouze pokud v redchozim cyklu nebyla zmacknuta.