Just a little footnote...the debug command creates delay, which is significant in my PIC program.
Basically, I have a coil winder program (the PIC counts pulses from magnets mounted on a spinning motor & then the PIC pulses out to a stepper which turns a helix (this feeds copper onto the main turning motor - a bit like this from 20secs in )
Anyway, without any debug in my code...I get a nice neat wind of copper. But as soon as I use debug...the helix feeding copper wire onto the main turning motor, doesn't keep up ...end result is a lumpy wound coil - as soon as I take out the debug command...it runs fine again.
This is a real downer, because I was using my new found 'Debug' method to put out important info onscreen (No of turns, number of steps until traversal changes direction etc).
What are my options here?
(I'm trying to avoid having to build a logic circuit to keep track of the PIC output pulses using hardware counters!)
Bookmarks