P1 BLDC Asm Question (Solved)
I'm working on a driver for a sensorless brushless motor. The motor will run in closed loop but I don't have a startup sequence yet. I have to spin it with my fingers. The screenshots of pin #8 shows a wider pulse at the higher speed and I don't know why it's happening. The one on the left is running at 75Hz and the pulse width is correct. Every pulse represents step 1 and 2 in a six step sequence. You can see where two equal sized pulses would fit between them.
On the right it's running in closed loop at 1.4Khz and the pulses are wider by half...or three steps wide.
Here is part of the code:
Loop or outa, step_1 waitpeq A_phase, A_phase 'comparators andn outa, step_1 or outa, step_2 waitpne B_phase, B_phase andn outa, step_2 or outa, step_3 waitpeq C_phase, C_phase andn outa, step_3 or outa, step_4 waitpne A_phase, A_phase andn outa, step_4 or outa, step_5 waitpeq B_phase, B_phase andn outa, step_5 or outa, step_6 waitpne C_phase, C_phase andn outa, step_6 jmp #Loop