Page 1 of 1
Components 24LC512 Syntax error
Posted: Fri Aug 25, 2023 4:27 am
by Monaga
To record the data in memory, what is the correct format (Symtax)?
Thanks
Re: Components 24LC512 Syntax error
Posted: Fri Aug 25, 2023 6:31 am
by mnfisher
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
Re: Components 24LC512 Syntax error
Posted: Sat Aug 26, 2023 5:13 am
by Monaga
Dear Martin:
Do you have an example you can share?
Thank you
Re: Components 24LC512 Syntax error
Posted: Wed Sep 06, 2023 5:13 am
by Monaga
Can somebody help me?
Thanks
Re: Components 24LC512 Syntax error
Posted: Wed Sep 06, 2023 8:06 am
by mnfisher
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