![]() |
printf causes programs to not run
I was trying to setup a printf command in user routines fast, but when i upload it to the robot it gets stuck in program mode,
I used Jifi to upload it, i also use mplab running under wine to compile. |
Re: printf causes programs to not run
The fast loop, I believe, can't support the printf function, simply because it is a very fast loop. The printf takes a lot of time (relaying info through your serial) so the print is being called way too fast for it to finish, and causes the program error.
Should be able to fix by calling only by a timer interrupt, or when a loop count is divisible by fifty, (to call every fiftieth loop or something), or maybe use the slow loop? |
Re: printf causes programs to not run
Quote:
Quote:
|
Re: printf causes programs to not run
how do i post a forum?
|
Re: printf causes programs to not run
Quote:
|
Re: printf causes programs to not run
i am confused on how to get this to work,
i have to it only is supost to show every 1000000 times the code runs. |
Re: printf causes programs to not run
tomorrow i will try using the default prgoram with the controller to see if it work with printf, could the problem be that my computer is not being able to handle the printf when it recieves it back?
|
| All times are GMT -5. The time now is 13:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi