Carga Dinâmica  0.1
Sistemas de Instrumentação Electrónica
interrup.h
Go to the documentation of this file.
1 
5 #ifndef INTERRUP_H
6 #define INTERRUP_H
7 
8 // ****************************************************************************
9 //includes
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <xc.h>
13 #include <sys/attribs.h>
14 
15 #include "ventoinha.h"
16 #include "led.h"
17 
18 
19 
20 // ****************************************************************************
21 //define's
22 #define DisableInterrupts() asm volatile("di")
23 #define EnableInterrupts() asm volatile("ei")
24 
25 
26 #if 1
27 #define ticPerSec 10000
28 #define freqTimerTigger 500
29 #else
30 #define ticPerSec 5000
31 #define freqTimerTigger 1000
32 #endif
33 #define ticPerMin ticPerSec*60
34 uint32_t numberTICS;
35 
36 
37 
38 // ****************************************************************************
43 void confT1();
44 
45 // ****************************************************************************
50 void delay(unsigned int n_intervals);
51 
52 // ****************************************************************************
57 void starTimer();
58 
59 // ****************************************************************************
65 void stopTimer();
66 
67 // ****************************************************************************
72 void isr_T1(void); // Replace VECTOR by the timer T1 // vector number
73 
74 
75 
76 #endif /* CONFIGINT_H */
77 
void confT1()
config timer 1
void delay(unsigned int n_intervals)
Delay for bebug.
void isr_T1(void)
timer T1, this timer send trigger for system work
void stopTimer()
stop timer interrup work
configuratoin for led
configuratoin for i2c
void starTimer()
star timer interrup work