/Designs/Measuring_instruments/GM_counter/SW/HV_source/main.c |
---|
1,7 → 1,7 |
#include ".\main.h" |
#define LED1 PIN_C6 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5 |
#define LED2 PIN_C5 //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5 |
#define LED1 PIN_C6 //CHANGE PIN_XX TO YOUR LED PIN NUMBER |
#define LED2 PIN_C5 //CHANGE PIN_XX TO YOUR LED PIN NUMBER |
#define LED3 PIN_C4 //CHANGE PIN_XX TO YOUR LED PIN NUMBER |
#define LED4 PIN_D3 //CHANGE PIN_XX TO YOUR LED PIN NUMBER |
32,11 → 32,8 |
#define DIVISOR 99 // 20 kHz |
//#define DIVISOR 39 // 50 kHz |
#define regreseM (2.02) |
#define regreseN (-451) |
#define MAX_OUTPUT 706 |
void sound_beep( unsigned int lenght, int16 frequency) |
{ |
unsigned int i; |
54,7 → 51,7 |
unsigned int16 napeti; |
unsigned int1 button_press; // semafor pro cteni tlacitek |
setup_adc_ports(sAN0|VSS_VDD); |
setup_adc_ports(sAN0|VSS_VREF); |
setup_adc(ADC_CLOCK_DIV_2); |
setup_spi(SPI_SS_DISABLED); |
setup_timer_0(RTCC_EXT_L_TO_H|RTCC_DIV_1); |
67,9 → 64,6 |
setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
setup_oscillator(OSC_8MHZ); |
// set_pwm1_duty(0); |
// set_pwm2_duty(0); |
output_high(LED1); |
output_high(LED2); |
output_high(LED3); |
127,7 → 121,7 |
{ |
button_press=true; |
sound_beep(100,700); |
if(setpoint < (1023-5) )setpoint+=5; |
if(setpoint < (MAX_OUTPUT-5) )setpoint+=5; |
} |
} |
149,7 → 143,7 |
{ |
button_press=true; |
sound_beep(100,500); |
if(setpoint < 1023 )setpoint++; |
if(setpoint < MAX_OUTPUT )setpoint++; |
} |
} |
/Designs/Measuring_instruments/GM_counter/SW/HV_source/main.hex |
---|
90,7 → 90,7 |
:100590000908C039890003131F129F120030031786 |
:1005A00088008312870188018901FF300313A000AE |
:1005B000A2012B30A100831603170908C039890056 |
:1005C00003131F129F1201300317880083120313B5 |
:1005C00003131F169F1201300317880083120313B1 |
:1005D0001F139F1383169F1783121F149412A012C8 |
:1005E00020088316870083122016200883168700B0 |
:1005F0008312A01120088316870001308312940013 |
128,7 → 128,7 |
:1007F00067212518812C83160614831206181E2CD7 |
:100800001430B000212083160614831206181E2C03 |
:1008100025146430A6000230A800BC30A700722264 |
:100820002208033C031C1E2C031D1A2C2108F93C32 |
:100820002208023C031C1E2C031D1A2C2108BC3C70 |
:10083000031C1E2C0530A1070318A20A8316861478 |
:1008400083128618402C1430B000212083168614A1 |
:1008500083128618402C25146430A6000230A800AC |
136,8 → 136,8 |
:100870000318402C0530A1020030031C0130A202F5 |
:100880008316081483120818622C1430B00021203B |
:100890008316081483120818622C25146430A600ED |
:1008A0000130A800F430A70072222208033C031C88 |
:1008B000622C031D5F2C2108FE3C031C622CA10A44 |
:1008A0000130A800F430A70072222208023C031C89 |
:1008B000622C031D5F2C2108C13C031C622CA10A81 |
:1008C0000319A20A8316881483128818812C143005 |
:1008D000B00021208316881483128818812C2514D7 |
:1008E0006430A6000130A8009030A7007222A10851 |
149,4 → 149,4 |
:04400E00F52CFF3F4F |
:00000001FF |
;PIC16F887 |
;CRC=950D CREATED="28-IX-13 11:23" |
;CRC=5A87 CREATED="28-IX-13 12:14" |
/Designs/Measuring_instruments/GM_counter/SW/HV_source/main.pjt |
---|
17,9 → 17,9 |
0=0000 %S 0 0 796 451 3 0 |
[Opened Files] |
1=main.c |
2= |
3=C:\Program Files (x86)\PICC\devices\16F887.h |
4=C:\Program Files (x86)\PICC\drivers\lcd.c |
2=main.h |
3=C:\Program Files\PICC\devices\16F887.h |
4=C:\Program Files\PICC\drivers\lcd.c |
5= |
[Target Data] |
OptionString=-p +FM |