View Single Post
Old Oct 03, 2011, 12:49 AM
simonk is offline
Find More Posts by simonk
hacker
Canada, BC, North Vancouver
Joined Dec 2010
944 Posts
Quote:
Originally Posted by bas10an View Post
Simon, consider doing a 200-1200ms (UltraPWM) version of the code and gain popularity with the Xaircraft users (poor guys).
Really, 200us-1200us? Just change MIN_RC_PULS to 100, MAX_RC_PULS to 1300, STOP_RC_PULS to 300ish, and it should just work. If you want no deadbands at each end, just adjust POWER_RANGE to 1000 to stretch it out; it's a fully-adjustable 16-bit range now.

I just pushed a newer version that corrects a few things and hopefully starts more smoothly with all motors at higher voltages. Most importantly, it lowers the duty cycle maximum based on timing even if no new pulse is received. This should prevent burning if the motor plants into the ground and the pulse wire or receiver breaks at the same time. Previously, it would have to wait ~1.5 seconds for the receive timeout to reset.

Also, it now runs the 8MHz boards at 16MHz by setting OSCCAL to 0xff (as far as I can tell, this is safe as long as we don't use the EEPROM without restoring it), so the same tree can now be used on boards with or without 16MHz oscillators without changing the code. From this, we also get the ability to support 800 PWM steps (or more at lower PWM cycle frequency).

timecop supplied a patch to restore I2C support, which I still need to merge. I'm wondering if there's a nice way to set the ID without having to make a new build for each controller. Has anybody seen any nice ways to do this?

As with all builds, please test carefully; I don't have a BlueSeries board to test with, and I just rewrote the PWM interrupt code again, so it may blow up, and YMMV.

Cheers!
simonk is offline Find More Posts by simonk
Reply With Quote