Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .org $e00 ;this is where last 1K defs go
- ;.db " ", $0d
- .db " : bA ; ", $0d
- ;.db ": not 0= if one else zero endif ; : cn constant ; : d. depth . ; : v variable ; ", $0d ;all handy
- ;.db ": 1= 0= not ; : 1+ one + ; : inc dup @ 1+ swap ! ; ", $0d
- .db "0058 cn TIFR : TOVO 0001 TIFR ; 0036 cn PINB 0053 cn TCCR0B v c1 v c2 0037 cn DDRB" ,$0d
- .db " 0052 cn TCNT0 : inputVal 0001 PINB bit@ ;" , $0d
- ;.db " : startT0 0001 TCCR0B c! ; " ,$0d
- .db ": TOVInt 0001 0059 setbit ; " ,$0d ;enable TOCO and also do sei
- .db ": TOVIntX 0001 0059 clrbit ; : globInt 0007 005f setbit ; " ,$0d ;enable TOCO and also do sei
- .db " : (t0 stopT0 TOVInt globInt zero dup k0 ! TCNT0 c! startT03 ; : t0) stopT0 globIntX TOVIntX ;", $0d
- ; use above like this OK} (t0 delay100ms t0) k0 @ . TCNT0 c@ . $0d Got less than 1% error over 100ms
- ;: globIntX 0007 005f clrbit ; <--couldn't get this towork
- ;.db " : stopT0 0000 TCCR0B c! ; ", $0d
- .db " : sst globInt TOVInt 0000 TCNT0 c! 0000 k0 ! ; ", $0d ;startT0 stopT0 k0 ? TCNT0 c@ . globIntX ; " , $0d
- ;.db "testingstopper",$0d ;only used during testing.No effect otherwise
- .db "finishblock",$0d
Advertisement
Add Comment
Please, Sign In to add comment