Hello
If the pic-ram is full,is there a way in flowcode ,build a " lookup table " for text e.g. text1 = "hallo1234567"
in the flash ?
Regards Wolfgang
lookup table
Moderator: Benj
-
saschech@gmx.de
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
- 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: lookup table
Hi Wolfgang
Yes this is possible,
You can do this via the EEPROM in the supplementary code -
#pragma DATA _EEPROM, "Example string1", "Example string2"
Or via the ROM using a C code icon
rom char *text = "Example string";
You would then need a small routine to fetch bytes and store into a Flowcode string or output directly to a LCD etc.
EEPROM - Using the EEPROM component.
ROM - Using something similar to the following where you have a loop and a count variable that is incrementing.
FCV_BYTE = text[FCV_COUNT];
Yes this is possible,
You can do this via the EEPROM in the supplementary code -
#pragma DATA _EEPROM, "Example string1", "Example string2"
Or via the ROM using a C code icon
rom char *text = "Example string";
You would then need a small routine to fetch bytes and store into a Flowcode string or output directly to a LCD etc.
EEPROM - Using the EEPROM component.
ROM - Using something similar to the following where you have a loop and a count variable that is incrementing.
FCV_BYTE = text[FCV_COUNT];
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
-
saschech@gmx.de
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
Re: lookup table
Hallo Benj
I have the following problem with a little testcode:
Licensed to wolfgang sachs under Single user Full License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only
text_in_flash.c
Starting preprocessor: C:\PROGRA~1\SOURCE~1\pp.exe D:\mplab_c18\project002\text_in_flash.c -i C:\PROGRA~1\SOURCE~1\include -d _PIC18F4620 -la -c2 -o D:\mplab_c18\project002\text_in_flash.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
......
D:\mplab_c18\project002\text_in_flash.c(109:13): error: unknown identifier 'text'
D:\mplab_c18\project002\text_in_flash.c(109:13): error: failed to generate expression
D:\mplab_c18\project002\text_in_flash.c(109:13): error: invalid operand 'text[FCV_COUNT]'
D:\mplab_c18\project002\text_in_flash.c(109:11): error: failed to generate expression
text_in_flash.c success
failure
Return code = 1
Please can you help?
Regards Wolfgang
I have the following problem with a little testcode:
Licensed to wolfgang sachs under Single user Full License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only
text_in_flash.c
Starting preprocessor: C:\PROGRA~1\SOURCE~1\pp.exe D:\mplab_c18\project002\text_in_flash.c -i C:\PROGRA~1\SOURCE~1\include -d _PIC18F4620 -la -c2 -o D:\mplab_c18\project002\text_in_flash.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
......
D:\mplab_c18\project002\text_in_flash.c(109:13): error: unknown identifier 'text'
D:\mplab_c18\project002\text_in_flash.c(109:13): error: failed to generate expression
D:\mplab_c18\project002\text_in_flash.c(109:13): error: invalid operand 'text[FCV_COUNT]'
D:\mplab_c18\project002\text_in_flash.c(109:11): error: failed to generate expression
text_in_flash.c success
failure
Return code = 1
Please can you help?
Regards Wolfgang
- Attachments
-
- text_in_flash.fcf
- (4.5 KiB) Downloaded 274 times
- 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: lookup table
Hi Wolfgang
Ok this is now compiling correctly. I think all I did to get it to compile was to remove the brackets from your C code icons.
Ok this is now compiling correctly. I think all I did to get it to compile was to remove the brackets from your C code icons.
- Attachments
-
- text_in_flash.fcf
- (5 KiB) Downloaded 298 times
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
-
saschech@gmx.de
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
-
saschech@gmx.de
- Posts: 714
- Joined: Wed Jan 31, 2007 12:41 pm
- Has thanked: 1 time
- Been thanked: 26 times
Re: lookup table
Hello Benj
To day , i want use the hi-tech compiler with "your modified code"and get the error 1:
File name: D:\mplab_c18\project001\text_in_flash.c
Generated by: Flowcode v4.2.3.58
Date: Monday, January 25, 2010 10:14:31
Licence: Professional
Registered to: WOLFGANG SACHS
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\HI-TECH Software\PICC-18\PRO\9.63\bin\picc18.exe --CHIP=18F4620 -N48 text_in_flash.c
text_in_flash.c: main()
583: rom char *text = "Example string";
^ (192) undefined identifier "rom"
^ (195) expression syntax
602: FCV_BYTE = text[FCV_COUNT];
^ (192) undefined identifier "text"
(981) pointer required ^
(981) pointer required ^
HI-TECH C PRO for the PIC18 MCU Family V9.63PL3
Copyright (C) 1984-2009 HI-TECH SOFTWARE
Employing 18F4620 errata work-arounds:
* Corrupted fast interrupt shadow registers
* Data in RAM location can be corrupted if async. reset occurs during write
(908) exit status = 1
Return code = 1
Flowcode konnte den C-Kode des Flussdiagramms nicht kompilieren, da folgende Fehler auftraten:
Wenn Ihr Flussdiagramm C-Kode enthält,überprüfen Sie diesen sorgfältig. Falls das Flussdiagramm keinen C-Kode enthält oder Sie sich sicher sein können, dass dieser Kode fehlerfrei ist, dann wenden Sie sich an den technischen Support.
FINISHED
Regards wolfgang
To day , i want use the hi-tech compiler with "your modified code"and get the error 1:
File name: D:\mplab_c18\project001\text_in_flash.c
Generated by: Flowcode v4.2.3.58
Date: Monday, January 25, 2010 10:14:31
Licence: Professional
Registered to: WOLFGANG SACHS
http://www.matrixmultimedia.com
Launching the compiler...
C:\Program Files\HI-TECH Software\PICC-18\PRO\9.63\bin\picc18.exe --CHIP=18F4620 -N48 text_in_flash.c
text_in_flash.c: main()
583: rom char *text = "Example string";
^ (192) undefined identifier "rom"
^ (195) expression syntax
602: FCV_BYTE = text[FCV_COUNT];
^ (192) undefined identifier "text"
(981) pointer required ^
(981) pointer required ^
HI-TECH C PRO for the PIC18 MCU Family V9.63PL3
Copyright (C) 1984-2009 HI-TECH SOFTWARE
Employing 18F4620 errata work-arounds:
* Corrupted fast interrupt shadow registers
* Data in RAM location can be corrupted if async. reset occurs during write
(908) exit status = 1
Return code = 1
Flowcode konnte den C-Kode des Flussdiagramms nicht kompilieren, da folgende Fehler auftraten:
Wenn Ihr Flussdiagramm C-Kode enthält,überprüfen Sie diesen sorgfältig. Falls das Flussdiagramm keinen C-Kode enthält oder Sie sich sicher sein können, dass dieser Kode fehlerfrei ist, dann wenden Sie sich an den technischen Support.
FINISHED
Regards wolfgang
- 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: lookup table
Hi Wolfgang
The C code I gave you was BoostC specific. If you want to do the same thing on HITECH then you will need to have a look through the manual to find the relevant commands. Let me know if you get stuck and Ill have a look for you.
The C code I gave you was BoostC specific. If you want to do the same thing on HITECH then you will need to have a look through the manual to find the relevant commands. Let me know if you get stuck and Ill have a look for you.
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