Author Topic: Need help using 8 bit Timers  (Read 844 times)

0 Members and 1 Guest are viewing this topic.

Offline Hasan999Topic starter

  • Full Member
  • ***
  • Posts: 75
  • Helpful? 1
Need help using 8 bit Timers
« on: March 05, 2010, 03:11:58 PM »
Axon Microcontroller - using Webbot Library...

When I include an 8 bit Timer for any "bank", it compiles successfully, but the programming doesn't do anything (none of the servos get pulses)

Example:

Code: [Select]
servosInit(&bank1, TIMER1_COMPAREA);
servosInit(&bank4, TIMER1_COMPAREC);
servosInit(&bank5, TIMER5_COMPAREB);
servosInit(&bank2, TIMER3_COMPAREB);
servosInit(&bank3, TIMER1_COMPAREB);
servosInit(&bank6, TIMER3_COMPAREC);
servosInit(&bank7, TIMER5_COMPAREA);
servosInit(&bank8, TIMER3_COMPAREA);
servosInit(&bank9, TIMER4_COMPAREA);
servosInit(&bank10, TIMER4_COMPAREB);
servosInit(&bank11, TIMER4_COMPAREC);
servosInit(&bank12, TIMER5_COMPAREC);
servosInit(&bank13, TIMER2_COMPAREA);  // <-- 8 bit Timer

When I searched for related questions, I got to know that 8 bit Timers have lesser "Steps", please correct me if I'm wrong: the servos can attain 13 specific positions? ..is it like that?

Even if so, I need to use 8 bit Timers (along with all other 16 bit Timers), since I have to have minimum number of servos in each bank* (hence I need more banks, with more Timers).

*otherwise, the servos do not hold tight ! (1 servo per bank = perfect)

Need help to get the 8-bit Timers work..

Thanks a lot..


Offline KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: Need help using 8 bit Timers
« Reply #1 on: March 05, 2010, 07:07:56 PM »
I remember the discussion.  I know the current version that I have does not allow servos to use an 8 bit timer (I verified that by looking at servopwm.c).

I think in the end he said he might consider it.

Kurt

Offline richiereynolds

  • Full Member
  • ***
  • Posts: 112
  • Helpful? 3
Re: Need help using 8 bit Timers
« Reply #2 on: March 06, 2010, 03:38:58 AM »
Here's the thread -

webbotlib and 8 bit timers
« Last Edit: March 06, 2010, 03:41:13 AM by richiereynolds »

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,132
  • Helpful? 108
Re: Need help using 8 bit Timers
« Reply #3 on: March 06, 2010, 01:36:02 PM »
@Hasan999

I won't be doing anything in WebbotLib until there are answers to the outstanding questions on your original post @ http://www.societyofrobots.com/robotforum/index.php?topic=10113.msg79612#msg79612

Notably:-
As Admin has said:- "you're supply will need to be capable of providing 22+ Amps".
Your earlier posts suggest you are using a 6v 3300maH battery and that it causes the processor to reset as soon as there is any load on the servos.

Others have said why this would be the case. ie a fully charged battery showing 7.2v with no load will NOT be 7.2v under a load - and that's your problem.

Things still point to your power supply being THE major problem. If I allow 8 bit timers to be used then this will NOT go away.

Equally you haven't answered Dunks very relevant question on that thread - which is a re-wording of an earlier question from me that you also never answered.

Look forward to your responses on that thread; since this is a kinda duplicate.  :)


Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here

data_list