![]() |
Timing Codes
Does anyone know where to find the timing codes for the PIC?
|
Re: Timing Codes
How so? you can have one of the timer interupts increment a variable, or count iterations throught the main loop.
|
Re: Timing Codes
Well I'm not looking to see how fast an algorithm would run. I'm looking to see how many cycles different instructions would take. Like an opcode reference.
|
Re: Timing Codes
I'm not sure I understand entirely, but by the sound of it, I'd suggest using a timer interupt.
|
Re: Timing Codes
Well there are 2 ways to do this.
1.) View the disassmebly code output from the compiler and trace the program flow. 2.)Set up a timer that rums in the background and times different operations. Btw.. although the processor is 40mhz, one operation takes 4 clock cycles. Hence 10mips. |
Re: Timing Codes
This helped me a lot, it allows you two write two different but very acurate timers.
http://www.innovationfirst.com/FIRST...004-Jan-14.pdf |
Re: Timing Codes
Not quite what I was looking for. There are some x86 opcode references that have an estimate for the number of cycles it takes to execute an instruction (This would be dependant on the maker of your cpu). I was wondering if anyone has seen something like this for the PIC18F8520?
|
Re: Timing Codes
Quote:
|
Re: Timing Codes
It's not for the same model of PIC, but here is one document that lists the cycle times for various instructions - many of them may be the same (there's other stuff in the file too, scroll down):
http://www.microchip.com/download/li...och/40170b.pdf |
Re: Timing Codes
Quote:
|
Re: Timing Codes
Thank you deltacoder, this was exactly what I was looking for (or pretty close). Finally tommorow I'll be off academic probation and back doing my passion =D
|
Re: Timing Codes
amazing what Google can find ;) good luck on your programming - we just finished our drive base today, so now I get to start having some fun. (My team leader would probably shudder if he heard me saying that.)
|
| All times are GMT -5. The time now is 08:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi