Improve timing
This commit is contained in:
parent
84f57e00e8
commit
5fc62ae0a1
1 changed files with 7 additions and 6 deletions
|
@ -11,7 +11,7 @@
|
||||||
loop_init_low: ; wait 992 ms
|
loop_init_low: ; wait 992 ms
|
||||||
jmp x-- loop_init_low [31]
|
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
|
set pindirs, 0 ; set pin as input
|
||||||
|
|
||||||
wait 0 pin 0 ; Wait for low
|
wait 0 pin 0 ; Wait for low
|
||||||
|
@ -25,12 +25,13 @@
|
||||||
wait 1 pin 0 ; wait for high
|
wait 1 pin 0 ; wait for high
|
||||||
|
|
||||||
nop [29] ; wait for ~ 30 µS
|
nop [29] ; wait for ~ 30 µS
|
||||||
|
nop [9] ; wait for ~ 10 µS
|
||||||
|
|
||||||
in pins, 1 ; read the pin state and store bit value
|
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
|
push iffull noblock ; Push data if full
|
||||||
|
|
||||||
jmp x--, loop_data ; Run until read all bitsw
|
|
||||||
|
|
||||||
jmp y--, init_loop_data
|
jmp y--, init_loop_data
|
||||||
|
|
||||||
push ; Push the last bytes
|
push ; Push the last bytes
|
||||||
|
|
Loading…
Reference in a new issue