Author Topic: PWM question  (Read 1682 times)

0 Members and 1 Guest are viewing this topic.

Offline totalisTopic starter

  • Full Member
  • ***
  • Posts: 89
  • Helpful? 0
PWM question
« on: November 03, 2010, 03:51:17 PM »
I hve been using software PWM with alot of success, however i cannot get the same results using hardware PWM. i have tried several different methods, with both Webbotlib and Admins code. I have even tried using the Webbot Project Designed with my own custom board file.  When using the designer, it will only allow me to select either pins B1 or B2 for hardware PWM output, both of which are in use as indicator LED's.

Here is board file
http://dl.dropbox.com/u/5224931/GregDuino.brd
and Project file
http://dl.dropbox.com/u/5224931/GregDuino.prj


Any help is appreciated

T

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: PWM question
« Reply #1 on: November 03, 2010, 06:02:13 PM »
Guess you're trying to use hardware PWM for servos - in which case it needs a 16 bit timer. On the ATMega168 that means Timer1 on output pins B1 and B2. The other timers are only 8 bit.
Nothing WebbotLib can do about that - thats what the hardware dictates
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline totalisTopic starter

  • Full Member
  • ***
  • Posts: 89
  • Helpful? 0
Re: PWM question
« Reply #2 on: November 04, 2010, 02:55:32 PM »
Webbot, that was everything i needed to know! as always you have been very helpful :)

Thank you once again

T

 


Get Your Ad Here

data_list