User Tools

Site Tools


en:pfw:dht22-rp2040-nofortht

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:pfw:dht22-rp2040-nofortht [2025-06-29 13:21] willemen:pfw:dht22-rp2040-nofortht [2025-06-29 13:25] (current) willem
Line 2: Line 2:
  
 <code> <code>
-(* DHT22 sensor, using PIO: 428 bytes +(* DHT22 sensor, using PIO: 424 bytes 
-   Willem Ouwerkerk 20250627+   Willem Ouwerkerk, 20250629
  
     40-bits pulse stream 32-bits data & 8-bits checksum     40-bits pulse stream 32-bits data & 8-bits checksum
Line 56: Line 56:
 : READ) ( -- data chk ) : READ) ( -- data chk )
     one> 0 exec-opc             \ Start new measurement     one> 0 exec-opc             \ Start new measurement
-    begin  0 rx-depth 1- until  \ Stack minimal two deep?+    begin  0 rx-depth 1- until  \ Fifo minimal two deep?
     0 rxf>   0 rxf> ;           \ 32-bits data & 8-bits checksum     0 rxf>   0 rxf> ;           \ 32-bits data & 8-bits checksum
  
Line 67: Line 67:
 : CHKS  ( data -- chks )    \ Calculate checksum : CHKS  ( data -- chks )    \ Calculate checksum
     h-h  b-b +  swap        \ Split & calc. checksum     h-h  b-b +  swap        \ Split & calc. checksum
-    b-b +  +  hx FF and ;+    b-b +  +  b-b drop ;
  
 : READ  ( -- t h ) : READ  ( -- t h )
en/pfw/dht22-rp2040-nofortht.1751196077.txt.gz · Last modified: 2025-06-29 13:21 by willem