0,0 → 1,27 |
#include "D:\KAKLIK\programy\PIC_C\mereni\geiger\geiger.h" |
|
|
void main() |
{ |
unsigned int16 n; |
|
setup_adc_ports(NO_ANALOGS|VSS_VDD); |
setup_adc(ADC_OFF); |
setup_spi(FALSE); |
setup_timer_0(RTCC_EXT_H_TO_L|RTCC_DIV_1); |
setup_timer_1(T1_DISABLED|T1_DIV_BY_1); |
setup_timer_2(T2_DISABLED,0,1); |
setup_ccp1(CCP_OFF); |
setup_comparator(A0_A2_A1_A2_OUT_ON_A3_A4); |
setup_vref(VREF_LOW|1|VREF_A2); |
setup_oscillator(False); |
|
n=0; |
set_timer0(0); |
While(true) |
{ |
printf("%Lu0, %u\n\r", n++, get_timer0()); |
set_timer0(0); |
Delay_ms(10000); |
} |
} |