Subversion Repositories svnkaklik

Rev

Rev 659 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 659 Rev 1068
Line 1... Line 1...
1
#include <16F88.h>
1
#include "geiger.h"
2
#device adc=8
-
 
3
 
2
 
4
#FUSES NOWDT                 	//No Watch Dog Timer
-
 
5
#FUSES HS                    	//High speed Osc (> 4mhz)
-
 
6
#FUSES NOPUT                 	//No Power Up Timer
-
 
7
#FUSES MCLR                  	//Master Clear pin enabled
-
 
8
#FUSES NOBROWNOUT            	//No brownout reset
-
 
9
#FUSES NOLVP                 	//No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
-
 
10
#FUSES NOCPD                 	//No EE protection
-
 
11
#FUSES NOWRT                 	//Program memory not write protected
-
 
12
#FUSES NODEBUG               	//No Debug mode for ICD
-
 
13
#FUSES NOPROTECT             	//Code not protected from reading
-
 
14
#FUSES NOFCMEN               	//Fail-safe clock monitor disabled
-
 
15
#FUSES NOIESO                  	//Internal External Switch Over mode enabled
-
 
16
 
-
 
17
#use delay(clock=20000000)
-
 
18
#use rs232(baud=9600,parity=N,xmit=PIN_B3,rcv=PIN_B5,bits=8)
-
 
19
 
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
}