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.
Last edited by MPaulHolmes; 04-14-2016 at 02:47 AM..
|