Author Topic: got PWM code for ATmega640 or 2560?  (Read 4497 times)

0 Members and 1 Guest are viewing this topic.

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
got PWM code for ATmega640 or 2560?
« on: July 30, 2008, 08:22:06 PM »
AVRlib only has PWM for the ATmega8 and ATmega128, but I need something that opens up all the PWM ports and timers for the ATmega640/2560.

I'm currently using timerx8.c, but it's definitely lacking . . .

Anyone got code to share?

Offline vidam

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: got PWM code for ATmega640 or 2560?
« Reply #1 on: August 11, 2008, 06:40:43 PM »

I am writing code for the Axon that reads in incoming RC signal and converts it to PWM. When it is finished, you can have a copy?
« Last Edit: August 12, 2008, 01:17:33 AM by vidam »

Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: got PWM code for ATmega640 or 2560?
« Reply #2 on: August 11, 2008, 09:49:16 PM »
I've been trying to object orient a solution but I've also had a lot else on my plate... I'll redouble my efforts as soon as I can...

Offline AdminTopic starter

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: got PWM code for ATmega640 or 2560?
« Reply #3 on: August 11, 2008, 09:56:19 PM »
I plan to work on it all this week actually.

I got this to work finally:
http://www.societyofrobots.com/axon/axon_function_list.shtml#pwm

But still lots of bugs, its not user friendly enough for me, and the registries are confusing me like a barrel of monkies.

Offline vidam

  • Supreme Robot
  • *****
  • Posts: 423
  • Helpful? 1
  • Robotronics.org
    • DC/MD/VA Robotics and Automation Team
Re: got PWM code for ATmega640 or 2560?
« Reply #4 on: August 12, 2008, 01:20:02 AM »


[edit]
The code I am writing will read incoming RC (PWM) signals and output the PWM signal to Sabertooth to be completed and tested later tomorrow.

« Last Edit: August 12, 2008, 01:42:40 AM by vidam »

 


data_list