DHT22 on Pico

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: DHT22 on Pico

Post by pythoncoder » Mon Mar 01, 2021 5:06 pm

Roberthh wrote:
Mon Mar 01, 2021 4:41 pm
That is probably the good way for the PIO to signal a state to the cpu. Only the opposite seems missing.
IRQ's should work in both directions. I am using IRQ's raised in a SM to request more data from the CPU so the FIFO never becomes empty. I load the FIFO with four words, which starts the SM, then each time the SM removes a word it raises an IRQ and the Python code feeds it another. This seems to work well, except I have some questions about timing. I'm not confident that the rp2 always responds quickly to IRQ's. Work in progress...

IRQ's should work in the opposite direction as the WAIT instruction will wait on an interrupt. I haven't tested this yet.
Peter Hinch
Index to my micropython libraries.

Post Reply