PAUSEUS Using a 16MHz Oscillator
Hi,
I am sure this question or a similar one has been posted before, but I can't find it. I'm using a 16 MHz internal oscillator and according to the 2.60 PBP manual the minimum pause I can get is 5us. Now, to obtain a shorter delay the manual recommends using ASM....ENDASM. Can somebody enlight me on how to do this?
Thank you,
Robert
Re: PAUSEUS Using a 16MHz Oscillator
Hi,
At 16MHz one instruction cycle is 250ns. To get 1us delay you could do
Code:
ASM
NOP
NOP
NOP
NOP
ENDASM
Any longer and you'd probably set up a loop or use some other tricks.
/Henrik.
Re: PAUSEUS Using a 16MHz Oscillator
Nice!
Can I use this ASM code inside a IF....ENDIF condition? For example,
IF something
ASM
NOP
NOP
NOP
NOP
ENDASM
ENDIF
Re: PAUSEUS Using a 16MHz Oscillator
Re: PAUSEUS Using a 16MHz Oscillator
Re: PAUSEUS Using a 16MHz Oscillator
just think the IF ... ENDIF will take some time ... ( especially if "something" is a complex expression ) ...
Alain
Re: PAUSEUS Using a 16MHz Oscillator
This might be a great opportunity to utilize an O-scope :-]
Have fun!