?? interruption.c
字號(hào):
////////////////////////////////////////////////////////////////
// interruption.c //
////////////////////////////////////////////////////////////////
//Include fichiers Microchip
#include "p30f4011.h"
#include "timer.h"
#include "adc10.h"
//Include fichiers du projet
#include "constantes.h"
#include "variables_globales.h"
#include "prototypes.h"
void __attribute__((__interrupt__,auto_psv)) _ADCInterrupt(void)
{
unsigned char temp;
IFS0bits.ADIF = 0; //Clear du flag
LATDbits.LATD2 = !LATDbits.LATD2;
//Calcul SBPA
temp = (reg&0x100)>>8 ^ (reg&0x400)>>10;
reg = reg << 1;
reg = reg | temp&1;
PINs = temp;
if((idx >= idx_adc_deb) && (idx >= idx_adc_fin))
{
echentillonnage[idx_ech++] = (char)((ReadADC10(0))>>2);
if(idx_ech > NB_MAX_ECHANTILLONS)
{
idx_ech = 0;
fin_ech=1;
}
}
idx++;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -