GPIO fast enough to sample 300 microsecond pulse? #13751
-
I'm using an ESP-01 (ESP8266-based) and uPy v1.22.1 to read pulses from a CAJOE v1.1 Geiger counter, but it's not triggering the interrupt routine. I can trigger the routine manually by grounding out the GPIO, but I'm wondering if the pulse is too fast for this older chip? Pulse width is about 300uS according to my oscilloscope. Do I need to upgrade to an ESP32? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
No, I tested it with an ESP32, same result. And manual triggering works on the ESP32 as well. Confirmed with the scope that the signal drops from 3.3V to 0V for 250-300uS. Found that it does work with Arduino code, and I may try that next. Perhaps uPy isn't fast enough? Sample code:
|
Beta Was this translation helpful? Give feedback.
-
Usually there is a latch in the GPIO peripheral circuitry that registers voltage changes for possible interrupts and stores the info that such a change occurred in hardware. The description in the technical reference (2.2.4) is not very clear here. PS: In your ISR code the |
Beta Was this translation helpful? Give feedback.
Confirmed, Arduino code works. I dunno.
Yes, it is included in the board.
It wasn't there in the first round of testing so that wasn't causing this issue, but I'll remember that for next time. I'm just going with Arduino code and done. It doesn't need to be fancy.