Subversion Repositories svnkaklik

Rev

Rev 410 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
#include "D:\KAKLIK\programy\PIC_C\mereni\geiger\geiger.h"
2
 
3
 
4
void main()
5
{
6
   unsigned int16 n;
7
 
8
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
9
   setup_adc(ADC_OFF);
10
   setup_spi(FALSE);
11
   setup_timer_0(RTCC_EXT_H_TO_L|RTCC_DIV_1);
12
   setup_timer_1(T1_DISABLED|T1_DIV_BY_1);
13
   setup_timer_2(T2_DISABLED,0,1);
14
   setup_ccp1(CCP_OFF);
15
   setup_comparator(A0_A2_A1_A2_OUT_ON_A3_A4);
16
   setup_vref(VREF_LOW|1|VREF_A2);
17
   setup_oscillator(False);
18
 
19
   n=0;
20
   set_timer0(0);
21
   While(true)
22
   {
23
      printf("%Lu0, %u\n\r", n++, get_timer0());     
24
      set_timer0(0);
25
      Delay_ms(10000);
26
   }
27
}