1 Reply Latest reply on Feb 27, 2020 7:15 AM by JoMe_264151

    psoc 5lp and stepper motor serial control


      good day, i have a problem. i´m trying to drive my stepper by serial control.


      i save the variable in UART_PutChar(datorecibido). the value of variable is sent to the stepper. the stepper does receive a number but does not execute the variable, does not run the number of degrees i want.

      if you could help me modify my code.

        • 1. Re: psoc 5lp and stepper motor serial control

          Primary problem is that main() ends. Usually one uses a while(1) loop to repeat all needed statements. When main() ends the chip will get initialized again.

          Other provlem: Your interrupt handler is quite toolargr, just set a global flag in your handler which you check in the main-loop and act apon accordingly. And as a general rule: Do not use delays in an interrupt handler.