Page 3 of 3 FirstFirst 123
  1. #21
    dsc's Avatar
    Lives in Lincoln, United Kingdom. Last Activity: 19 Hours Ago Has been a member for 5-6 years. Has a total post count of 248. Received thanks 1 times, giving thanks to others 9 times.
    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.

  2. #22
    dsc's Avatar
    Lives in Lincoln, United Kingdom. Last Activity: 19 Hours Ago Has been a member for 5-6 years. Has a total post count of 248. Received thanks 1 times, giving thanks to others 9 times.
    Kudos to Jonathan for recommending the logic analyser, here's what I've found on the PWM channel:

    Click image for larger version. 

Name:	PWM_analyse.png 
Views:	53 
Size:	34.3 KB 
ID:	10926

    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.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. BUILD LOG: operation cnc
    By kingcreaky in forum DIY Router Build Logs
    Replies: 174
    Last Post: 14-08-2013, 06:14 PM
  2. maximum deflection - sanity check
    By dsc in forum Gantry/Router Machines & Building
    Replies: 6
    Last Post: 11-02-2013, 09:33 AM
  3. sanity check - constant running, loads and more
    By dsc in forum Stepper & Servo Motors
    Replies: 4
    Last Post: 26-11-2012, 12:26 PM
  4. Toroidal transformer voltages - sanity check needed!
    By m_c in forum General Electronics
    Replies: 16
    Last Post: 03-10-2011, 08:34 PM
  5. I am questioning my sanity....
    By irving2008 in forum General Discussion
    Replies: 16
    Last Post: 11-02-2010, 01:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •