Different behavious different PIC's

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
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:

Different behavious different PIC's

Post by Jan Lichtenbelt »

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?

User avatar
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

Post by Benj »

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.

User avatar
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

Post by Jan Lichtenbelt »

What can the world becomes wonderfull. I disabled the ext CPU and LVP and it works! Thanks a lot.

Post Reply