/Designs/Measuring_instruments/GM_counter/SW/HV_source/main.c
34,6 → 34,13
 
#define MAX_OUTPUT 1000
 
/// Linear interpolation parameters
//
 
#define k 0.333961
#define q 206.952
 
 
unsigned int16 setpoint=43;
unsigned int16 adc_value;
int1 output_permit=FALSE;
122,7 → 129,7
if(input(OUTPUT_ENABLE)) output_permit=TRUE;
else output_permit=FALSE;
 
output_voltage = adc_value * 0.316142 + 223.294;
output_voltage = adc_value * k + q;
 
lcd_gotoxy(1,1);
printf(lcd_putc,"%3.0f",output_voltage);
/Designs/Measuring_instruments/GM_counter/SW/HV_source/main.hex
226,11 → 226,11
:1011C000D0218A159F14831686168312861EEA285C
:1011D0002B14EB282B102A08B3002908B2008A111F
:1011E000162A8A157A08C2007908C1007808C0005A
:1011F0007708BF005D30C600DD30C5002130C40077
:1011F0007708BF00F030C600FC30C5002A30C400BC
:101200007D30C3008A1135228A157708B20078082C
:10121000B3007908B4007A08B50083103508B90026
:101220003408B8003308B7003208B6004430BD00B7
:101230004B30BC005F30BB008630BA008A11AA2A4E
:101220003408B8003308B7003208B600B630BD0045
:10123000F330BC004E30BB008630BA008A11AA2AB7
:101240008A157A08B1007908B0007808AF007708ED
:10125000AE000130C000C1008A1191218A15023010
:1012600084003108B5003008B4002F08B3002E0800
267,4 → 267,4
:04400E00F52CFF3F4F
:00000001FF
;PIC16F887
;CRC=DF9D CREATED="28-IX-13 13:53"
;CRC=1231 CREATED="28-IX-13 14:14"