/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.
/Designs/Measuring_instruments/GM_counter/SW/HV_source/main.hex
1,4 → 1,4
:1000000003308A00252B0000FF00030E8301A100AE
:1000000008308A0000280000FF00030E8301A100D1
:100010000A08A0008A010408A2007708A300780853
:10002000A4007908A5007A08A600831383128C30F7
:100030008400001F1D280C1B2E2822088400230882
14,147 → 14,259
:1000D0001D08CF399D00AC122C08831687008312AF
:1000E00087169F140C138A110A121D28482BD02939
:1000F000B0184100A026CC204217633D00010C003F
:10010000D332741D2536751020100000C424D3206E
:10011000422645220000383084008313000803196A
:100120009E280230F800F701F70B9428F80B93286B
:100130009730F700F70B9A28800B912808003F189A
:10014000A3280812A4280816831608128312BF18C1
:10015000AB288812AC2888168316881283123F19A0
:10016000B3280813B4280817831608138312BF197D
:10017000BB288813BC2888178316881300008312B5
:10018000091483160910C428C52883120910831680
:10019000091083120800C00183160816003083126C
:1001A000081A0130C0048316881600308312881A9A
:1001B0000130F7000310F70D7708C0048316081705
:1001C00000308312081B0130F700F70DF70DFC30EB
:1001D000F7057708C0048316881700308312881B40
:1001E0000130F700F70DF70DF70DF830F705770838
:1001F000C0044008F800080083160910891009118E
:100200008312891083168910081688160817881714
:10021000831209158316091100008312091483162D
:10022000091000008312CB207808BF000910831644
:100230000910000083120914831609101F29831264
:10024000CB207808BE000910831609100812881206
:100250000813881383123F0EF700F030F705770874
:100260003E04F8007808BE00BE1F38298316042912
:10027000BC08031D3D2989103E2989148316891065
:10028000000083120911831609110000831209105E
:100290008316091083123D0EBE000F30BE053E08C6
:1002A000BF009F203D080F39BE00BF009F200800FF
:1002B000831608128812081388130910891009116F
:1002C000831289108316891083120911831609116C
:1002D00083120910831609100F308312B8008B2087
:1002E0000130AE002E08033C031C7E290330BF0002
:1002F0009F200530B8008B20AE0A72290230BF0063
:100300009F20AE012E08033C031C8F292E083120AC
:10031000AF00BC012F08BD00FC20AE0A82298A1163
:100320000A12CE2B390B952998294030BA00992909
:10033000BA0101303802BA073A088038BB00BC0164
:100340003B08BD00FC2008003708073A0319B22912
:100350000B3A0319B729063A0319BF29023A0319C0
:10036000C529CA290130B800B9009221D029BC01A1
:100370000130BD00FC200230B8008B20D0290130B4
:10038000B8000230B9009221D029BC011030BD0064
:10039000FC20D0290130BC003708BD00FC20D0294A
:1003A0000800831603178C170C140000000083123A
:1003B0000C087F390319152A0313AE0003170D0823
:1003C0000313AF0003170F080313B0002E08B70084
:1003D000A4212F0803178D000313300803178F0083
:1003E00083168C170C140000000083120C0D0E0DE8
:1003F0007F390319152A0313AE0003170D080313E1
:10040000AF0003170F080313B0002E08B700A42194
:100410002F0803178D000313300803178F008D0A70
:1004200003198F0A0313D129031703130800B60118
:100430000408B5003610831B36142F0EF038B100B7
:10044000B107E23EB200323EB4002F080F39B207C6
:10045000B207B407E93EB300B307B3072E0E0F3956
:10046000B307B407B30DB40DB409B40D2E080F399A
:10047000B407B10D0730B0000A30B407B303031C52
:100480003D2AB307B203031C412AB207B103031C80
:10049000452AB107B003031C492A30308400831376
:1004A0000730350535138407343004020319351736
:1004B0000008F700031D642A351B642A351A762AC2
:1004C000B519642A2030672AB51535123030F70780
:1004D000AF010408AE002F10831B2F147708B7005C
:1004E000A4212E08840083132F188317840A351F34
:1004F000542A0800831603178C170C140000000000
:100500000318A92A83120C087F390313AF000317BD
:100510000D080313B00003170F080313B1002F08D1
:10052000B700A421300803178D0003133108031707
:100530008F0083168C170C14000000008312031325
:10054000AE0BA32AA62A83160317A92AC82A831644
:10055000031783120C0D0E0D7F390313AF00031721
:100560000D080313B00003170F080313B1002F0881
:10057000B700A421300803178D00031331080317B7
:100580008F008D0A03198F0A03100313AE0B7A2A0A
:100590008A110A12212C0830B502031CDB2A3530DF
:1005A000840083130310800C00080319DB2AD92A66
:1005B0000000800BD82A0800B10131082E02031C6C
:1005C000242B83160811043083128806B3010130EE
:1005D000B2003008B5002F08B400F801F901F701A6
:1005E000FA013508031DF72A34080319112B1030BE
:1005F000B6000310B20DB30DF70DFA0D35087A02EF
:10060000031D042B34087702031C0D2B3408F7025A
:10061000031CFA033508FA020314F80DF90DB60BA2
:10062000F92A7908B3007808B2003308B400B40A94
:10063000B40303191F2BFF30B500CB22182B32084F
:10064000B500CB22B10ADD2A0800840183131F30D4
:100650008305713083168F000F0806138312061767
:10066000A8012B30A7002B10831603170908C039E7
:10067000890003131F129F12003003178800831292
:10068000870188018901FF300313AC00831603172B
:100690000908C039890003131F169F120130031780
:1006A0008800831203131F139F1783169F1783124B
:1006B0001F149412AC122C088316870083122C1678
:1006C0002C08831687008312AC112C088316870030
:1006D0000130831294000030831694000108C7395A
:1006E00028388100831290010030F800043892000D
:1006F00063308316920083122C112C088316870016
:1007000083120711831609130C3083129700831686
:100710009B019C0101309D008312AC102C088316B4
:100720008700831287100C309D000130800032302A
:1007300095001708CF39970064309B001D08CF390A
:100740009D00031787018801890171308316031307
:100750008F000F080C17C03083128B042C132C0849
:100760008316870083120717AC122C0883168700A4
:10077000831287162C122C08831687008312071603
:1007800083168811831288158316081183120811A5
:1007900064309B001D08CF399D0058290030F800B7
:1007A0001F08C33978049F000130B800B9009221B6
:1007B000763003178D0000308F000313D1210130F4
:1007C000B8000230B90092217A3003178D00003052
:1007D0008F000313D1210430AE00FA30B8008B2013
:1007E000AE0BED2B7F3003178D0000308F0003130D
:1007F000D1219F14831686168312861E012C2B147A
:10080000022C2B100130B800B90092210130840075
:100810002A08AF002908AE0017220130B8000230C4
:10082000B9009221831686168312861E322C8030E0
:1008300003178D0000308F00031004300313AE0047
:100840007A2A103084002808AF002708AE0017224B
:100850002030B700A4212030B700A4212030B700F9
:10086000A421392C863003178D0000308F0003132C
:10087000D1212D18C12C83160614831206185E2C64
:100880001430B8008B2083160614831206185E2CD1
:100890002D146430AE000230B000BC30AF00DC225A
:1008A0002808033C031C5E2C031D5A2C2708E23C3D
:1008B000031C5E2C0530A7070318A80A83168614AC
:1008C00083128618802C1430B8008B20831686146F
:1008D00083128618802C2D146430AE000230B000D4
:1008E0005830AF00DC22A808031D7A2C2708053CED
:1008F0000318802C0530A7020030031C0130A80229
:100900008316081483120818A22C1430B8008B2008
:100910008316081483120818A22C2D146430AE001C
:100920000130B000F430AF00DC222808033C031C87
:10093000A22C031D9F2C2708E73C031CA22CA70A0E
:100940000319A80A8316881483128818C12C14303E
:10095000B8008B208316881483128818C12C2D149C
:100960006430AE000130B0009030AF00DC22A70848
:10097000031DBD2CA8080319C12C27080319A803BF
:10098000A703831606148312061CD52C831686141F
:100990008312861CD52C831608148312081CD52CB0
:1009A00083168814831288182D102C132C08831694
:0C09B0008700403083128706FA2B63009A
:10010000D332741DA5192E18661020100000C424C7
:10011000D32042264522000040308400831300088B
:1001200003199F280230F800F701F70B9528F80B08
:1001300094289730F700F70B9B28800B9228080033
:100140004718A4280812A528081683160812831237
:10015000C718AC288812AD28881683168812831217
:100160004719B4280813B5280817831608138312F3
:10017000C719BC288813BD28881783168813000068
:100180008312091483160910C528C6288312091082
:100190008316091083120800C80183160816003060
:1001A0008312081A0130C80483168816003083129F
:1001B000881A0130F7000310F70D7708C80483167A
:1001C000081700308312081B0130F700F70DF70DF8
:1001D000FC30F7057708C8048316881700308312AF
:1001E000881B0130F700F70DF70DF70DF830F70514
:1001F0007708C8044808F800080083160910891019
:100200000911831289108316891008168816081799
:100210008817831209158316091100008312091427
:100220008316091000008312CC207808C70009103B
:10023000831609100000831209148316091020295F
:100240008312CC207808C600091083160910081202
:100250008812081388138312470EF700F030F70551
:1002600077084604F8007808C600C61F39298316A7
:100270000529C408031D3E2989103F2989148316C6
:1002800089100000831209118316091100008312DE
:100290000910831609108312450EC6000F30C605DB
:1002A0004608C700A02045080F39C600C700A02097
:1002B0000800831608128812081388130910891081
:1002C000091183128910831689108312091183166C
:1002D000091183120910831609100F308312C00010
:1002E0008C200130B2003208033C031C7F2903300C
:1002F000C700A0200530C0008C20B20A732902304C
:10030000C700A020B2013208033C031C9029320828
:100310003120B300C4013308C500FD20B20A83298F
:100320008A150A12AA28410B962999294030C20041
:100330009A29C20101304002C20742088038C30036
:10034000C4014308C500FD2008003F08073A03190F
:10035000B3290B3A0319B829063A0319C029023AFE
:100360000319C629CB290130C000C1009321D1292E
:10037000C4010130C500FD200230C0008C20D1290D
:100380000130C0000230C1009321D129C4011030D6
:10039000C500FD20D1290130C4003F08C500FD2063
:1003A000D1290800831603178C170C1400000000D5
:1003B00083120C087F390319162A0313B20003179E
:1003C0000D080313B30003170F080313B40032081A
:1003D000BF00A521330803178D000313340803174A
:1003E0008F0083168C170C140000000083120C0D74
:1003F0000E0D7F390319162A0313B20003170D08D7
:100400000313B30003170F080313B4003208BF002F
:10041000A521330803178D000313340803178F0039
:100420008D0A03198F0A0313D22903170313080037
:10043000BA010408B9003A10831B3A14330EF0389D
:10044000B500B507E23EB600323EB80033080F39BA
:10045000B607B607B807E93EB700B707B707320EC9
:100460000F39B707B807B70DB80DB809B80D32087E
:100470000F39B807B50D0730B4000A30B807B70315
:10048000031C3E2AB707B603031C422AB607B5036E
:10049000031C462AB507B403031C4A2A34308400DF
:1004A00083130730390539138407383004020319E0
:1004B00039170008F700031D652A391B652A391A08
:1004C000772AB919652A2030682AB91539123030CF
:1004D000F707B3010408B2003310831B3314770805
:1004E000BF00A52132088400831333188317840AC0
:1004F000391F552A8A150A12F9288E30F700330859
:10050000F8003208F900FA01F808031D912A790869
:10051000F800F9010830F702F808031D912AF701E5
:10052000992A0310F81B982AF90DF80DF703912A60
:10053000F8138A150A1207293F0803190C2BC70064
:10054000430803190C2BC7070318AD2A7F30C702D5
:10055000031C0C2B03190C2BB12A8130C70703187D
:100560000C2B4708F700F801F901FA014008CB000D
:10057000CB174108CA004208C9001830C700C8019B
:10058000491CDA2A4608FA07031CCC2AF90A031D7B
:10059000CC2AF80A0319C8174508F907031CD32AFF
:1005A000F80A0319C8174408C100C1174108F80721
:1005B0000318C817C80DF80CF90CFA0CCB0CCA0CB0
:1005C000C90C0310C70BBF2A0130F70703180C2B07
:1005D000F81BF12ACB0DFA0DF90DF80DF7030319ED
:1005E0000C2BCB1F022BFA0A031D022BF90A031D49
:1005F000022BF80A031D022BF80CF90CFA0CF70A6F
:1006000003190C2B4008C8004408C806C81F0A2B51
:10061000F817102BF813102BF701F801F901FA0164
:10062000080080308318BB06C001C1013708BF0035
:100630003B08BF0636080319012CBE00F7003A0834
:1006400003190A2CBE020319A62B031C642B3B08BA
:10065000C400C4173C08C3003D08C200C101031018
:10066000C40CC30CC20CC10CBE0B2E2BBF1F3B2BEA
:1006700040141E2C40103E10401639308400831365
:10068000332C4012BF1B4E2B3E1C592BC40CC30CE9
:10069000C20CC10CF70A0319192C592BC41B5C2B73
:1006A0000310C10DC20DC30DC40DF7030319192C9E
:1006B0004E2B4017C62B40133708BF00BF1F622BBD
:1006C000C417122CC413122C3A08BE00F7003608C7
:1006D000BE023708C400C4173808C3003908C20076
:1006E000C1010310C40CC30CC20CC10CBE0B702B97
:1006F000BF1F7D2BC0141E2CC0103E10C0163D30F5
:1007000084008313332CC012BF1B902B3E1C9B2BE9
:10071000C40CC30CC20CC10CF70A0319192C9B2B77
:10072000C41B9E2B0310C10DC20DC30DC40DF703D6
:100730000319192C902BC017C62BC0133B08BF0000
:10074000BF1FA42BC417122CC413122C3B08C400C7
:10075000C4173C08C3003D08C200BF1FB32BC4131D
:1007600040151E2C4011C1013E1039308400831306
:10077000332CBF1BDC2B3708BF003E1CC62BC40C20
:10078000C30CC20CC10CF70A0319192CC11FD72BBB
:10079000C20A031DD72BC30A031DD72BC40A031D8E
:1007A000D72BC40CC30CC20CF70A0319192C401B1D
:1007B0005B2BC01B9D2BFB2B8030C406C41FE42B7E
:1007C0001E2C3B08BF00F12B3708BF00C408031DD7
:1007D000F12BC308031DF12BC208031DF12BF701F8
:1007E000122CC41BFB2B0310C10DC20DC30DC40D75
:1007F000F70BF12B192CBF1FFF2BC417122CC4139E
:10080000122C3A08F7003B08C4003C08C3003D081E
:10081000C200122C3608F7003708C4003808C3009D
:100820003908C2004408F8004308F9004208FA00F9
:10083000512CF701F801F901FA01512CC101C2094B
:10084000C309C409C109C10A031D2C2CC20A031D16
:100850002C2CC30A0319C40A40183A2BC0187C2B4D
:100860004019B22BE12B0008C207031C3D2CC30A20
:10087000031D3D2CC40A03193E1484030008C3075A
:10088000031C452CC40A03193E1484030008801F6E
:10089000803AC40703183E14401A412BC01A832B18
:1008A000B92B8A150A123629831603178C170C14D4
:1008B000000000000318832C83120C087F390313F7
:1008C000B30003170D080313B40003170F08031335
:1008D000B5003308BF00A521340803178D000313AA
:1008E000350803178F0083168C170C1400000000C6
:1008F00083120313B20B7D2C802C83160317832CD9
:10090000A22C8316031783120C0D0E0D7F390313CF
:10091000B30003170D080313B40003170F080313E4
:10092000B5003308BF00A521340803178D00031359
:10093000350803178F008D0A03198F0A031003135C
:10094000B20B542C8A150A124F29F701F801F9014C
:10095000FA01C701C801C901CA0146084504440497
:1009600043040319E32C2030CB000310BF0DC00D4E
:10097000C10DC20DC70DC80DC90DCA0D46084A02EA
:10098000031DCC2C45084902031DCC2C4408480209
:10099000031DCC2C43084702031CDD2C4308C7026F
:1009A0004408031C440FC8024508031C450FC90234
:1009B0004608031C460FCA020314F70DF80DF90D83
:1009C000FA0DCB0BB52C47308400831308000408C4
:1009D000B7003608B9000319062D3508C2003408DF
:1009E000C1003308C0003208BF00C601C501203075
:1009F000C4008230C3009C227A08B5007908B40094
:100A00007808B3007708B200B90BED2C3508C200A6
:100A10003408C1003308C0003208BF003F08B63CAC
:100A2000BF00FA014008C300C0170310C00CC10C7E
:100A3000C20CFA0CF90CF80CF70CBF0B152DC31FE8
:100A40002C2DF709F809F909FA09F70A0319F80A28
:100A50000319F90A0319FA0A7A08B5007908B400EB
:100A60007808B3007708B200B51F432DB703B71657
:100A7000B209B309B409B509B20A0319B30A0319D3
:100A8000B40A0319B50A3B30BE009A30BD00CA3023
:100A9000BC00BB010A30B90036080319B70A350893
:100AA000C2003408C1003308C0003208BF003E084D
:100AB000C6003D08C5003C08C4003B08C300A5248F
:100AC0000008B200840A0008B300840A0008B400D9
:100AD000840A0008B500FD308407F708031D832D44
:100AE000360A39020319832D37080319852D0F396A
:100AF000390203197D2D0318B52DB71BB52D371BF2
:100B0000852D2030B12D2030B705B71E932DB7129B
:100B10003608031DB7037708B7002D30BF00A521A5
:100B20003708F700B70136083902031DA12D7708F1
:100B3000B7002E30BF00A5213708F7002030B705D9
:100B400000303030B71EB12DB7123608031DB70381
:100B50007708B7002D30BF00A5213708F700B7018F
:100B60003030F7077708BF00A5213E08C2003D08D6
:100B7000C1003C08C0003B08BF00C601C501C4015C
:100B80000A30C300A5247A08BE007908BD007808A1
:100B9000BC007708BB00B90B4F2D8A150A125D29DE
:100BA0000830B902031CE02D393084008313031090
:100BB000800C00080319E02DDE2D0000800BDD2DD8
:100BC0000800B50135083202031C292E83160811CE
:100BD000043083128806B7010130B6003408B9002A
:100BE0003308B800F801F901F701FA013908031DCB
:100BF000FC2D38080319162E1030BA000310B60D5C
:100C0000B70DF70DFA0D39087A02031D092E3808C1
:100C10007702031C122E3808F702031CFA03390866
:100C2000FA020314F80DF90DBA0BFE2D7908B7007E
:100C30007808B6003708B800B80AB8030319242E9C
:100C4000FF30B900D0251D2E3608B900D025B50AD1
:040C5000E22D080089
:10100000840183131F308305713083168F000F080E
:10101000061383120617A8012B30A7002B10831686
:1010200003170908C039890003131F129F120030EB
:10103000031788008312870188018901FF30031399
:10104000AC00831603170908C039890003131F1663
:101050009F12013003178800831203131F139F1779
:1010600083169F1783121F149412AC122C08831638
:10107000870083122C162C08831687008312AC116C
:101080002C088316870001308312940000308316E9
:1010900094000108C739283881008312900100307C
:1010A000F8000438920063308316920083122C11EA
:1010B0002C088316870083120711831609130C303E
:1010C0008312970083169B019C0101309D008312BF
:1010D000AC102C0883168700831287100C309D00FB
:1010E00001308000323095001708CF399700643006
:1010F0009B001D08CF399D000317870188018901D6
:101100007130831603138F000F080C17C030831241
:101110008B042C132C088316870083120717AC123C
:101120002C0883168700831287162C122C0883162E
:101130008700831207168316881183128815831679
:1011400008118312081164309B001D08CF399D00DF
:101150008A1159298A150030F8001F08C33978040C
:101160009F000130C000C1008A1193218A1576309A
:1011700003178D0000308F008A110313D2218A15C6
:101180000130C0000230C1008A1193218A157A30E3
:1011900003178D0000308F008A110313D2218A15A6
:1011A0000430B200FA30C0008A118C208A15B20BCC
:1011B000D2287F3003178D0000308F008A1103136F
:1011C000D2218A159F14831686168312861EEA285A
:1011D0002B14EB282B100130C000C1008A11932181
:1011E0008A15013084002A08B3002908B2008A1148
:1011F000182A8A150130C0000230C1008A119321DB
:101200008A152A08B3002908B2008A117D2A8A1596
:101210007A08C2007908C1007808C0007708BF00CA
:101220005D30C600DD30C5002130C4007D30C30014
:101230008A119C228A157708B2007808B3007908D1
:10124000B4007A08B50083103508B9003408B80036
:101250003308B7003208B6004430BD004B30BC0044
:101260005F30BB008630BA008A11112B8A157A08CC
:10127000B1007908B0007808AF007708AE00831697
:1012800086168312861E6E29803003178D0000306B
:101290008F00031004300313B2008A11542C8A15F6
:1012A000023084003108B5003008B4002F08B300C4
:1012B0002E08B200B6018A11E72C8A152030BF0033
:1012C0008A11A5218A152030BF008A11A5218A150F
:1012D0002030BF008A11A5218A157729873003178E
:1012E0008D0000308F008A110313D2218A152D182A
:1012F0000F2A8316061483120618A0291430C00082
:101300008A118C208A158316061483120618A029C8
:101310002D146430B2000230B400BC30B3008A1126
:10132000E1258A152808033C031CA029031D9C29DC
:101330002708E23C031CA0290530A7070318A80AC8
:101340008316861483128618C6291430C0008A11A9
:101350008C208A158316861483128618C6292D14AC
:101360006430B2000230B4005830B3008A11E12575
:101370008A15A808031DC0292708053C0318C6299B
:101380000530A7020030031C0130A80283160814A0
:1013900083120818EC291430C0008A118C208A1599
:1013A0008316081483120818EC292D146430B20037
:1013B0000130B400F430B3008A11E1258A15280801
:1013C000033C031CEC29031DE9292708E73C031C07
:1013D000EC29A70A0319A80A83168814831288180F
:1013E0000F2A1430C0008A118C208A1583168814A5
:1013F000831288180F2A2D146430B2000130B40013
:101400009030B3008A11E1258A15A708031D0B2A25
:10141000A80803190F2A27080319A803A70383168E
:1014200006148312061C232A831686148312861C34
:10143000232A831608148312081C232A831688146F
:10144000831288182D102C132C0883168700403027
:0814500083128706E328630004
:04400E00F52CFF3F4F
:00000001FF
;PIC16F887
;CRC=28C6 CREATED="28-IX-13 13:40"
;CRC=D1E5 CREATED="28-IX-13 13:49"