Hello,
In my programm i got mapped variables like A=0x20 and B=0x21. At these positions is normaly 0 because it is cleared by porgrammstart. Everything works fine, till i use the ToString$(RTC_sec_1) - function.
In the assemblercode in found MOVWF FSR.
At wich position is the function in use? It seems so, like it is in my mapped area from0x20 till 0x29 in the PIC 16F876.
A LCD printout from the mapped register before stringfunction gives 0.
A LCD printout from the mapped register after stringfunction gives 138. => there is my variable overwritten!!
Who helps me?????????????????
"ToString" function overwrites mapped variables !!
Moderator: Benj
Re: "ToString" function overwrites mapped variables !!
Me again!
Same error occours with LCDPrintString macros.
In the string - routines might be somthing confused.
---later more
regards
Carsten
Same error occours with LCDPrintString macros.
In the string - routines might be somthing confused.
---later more
regards
Carsten
- 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: "ToString" function overwrites mapped variables !!
Hello,
Are you defining the mapped variables in the supplementary code window or are you defining them from a C code icon in the main flowchart window?
Are you defining the mapped variables in the supplementary code window or are you defining them from a C code icon in the main flowchart window?
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
Re: "ToString" function overwrites mapped variables !!
Hey,
It seems to be a solution. When i define mapped variables in the supplementary code window via "static char ..." everything is ok. In the C-Code Icon via volatile char or only char there are Problems!
Thanks for this help!
It seems to be a solution. When i define mapped variables in the supplementary code window via "static char ..." everything is ok. In the C-Code Icon via volatile char or only char there are Problems!
Thanks for this help!
- 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: "ToString" function overwrites mapped variables !!
I do not understand what is said above.
But I have the feeling that I have also a problem with tostring$ function.
I use it in a macro with Number a byte Num a string(6): .num= tostring$(.number). .number is an input variable, which I find to be zero afterwards.
Can someone help?
Jan Lichtenbelt
But I have the feeling that I have also a problem with tostring$ function.
I use it in a macro with Number a byte Num a string(6): .num= tostring$(.number). .number is an input variable, which I find to be zero afterwards.
Can someone help?
Jan Lichtenbelt
- 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: "ToString" function overwrites mapped variables !!
Hello,
v5 users please copy the attached file into your "Flowcode\v5\CAL\PIC\" folder and the problem should now be fixed.
It looks like we were overwriting the actual variable rather then taking a copy and then working with that.
If anyone is having this problem in v4 then please let me know.
v5 users please copy the attached file into your "Flowcode\v5\CAL\PIC\" folder and the problem should now be fixed.
It looks like we were overwriting the actual variable rather then taking a copy and then working with that.
If anyone is having this problem in v4 then please let me know.
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