View Single Post
Old 04-14-2016, 01:43 AM   #2736 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
Interesting, the DC controller hugs 511 (100% duty) and suddenly loses power when "pulse width" hits 512. It shouldn't be able to hit 512. It must be a boundary issue. I probably need to clamp it above to make sure it doesn't go over 511. So, I bet it's trying to set the PWM duty outside the valid range, and it is causing the microcontroller to shut down. I'll look at the code and see how on earth it's hitting 512.

EDIT: Yep, that was the problem. OK I fixed it. I'll email it to you now.
__________________
kits and boards

Last edited by MPaulHolmes; 04-14-2016 at 02:47 AM..
  Reply With Quote
The Following User Says Thank You to MPaulHolmes For This Useful Post:
thingstodo (04-14-2016)