![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
forkd
Fork of LG2 by
Diff: MTimer.c
- Revision:
- 42:6fc307c4963e
- Parent:
- 21:bc8c1cec3da6
- Child:
- 47:d902ef6f7564
--- a/MTimer.c Sat Feb 06 18:24:01 2016 +0000 +++ b/MTimer.c Sun Feb 07 12:24:11 2016 +0000 @@ -47,7 +47,6 @@ { //LoopOn - // Init_SPI_Exchange();// CS ResetCS(ADC); //prepare ADC for sampling SetDAC(DAC); @@ -56,17 +55,17 @@ CountV255 &= 0xff; CountV31 =CountV255 & 0x1f; CountV64 = CountV255 & 0x3f; + SetCS(ADC); //start ADC sampling ResetDAC(DAC); - D_QEI(); - cheng(); + D_QEI(); //чтение данных по счетчику + cheng(); // расчет вибропривода // CuruAngle = CuruAngle + Buff_32Point [CountVf] - 0xffff; CuruAngle = CuruAngle + Buff_32Point [CountV255] - 0xffff; - SPI_Exchange(); //Чтение ADS_SPI - + SPI_Exchange(); //Чтение ADS_SPI LPC_TIM1->IR = 1; }