![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
Diff: MTimer.c
- Revision:
- 114:5cc38a53d8a7
- Parent:
- 113:8be429494918
- Child:
- 115:e5a230e5af52
--- a/MTimer.c Mon Apr 04 14:48:14 2016 +0000 +++ b/MTimer.c Tue Apr 05 02:44:26 2016 +0000 @@ -13,7 +13,7 @@ //unsigned int CountVf=0 ; unsigned int CountV31=0; unsigned int CountV255=0 ; -unsigned int CountV64 = 0; + @@ -150,38 +150,26 @@ } - - ////////////////////////////////////////////////////////////////////// /////////////////////////прерывание таймера 1////////////////////////// ////////////////////////////////////////////////////////////////////// __irq void TIMER1_IRQHandler (void) { - ResetCS(ADC); //prepare ADC for sampling + ResetCS(ADC); //prepare ADC for sampling SetDAC(DAC); - CountV255++; - CountV255 &= 0xff; - CountV31 =CountV255 & 0x1f; - CountV64 = CountV255 & 0x3f; + CountV255++; // инкремент счеттчика + CountV255 &= 0xff; // ОБРЕЗАНИЕ СЧЕТЧИКА ой + CountV31 =CountV255 & 0x1f; // малый счетчик SetCS(ADC); //start ADC sampling ResetDAC(DAC); - D_QEI(); //чтение данных по счетчику cheng(); // расчет вибропривода - - - -// Spi.SpiFlag=1; - SPI_Exchange_I(); //Чтение ADS_SPI - + SPI_Exchange(); //Чтение ADS_SPI + LPC_TIM1->IR = 1; - - - - }