To record the data in memory, what is the correct format (Symtax)?
Thanks
Components 24LC512 Syntax error
-
- Posts: 7
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 2:57 am
-
- Valued Contributor
- Posts: 1453
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 707 times
Re: Components 24LC512 Syntax error
you need to pass an array - create new variable
say x[3] - select type array.
You can either set values in the Initial Value box {1,2,3} or use a calculation x[0] = 1 up to x[2] =value in this case..
Then pass 'x' as the data field.
Martin
say x[3] - select type array.
You can either set values in the Initial Value box {1,2,3} or use a calculation x[0] = 1 up to x[2] =value in this case..
Then pass 'x' as the data field.
Martin
-
- Valued Contributor
- Posts: 1453
- Joined: Wed Dec 09, 2020 9:37 pm
- Has thanked: 135 times
- Been thanked: 707 times
Re: Components 24LC512 Syntax error
Something like:
Which doesn't do anything - just read / write an array to the serial memory.
Oddly - the component doesn't export Init (or Initialise) - so checking the source code - each macro checks if 'inited' and does so if not. This is a trade off - extra code versus convenience. Here it only adds 4 conditionals and 4 macro calls -> I can see it being a good idea if handled carefully (who hasn't had a program fail because of a missed 'Init' call?) However - there is some overhead to it too?
Martin
Which doesn't do anything - just read / write an array to the serial memory.
Oddly - the component doesn't export Init (or Initialise) - so checking the source code - each macro checks if 'inited' and does so if not. This is a trade off - extra code versus convenience. Here it only adds 4 conditionals and 4 macro calls -> I can see it being a good idea if handled carefully (who hasn't had a program fail because of a missed 'Init' call?) However - there is some overhead to it too?
Martin