Or!! even there..
I have spent the last week or so on an issue.. I currently use an IDE from Proteus and it serves me well. and my recent project requires an LED bargraph.. I have 4 spare pins and set up a 10 LED charlieplexed bargraph.. It works very well and the LED's are bright enough and I have the refresh on timer0 set to 2mS a piece which gets me 50hz and all's good.
The second part of the project is serial RS485 component input ... Both running on the same interrupt The serial worked but the bargraph failed... So I set up High / Low priority... Still the same.. When debugging I noticed that in the interrupt routine, TRISB ( high ) wasn't being set... I have a 11 char array to hold the tristate of each LED and a second to reverse the bits to LIGHT the correct LED.. After many hours I decided to port the whole shabang to MPLABX whereas it worked first time as expected... Ye gods I thought.. The text editor in the Proteus IDE is screwing everything up... Went back to Proteus... Still in op.
Phoned the guy's at Proteus who immediately jumped into action.. They couldn't reproduce the error...
So.... MPLABX compiles the file and links the file and the file is good.. Proteus doesn't ( Same code ).
The guy at Proteus just got back to me and said he couldn't find the issue, but he did notice that a string buffer I was using was one byte too short. I checked said buffer and it had no influence on the result, but it made me think..
In the serial interrupt I have another string buffer that was 10 characters too small.. In the interrupt I clear the buffer in a 0 ~ 29 loop... The buffer is only 20 chars... Guess where Proteus links the buffer..... MPLABX links it slightly different and didn't affect my TRISB table... But as Proteus lists alphabetically... Bugger..
I have spent the last week or so on an issue.. I currently use an IDE from Proteus and it serves me well. and my recent project requires an LED bargraph.. I have 4 spare pins and set up a 10 LED charlieplexed bargraph.. It works very well and the LED's are bright enough and I have the refresh on timer0 set to 2mS a piece which gets me 50hz and all's good.
The second part of the project is serial RS485 component input ... Both running on the same interrupt The serial worked but the bargraph failed... So I set up High / Low priority... Still the same.. When debugging I noticed that in the interrupt routine, TRISB ( high ) wasn't being set... I have a 11 char array to hold the tristate of each LED and a second to reverse the bits to LIGHT the correct LED.. After many hours I decided to port the whole shabang to MPLABX whereas it worked first time as expected... Ye gods I thought.. The text editor in the Proteus IDE is screwing everything up... Went back to Proteus... Still in op.
Phoned the guy's at Proteus who immediately jumped into action.. They couldn't reproduce the error...
So.... MPLABX compiles the file and links the file and the file is good.. Proteus doesn't ( Same code ).
The guy at Proteus just got back to me and said he couldn't find the issue, but he did notice that a string buffer I was using was one byte too short. I checked said buffer and it had no influence on the result, but it made me think..
In the serial interrupt I have another string buffer that was 10 characters too small.. In the interrupt I clear the buffer in a 0 ~ 29 loop... The buffer is only 20 chars... Guess where Proteus links the buffer..... MPLABX links it slightly different and didn't affect my TRISB table... But as Proteus lists alphabetically... Bugger..