Hi
I need to initialize very large array, up to 2048 value.
The data are in this format
ARRAY [] =
0x00, 0x00, 0x00, 0x00, 0x00,
0xFE, 0xE0, 0x00, 0x00, 0x00
0xFF, 0x5C, 0x00, 0x00, 0x00,
0xFF, 0xF5, 0x08, 0x20, 0x00,
0xFF, 0x38, 0x00, 0x00, 0x00,
0xFF, 0x80, 0x00, 0x00, 0x00,
I initialized the array with the C code using this instruction
array [430] = {0x00, 0xFF ....};
but without success.
The compilation does not report errors, but the array is not initialized
any suggestions?
Thanks in advance
How to initialize large Array
Moderator: Benj
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: How to initialize large Array
What is your target device? The Lookup component is probably what you are looking for.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: How to initialize large Array
Hi Kersing
my target devide is dsp, specifically the ram.
I need to perform several configuration writes, but for the two larger ones, which are the program and the parameters I need two different arrays.
By checking the forum I saw that they were postponed for the lookuptable but I can not figure out how to make it work.
Data from these arrays must be transmitted via i2c.
I have already tried to communicate a single byte with the dsp and it works correctly, as I have tested the sending of a small array and that has worked too.
How do I pass the values of this lookup table to the i2c macro?
my target devide is dsp, specifically the ram.
I need to perform several configuration writes, but for the two larger ones, which are the program and the parameters I need two different arrays.
By checking the forum I saw that they were postponed for the lookuptable but I can not figure out how to make it work.
Data from these arrays must be transmitted via i2c.
I have already tried to communicate a single byte with the dsp and it works correctly, as I have tested the sending of a small array and that has worked too.
How do I pass the values of this lookup table to the i2c macro?
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: How to initialize large Array
For target device I mean which controller do you want to use? PIC 8 bit, PIC 16 bit, ARM, Atmel?
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
Re: How to initialize large Array
Hello everyone
I update you about the initialization of a large array.
I was able , through the use a lookup table, to initialize an array and to program the external memory!
I update you about the initialization of a large array.
I was able , through the use a lookup table, to initialize an array and to program the external memory!