How do I size my arrays with Boost C 7.04 version?
-
- Posts: 59
- Joined: Thu Aug 23, 2012 10:37 am
- Has thanked: 14 times
- Been thanked: 3 times
How do I size my arrays with Boost C 7.04 version?
Hello everybody:
It is possible to make arrays with Boot C 7.04 for PIC, but I don't know what does this sentence exactly "The only constrains is that an array must fit into a single RAM bank" mean??
In PIC guide I had found this for Data Memory (RAM memory) "Each bank extendes up to 7Fh, 128 bytes"
Does this mean that a array's size couldn't exceed the 128 bytes?? But Does the array's size be smaller than 128 bytes??
Thanks in advanced
Regards
It is possible to make arrays with Boot C 7.04 for PIC, but I don't know what does this sentence exactly "The only constrains is that an array must fit into a single RAM bank" mean??
In PIC guide I had found this for Data Memory (RAM memory) "Each bank extendes up to 7Fh, 128 bytes"
Does this mean that a array's size couldn't exceed the 128 bytes?? But Does the array's size be smaller than 128 bytes??
Thanks in advanced
Regards
Carmen Garcia
- 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: How do I size my arrays with Boost C 7.04 version?
Hello,
8-bit PICs have a restricted RAM page size of 256 bytes so this is your limitation. Arrays smaller then or equal to 256 bytes should work fine.
There is a way to allow larger arrays using the idx2 parameter as described here.
http://www.matrixmultimedia.com/mmforum ... ays#p39852
8-bit PICs have a restricted RAM page size of 256 bytes so this is your limitation. Arrays smaller then or equal to 256 bytes should work fine.
There is a way to allow larger arrays using the idx2 parameter as described here.
http://www.matrixmultimedia.com/mmforum ... ays#p39852
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
-
- Posts: 59
- Joined: Thu Aug 23, 2012 10:37 am
- Has thanked: 14 times
- Been thanked: 3 times
Re: How do I size my arrays with Boost C 7.04 version?
Hi Benj:
But in my PIC's guide appears "Each bank extendes up to 7Fh, 128 bytes"...
Please, another question:
I created this C code in a C FlowCode v5 Macro:
MX_UINT8 Array[20][17];
Array[1][1]=0xff;
FCV_Valor= Array[1][1]=0xff;
And the "Valor" variable doesn't set to 0xff.
Thanks you very much Benj.
Regards
But in my PIC's guide appears "Each bank extendes up to 7Fh, 128 bytes"...
Please, another question:
I created this C code in a C FlowCode v5 Macro:
MX_UINT8 Array[20][17];
Array[1][1]=0xff;
FCV_Valor= Array[1][1]=0xff;
And the "Valor" variable doesn't set to 0xff.
Thanks you very much Benj.
Regards
Carmen Garcia
- 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: How do I size my arrays with Boost C 7.04 version?
Hello,
Flash banks are 128 bytes, RAM banks are 256 bytes.
What about this instead.
20 x 17 = 340 bytes which is over then 256 page limit!
Flash banks are 128 bytes, RAM banks are 256 bytes.
What about this instead.
Code: Select all
MX_UINT8 Array[5][5];
Array[1][1]=0xff;
FCV_VALOR = Array[1][1];
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
-
- Posts: 59
- Joined: Thu Aug 23, 2012 10:37 am
- Has thanked: 14 times
- Been thanked: 3 times
Re: How do I size my arrays with Boost C 7.04 version?
I need to sleep....
Thanks you very much¡
Regards
Thanks you very much¡
Regards
Carmen Garcia
-
- Posts: 59
- Joined: Thu Aug 23, 2012 10:37 am
- Has thanked: 14 times
- Been thanked: 3 times
Re: How do I size my arrays with Boost C 7.04 version?
Hello Benj:
I have set right the array's size for the appropiate use of RAM:
MX_UINT8 n=10;
MX_UINT8 Id=17;
MX_UINT8 Neighbor_Table[n][Id];
Neighbor_Table[1][1]=0xff;
FCV_VALOR = Neighbor_Table[1][1];
I suspect the type of variables doesn't match because I am using the portions of C Code I seen in the Main Code (putting in C View...)
I don't found a explicit guide for to create C code in C FlowCode Macro¡¡
Thanks you very much
Regards
I have set right the array's size for the appropiate use of RAM:
MX_UINT8 n=10;
MX_UINT8 Id=17;
MX_UINT8 Neighbor_Table[n][Id];
Neighbor_Table[1][1]=0xff;
FCV_VALOR = Neighbor_Table[1][1];
I suspect the type of variables doesn't match because I am using the portions of C Code I seen in the Main Code (putting in C View...)
I don't found a explicit guide for to create C code in C FlowCode Macro¡¡
Thanks you very much
Regards
Last edited by Carmen Garcia on Thu Apr 11, 2013 7:07 pm, edited 1 time in total.
Carmen Garcia
-
- Posts: 59
- Joined: Thu Aug 23, 2012 10:37 am
- Has thanked: 14 times
- Been thanked: 3 times
Re: How do I size my arrays with Boost C 7.04 version?
I know what happens...The C Code doesn't simulate in FlowCode.
Really does not exist a way for simulate the C code?
I was lookin for a Boost C simulator in the FlowCode Program Drectory (...\Flowcode\Tools\boostc\) but I didn't see anything.
Now I download a simulator from the official site, SourceBoost.
Any incovenience? Other alternatives?
Thanks¡
Regards
Really does not exist a way for simulate the C code?
I was lookin for a Boost C simulator in the FlowCode Program Drectory (...\Flowcode\Tools\boostc\) but I didn't see anything.
Now I download a simulator from the official site, SourceBoost.
Any incovenience? Other alternatives?
Thanks¡
Regards
Carmen Garcia
Re: How do I size my arrays with Boost C 7.04 version?
HI Carmen
I think Martin uses a program called pic simulator do a search on this forum as martin has linked to it quite a few times, i think you compile to hex then load the hex into the sim and away you go
Regards
Dazz
I think Martin uses a program called pic simulator do a search on this forum as martin has linked to it quite a few times, i think you compile to hex then load the hex into the sim and away you go
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
Re: How do I size my arrays with Boost C 7.04 version?
hi Carmen
Heres a link to the sim mentioned above post by enamul http://www.matrixmultimedia.com/mmforum ... tin#p38159
Regards
Dazz
Heres a link to the sim mentioned above post by enamul http://www.matrixmultimedia.com/mmforum ... tin#p38159
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php
-
- Posts: 59
- Joined: Thu Aug 23, 2012 10:37 am
- Has thanked: 14 times
- Been thanked: 3 times
Re: How do I size my arrays with Boost C 7.04 version?
Thanks very much Dazz, but I not got much time and this simulator requires very much for learn...Finally I have opted for NO 2 dimensions arrays.
Thanks very much everybody.
Regards.
Thanks very much everybody.
Regards.
Carmen Garcia