Improve timing

This commit is contained in:
Jonathan BAUDIN 2023-09-21 18:46:22 +02:00
parent 84f57e00e8
commit 5fc62ae0a1

View file

@ -11,7 +11,7 @@
loop_init_low: ; wait 992 ms
jmp x-- loop_init_low [31]
set pins, 1 ; set pin to high
set pins, 1 [19] ; set pin to high (for 20µS)
set pindirs, 0 ; set pin as input
wait 0 pin 0 ; Wait for low
@ -25,12 +25,13 @@
wait 1 pin 0 ; wait for high
nop [29] ; wait for ~ 30 µS
nop [9] ; wait for ~ 10 µS
in pins, 1 ; read the pin state and store bit value
jmp x--, loop_data ; Loop while there are bits left to read
push iffull noblock ; Push data if full
jmp x--, loop_data ; Run until read all bitsw
jmp y--, init_loop_data
push ; Push the last bytes