Hybrid View
-
01-12-2013 #1
Indeed it doesn't happen consistently, it's a spurious thing, a few smooth starts and then you get two or three with glitches, then back to smooth starts again. Also I get those dreaded positioning errors again, which forces me to power cycle the driver. If it was only glitches on ramp up I'd be willing to let it go, but it causes positioning errors, which stops the whole thing from running, so I need to resolve it.
Regards,
dsc.
-
01-12-2013 #2
Kudos to Jonathan for recommending the logic analyser, here's what I've found on the PWM channel:
This was due to the fact that I was updating the PR2 without waiting for the PWM cycle to finish (I was doing that before, but you need to clear the TMR2IF flag before you go into the while loop; normally the flag gets set and sits like that forever, unless the TMR2 interrupt is enabled). I've now changed the code slightly and voila! no glitches.
Regards,
dsc.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
BUILD LOG: operation cnc
By kingcreaky in forum DIY Router Build LogsReplies: 174Last Post: 14-08-2013, 06:14 PM -
maximum deflection - sanity check
By dsc in forum Gantry/Router Machines & BuildingReplies: 6Last Post: 11-02-2013, 09:33 AM -
sanity check - constant running, loads and more
By dsc in forum Stepper & Servo MotorsReplies: 4Last Post: 26-11-2012, 12:26 PM -
Toroidal transformer voltages - sanity check needed!
By m_c in forum General ElectronicsReplies: 16Last Post: 03-10-2011, 08:34 PM -
I am questioning my sanity....
By irving2008 in forum General DiscussionReplies: 16Last Post: 11-02-2010, 01:15 PM
Bookmarks