Quantcast
Viewing all articles
Browse latest Browse all 20639

BASCOM-AVR : Short configurable delays 1-16uS : REPLY

Hi, Then the only way would be to just use nops to delay the code. Just work out how long a NOP command takes and just string several together. So for 1us you need 8 commands so maybe an rcall to an assembler routine with NOPS and a ret do rcall wait_1us 'rcall is 3 or 4 clock ticks rcall wait_2us 'total 16 or 17 clock ticks loop end wait_2us NOP 'repeat NOP's 8 times for 1us NOP 'repeat NOP's 8 times for 1us wait_1us: ret '4 or 5 ticks Reminds me of the good old days, counting clock cycles on z80 I/O boards, trying to get the timing right. Regards Ian Dobson

Viewing all articles
Browse latest Browse all 20639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>