After a long time dealing with the "undefined reference" problem (including Axon.elf error) ...this is where I could reach..
I am using Axon_Source_012309 Source code with new Timer640.c/h files [i.e. i can see Timer640_old.c/h] - which apparently Admin made to fix the same errors of "undefined reference" etc that occurs while I use Timers !.
(btw, Axon.elf not found error still occurs when i #include "timer640.c" - what should I do?)
But anyway, now, when I added the Axon_Source_012309 Source code, with new Timer640 files (also attached) I got errors in Axon.c because of initializing Timers functions are different ! (that Admin used in the old and new Timer640.h)
For example: by default we have (in Axon.c):
init_timer0(TIMER_CLK_1024);
init_timer1(TIMER_CLK_64);
init_timer2(TIMER2_CLK_64);
init_timer3(TIMER_CLK_64);
init_timer4(TIMER_CLK_64);
init_timer5(TIMER_CLK_64);
But none of them (the functions or arguement variable etc) match the new Timer640.h ...
so I tried this and it didn't give me any error:
timer0SetPrescaler(TIMER_CLK_DIV1024);
timer1SetPrescaler(TIMER_CLK_DIV64);
timer2SetPrescaler(TIMERRTC_CLK_DIV64);
timer3SetPrescaler(TIMER_CLK_DIV64);
timer4SetPrescaler(TIMER_CLK_DIV64);
timer5SetPrescaler(TIMER_CLK_DIV64);
but I don't know much about it... does that Initialize it? ..if not, what would be the code for initializing the timers...?
Last thing: All the examples of Timers etc.. does not work..
For example, (to start the timer, and after 5 seconds run the servo) I'm using:
long time=timer0GetOverflowCount()*255+TCNT0;
timer0Init();
reset_timer_0();
while(time<5) ;
for(uint16_t i=0; i<10; i++){
servo(PORTA,7,700);}
No compiling errors, but it doesn't work !!
Please help me create Timers !...
Thanks !