I am a beginner in the AVR world.
I am using Crossworks for AVR with Atmega128.
I want to measure the time execution for a function for example and print the time elapsed, I wrote this code but with 0 result:
TCCR0=(1<<WGM01) | (1<<CS01) | (1<<CS00); // start 8 bit clock/64
start = millis();
printf("start = %d", start);
printf("finish = %d", finish);
printf("Elapsed time =");
unsigned long millis()
unsigned long m;
m = ctl_current_time;
I am getting 0. in the hyperterminal
Can anyone helps me.
Please sign in to leave a comment.