Society of Robots - Robot Forum

Software => Software => Topic started by: Admin on July 30, 2008, 08:22:06 PM

Title: got PWM code for ATmega640 or 2560?
Post by: Admin 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?
Title: Re: got PWM code for ATmega640 or 2560?
Post by: vidam 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?
Title: Re: got PWM code for ATmega640 or 2560?
Post by: JesseWelling 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...
Title: Re: got PWM code for ATmega640 or 2560?
Post by: Admin 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.
Title: Re: got PWM code for ATmega640 or 2560?
Post by: vidam 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.