I'm using the Timer 3 and I want to verify that the ISR is being called at the correct interval. I wanted to use a the clock() function but I can't include <time.h>. What should I do??? Thanks
Not discussing the port method, that is surely the best one. About clock() function I'm working with MCB2300 and don"t have search feature implemented (neither with RTX included). Well what it would be using as a base time ? (RTC does not provide a us accuracy, in my case 1s/2^15)
If you use a other hardware timer, you may read TC after N interrupts, calculate mean TC/N and convert it to time. Be aware of you timer resolution, and when its resetting.
But in fact measuring T1 accuracy with T2 that would have the same accuracy has something tricky.
I'm working with MCB2300 so what does this have to do with a '51? But in fact measuring T1 accuracy with T2 that would have the same accuracy which is not true for a '51
Erik
I'm working with MCB2300 so what does this have to do with a '51? The way we check the include files is the same. I mean : look at your include file list and check for time.h & clock() presence. http://www.keil.com/support/man/docs/c51/c51_library.htm
which is not true for a '51 That does not change the conclusion :)