|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Printf's cause code violation
Whenever there is a printf statement in code the code violation light blinks slowly. It happens regardless of what variable types I'm printing, or even if its just text. Has anyone else had this problem?
This is on the 2006 controller using MPLAB + IFI Loader. I have the proper serial port selected in IFI Loader, and Baud rate is 115200. Error occurs regardless of where the printf is. |
|
#2
|
||||
|
||||
|
Re: Printf's cause code violation
I've seen this before if the loop is too fast it can make the processor angry.
We saw this in early testing when we wrote the first version of easyC Add a small delay in the loop and see if that helps. |
|
#3
|
||||
|
||||
|
Re: Printf's cause code violation
Can you post the code that is causing the issue?
If not, I think I had an issue like that when I switched to Kevin's code, but I don't remember what I did to fix it. |
|
#4
|
||||
|
||||
|
Re: Printf's cause code violation
Quote:
-Kevin |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| URGENT - Code Violation | CPress | Programming | 5 | 09-02-2007 23:26 |
| Modified default code gives "code violation" | scottmso | Programming | 8 | 10-02-2006 23:17 |
| Code Violation when testing | chris_chen | Programming | 0 | 24-01-2006 20:28 |
| Code violation using Hall effect sensor | pickle | Programming | 9 | 19-01-2005 00:10 |
| code violation...need help | Vince lau | Programming | 4 | 20-02-2004 16:31 |