- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Bob