Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Speed of execution a code

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR
View previous topic :: View next topic  
Author Message
bibibo

Bascom Member



Joined: 30 Nov 2009
Posts: 168

slovakia.gif
PostPosted: Tue Oct 08, 2013 7:37 am    Post subject: Speed of execution a code Reply with quote

I wanted to ask how many codes can be in interrupt routine but then i found this note.

* when you use a timer interrupt that occurs each 10 uS for example, be sure that the interrupt code can execute in 10 uS. Otherwise you would loose time.

Unfortunately I do not know count speed of execution a code. Could someone give me a example ?
Back to top
View user's profile
AdrianJ

Bascom Expert



Joined: 16 Jan 2006
Posts: 2472
Location: Queensland

australia.gif
PostPosted: Wed Dec 10, 2014 11:01 pm    Post subject: Reply with quote

The Bascom simulator is a very good tool to do this. Just write the code you want to operate in a small test program, compile it, and run in the simulator. The simulator has facilities to count and reset the number of clock cycles on any part of the execution. Converting from clock cycles to real time just needs the processor clock speed.
_________________
Adrian Jansen
Computer language is a framework for creativity
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum