Micro-Stepping Hurdle (Solved)
lardom
Posts: 1,659
After learning how to produce a DC sine wave with a counter in duty mode I wanted to see if I could use sine waves to drive a bipolar stepper. My idea was to use two counters in differential duty mode with the second counter shifted ninety degrees. My only requirement is that I have to be able to do it with one cog.
I found that CTRB would spike at 3.3V @E000 if any CTRA expressions were in the repeat loop. I had to comment all expressions associated with CTRA to get rid of the spike. My oscilloscope is dual trace so I have to move the probes around.
The first image is CTRA which is what I expected. The second is CTRB which shows the voltage spike. The third shows CTRA and CTRB with the 90° offset with that annoying glitch.
There's got to be a way to do it. I'm not ready to give up. I'm kind of hoping somebody has seen this and can suggest ways to solve the problem,
I found that CTRB would spike at 3.3V @E000 if any CTRA expressions were in the repeat loop. I had to comment all expressions associated with CTRA to get rid of the spike. My oscilloscope is dual trace so I have to move the probes around.
The first image is CTRA which is what I expected. The second is CTRB which shows the voltage spike. The third shows CTRA and CTRB with the 90° offset with that annoying glitch.
There's got to be a way to do it. I'm not ready to give up. I'm kind of hoping somebody has seen this and can suggest ways to solve the problem,
Comments