hi can anyone help me i need to calculate the time between 2 rising edge of square wave signal the first signal is relayed with pc10 the second with pc11
that is the schematic :
s14.postimg.org/.../counter1.png
The timer can have very high resolution. But if handling it using interrupts, then there is a limit to how often you can have your interrupts, i.e. how fast you can read out a captured value before you get the next edge.
Notice that in this specific case, the two edges arrives on two different pins, so the same capture function can often not be used unless both pins can be routed as capture pins for the same timer.
Anyway - I expect the OP has already lost interest in this thread.
Many spam in my gmail box is about Rolex. Somehow they didn't block Rolex. Maybe GShock?
Hi. we are working on the project again for now four months. i made many changes to the project and the code is now very good but it is still not working very properly.
uint8_t ch[10000]; double timerValue1,timerValue2 ,delta, delta2;
do { timerValue1 = TIM_GetCounter(TIM2); delta2 = delta1 + timerValue1; } while(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10)!=1) ; do { timerValue2 = TIM_GetCounter(TIM4);
delta2 = delta2 + ch[53]; } while(GPIO_ReadInputDataBit(GPIOC, GPIO_Pin_10)!=1) ; delta= timerValue2- timerValue1;
} sprintf(ch,"%lf seconds", (double)delta); LCD_SetTextColor(LCD_COLOR_WHITE); LCD_SetBackColor(LCD_COLOR_BLACK); LCD_DisplayStringLine(LINE(9),ch);