The PIC is running at 20MHz. I have Define OSC 20 at the top of the code.
I am not using Interrupts. Its a simple State Machine loop that runs correctly without the For-Next loop that clears the array.
Without the For-Next loop the PauseUS has the correct time, but with it the PauseUS time is way off.
I tried using NOPs, but was still getting a long delay. I think it must an interaction between the for-next loop that clears the array and the HSEROUT.
I borrowed a DSO from work so I can do a bit of in depth investigation into what is happening and why.
I will post the code later when I have it to hand.
bill.




Bookmarks