One way that I do it is to have the routine set an I/O port on the way in and turn it off on the way out. Then I attach an oscilloscope to the pin I'm using and measure the amount of time the pin stays high and that's the duration of my routine. As with nearly anything else, there are programs that claim to do all sorts of things but none of them are any substitute for understanding what's going on. On Dec 26, 2007, at 7:06 AM, ahmed nabil wrote: > hi ALL, > i have a basic knowledge that optimizing my code time or speed is a > very > important matter > when writing a professional code. Using languages like "C" in > codevision for > example, makes it > harder to know the execution time of my instructions, i know the > matter also > depends on the > clock that the MCU works on but i mean how many cycles will the > program take > ?? > > My question: How can i do that ?? is there are programs do that > optimization > or time calculation?? > > thanks in advance > > -- > A H M E D N A B I L > > > [Non-text portions of this message have been removed] > > > > > Yahoo! Groups Links > > > >
Message
Re: [AVR-Chat] code speed optimization
2007-12-27 by Philippe Habib
Attachments
- No local attachments were found for this message.