Interrupt with timer0 questions
Posted: Wed Jun 15, 2016 8:14 am
Hi guys!
I'm testing my ESP8266-07 and my goal is to measure a pulse of 200us. Since I don't have yet my hardware circuit who will send me these pulses, I tried to simulate them with timer0 and now comes my questions.
I set the interrupt every DELAYVALUE counts (from 100ms to 500us) and every 1 second I send to my MQTT broker the maximum and minimum pulse-width. I know that the WiFi isn't so fast so I make some processing and then I send the data.
The funny thing is that it's working well from 100ms to 1ms (the error is only a few counts) but when I tried to make the interrupt every 500us I receive pulses of 1ms (it's like it is missing an interrupt).
Do you know what is the maximum frequency of the interrupts? I need to measure pulses even smaller and I'm stuck here.
I'm testing my ESP8266-07 and my goal is to measure a pulse of 200us. Since I don't have yet my hardware circuit who will send me these pulses, I tried to simulate them with timer0 and now comes my questions.
I set the interrupt every DELAYVALUE counts (from 100ms to 500us) and every 1 second I send to my MQTT broker the maximum and minimum pulse-width. I know that the WiFi isn't so fast so I make some processing and then I send the data.
The funny thing is that it's working well from 100ms to 1ms (the error is only a few counts) but when I tried to make the interrupt every 500us I receive pulses of 1ms (it's like it is missing an interrupt).
Do you know what is the maximum frequency of the interrupts? I need to measure pulses even smaller and I'm stuck here.