I changed from PIC16F877a to PIC18F4520. And to my big surprise a very easy string manupulation does give the wrong result. That means in Flowcode simulation the simulation works correct, but when down loaded into the PIC, I get just one, unpredicted symbol.
I programmed a moving string with 3 strings. This is a kind of Rolling Left with Carry over of the 3 strings. Moving the symbols in string1 is like:
Index2 = Index1 + 1
MenuString1[Index1] = MenuString1[Index2]
Carry over of string 2 into string 1:
Index2 = Len1 - 1 // Len1= length string 1
MenuString1[Index2] = MenuString2[0]
Using PIC18F4250 this carry over results or introduction in strange symbols, or leaving the last symbol of string1 unchanged. At the end you see the LCD completely filled with the silly symbol.
It sound like the solution must be simple, but I do not see it. Who can help?
Different behavious different PIC's
Moderator: Benj
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Different behavious different PIC's
Hello
Could be something to do with the configuration of the device. See if you have the extended CPU configuration options enabled and if so then try disabling it. Also check you do not have the Low Voltage Programming bit set and your program should work correctly.
Could be something to do with the configuration of the device. See if you have the extended CPU configuration options enabled and if so then try disabling it. Also check you do not have the Low Voltage Programming bit set and your program should work correctly.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: Different behavious different PIC's
What can the world becomes wonderfull. I disabled the ext CPU and LVP and it works! Thanks a lot.