Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20967

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

$
0
0
Hi Paul; Wow! I'm shocked! Select Case is faster than Do-Loop . . . I might be able to make it work, I'll try more tomorrow after a good night's sleep - I start to fade after midnight at my age . . . Select Case probably doesn't allow Integer uS resolution, but it's definitely faster than the other language alternatives I tried. I didn't even try it earlier because of the perceived "overhead" I assumed it had. Select Case X Case 1 Nop Case 2 Nop : Nop Case 3 Nop : Nop : Nop Case 4 Nop : Nop : Nop : Nop End Select I selected 1, 3 and 4. Delays were 1.75uS, 3uS, and 3.375uS. It has modest startup overhead, but the delay seems to be approaching a clock cycle+ as NOPs become a larger % of the code. Eliminating the NOP in Case 1 save another clock cycle, as I think it would in every case. Just between you & I, I'd settle for 2-17uS if I had to . . . Thanks & Best Regards, Ken

Viewing all articles
Browse latest Browse all 20967

Trending Articles