Subversion Repositories svnkaklik

Rev

Rev 659 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 659 Rev 1068
Line 1... Line 1...
1
#include "D:\KAKLIK\programy\PIC_C\mereni\geiger\geiger.h"
1
#include "geiger.h"
-
 
2
 
-
 
3
#int_EXT
-
 
4
void EXT_isr(void)
-
 
5
{
-
 
6
   output_toggle(LED3);
-
 
7
}
2
 
8
 
3
 
9
 
4
void main()
10
void main()
5
{
11
{
6
   unsigned int16 n;
12
   unsigned int16 n;
Line 14... Line 20...
14
   setup_ccp1(CCP_OFF);
20
   setup_ccp1(CCP_OFF);
15
   setup_comparator(A0_A2_A1_A2_OUT_ON_A3_A4);
21
   setup_comparator(A0_A2_A1_A2_OUT_ON_A3_A4);
16
   setup_vref(VREF_LOW|1|VREF_A2);
22
   setup_vref(VREF_LOW|1|VREF_A2);
17
   setup_oscillator(False);
23
   setup_oscillator(False);
18
   
24
   
-
 
25
   enable_interrupts(INT_EXT);
-
 
26
   enable_interrupts(GLOBAL);
-
 
27
   
-
 
28
   
19
   n=0;
29
   n=0;
20
   set_timer0(0);
30
   set_timer0(0);
21
   While(true)
31
   While(true)
22
   {
32
   {
23
      printf("%Lu0, %u\n\r", n++, get_timer0());     
33
      printf("%Lu0, %u\n\r", n++, get_timer0());