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
Keil continues to run this forum like fools. I can't use the word "s t o p w a t c h" without getting error 500 when trying to post. Just as this forum constantly fails to accept posts relating to "w a t c h d o g". Who thinks it's clever to filter these words on a forum specifically related to embedded development??? I have also notified their support but they don't seem to be able to figure out why anyone might want to legimitely want to use the word "w a t c h" without intending it as spam.
How old are you?
How many w atches would you need to time your trip between your home and the closest town?
What processor and board are you using?
watch
stopwatch
Just use a little imagination
Imagination? The word "chronograph" in my earlier post was "stopwatch", but without any character in bold.
New posters who come here and get error 500 when they try to post will not be able to use any imagination to modify their post since they will not know that status code 500 is a badly tuned spam filter. All they want is help, and they'll leave when they can't post. And you'll never know because you never see their post. And Keil'll never know because they don't analyze the blocked posts.
All they want is help ...
All anybody wants is that occasional piece of help.
If you are using a STM Board there may be a example available with a name like
TIM_InputCapture that programs a timer to operate in input capture mode. And use
a timer interrupt to capture the time a pulse comes in. The next interrupt that occurs
because of another input pulse will cause a calculation of the time between pulses.
I am looking at STM32F_100E_EVAL board. They calculate but it also says that the frequency
maximum it can resolve is around 330 khz.
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);