![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
fork
Fork of LG by
Diff: MTimer.c
- Revision:
- 164:6f43f85fdd8d
- Parent:
- 162:44e4ded32c6a
- Child:
- 165:b2bd0c810a4f
--- a/MTimer.c Mon May 16 14:03:16 2016 +0000 +++ b/MTimer.c Tue May 17 14:04:34 2016 +0000 @@ -99,10 +99,10 @@ } if (Time500Hz > 200) { - LoopOn + // LoopOn Time500Hz -= 200; Event500Hz ++; - LoopOff + // LoopOff } //BackLightOFF @@ -172,8 +172,10 @@ ////////////////////////////////////////////////////////////////////// void enable_timer2(void) { + LPC_TIM2->TCR = 1; LPC_TIM2->TCR = 0x01; + } @@ -182,13 +184,13 @@ ////////////////////////////////////////////////////////////////////// __irq void TIMER1_IRQHandler (void) { -//BackLightON - // LoopOn +BackLightON +// LoopOn ResetCS(ADC); //prepare ADC for sampling SetDAC(DAC); CountV255++; // инкремент счеттчика - CountV255 &= 0xff; // ОБРЕЗАНИЕ СЧЕТЧИКА ой + CountV255 &= 0xff; // ОБРЕЗАНИЕ СЧЕТЧИКА CountV31 =CountV255 & 0x1f; // малый счетчик //if(CountV31==0) { BackLightON } @@ -202,8 +204,8 @@ SPI_Exchange(); //Чтение ADS_SPI LPC_TIM1->IR = 1; - // LoopOff -//BackLightOFF + // LoopOff +BackLightOFF } @@ -216,6 +218,7 @@ /////////////////////////////////////////////////////////////////////// __irq void TIMER2_IRQHandler (void) { //BackLightON + LoopOn LPC_TIM2->IR = 1; @@ -229,4 +232,5 @@ Event100K ++; // BackLightOFF + LoopOff } \ No newline at end of file