Components 24LC512 Syntax error

Post and discuss new components that you have created.
Post Reply
Monaga
Posts: 7
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 2:57 am

Components 24LC512 Syntax error

Post by Monaga »

To record the data in memory, what is the correct format (Symtax)?

Thanks
Attachments
FCV10 24LC512.png
FCV10 24LC512.png (58.79 KiB) Viewed 2816 times

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: Components 24LC512 Syntax error

Post 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

Monaga
Posts: 7
Joined: Mon Dec 07, 2020 2:57 am

Re: Components 24LC512 Syntax error

Post by Monaga »

Dear Martin:

Do you have an example you can share?

Thank you

Monaga
Posts: 7
Joined: Mon Dec 07, 2020 2:57 am

Re: Components 24LC512 Syntax error

Post by Monaga »

Can somebody help me?

Thanks

mnfisher
Valued Contributor
Posts: 953
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 104 times
Been thanked: 507 times

Re: Components 24LC512 Syntax error

Post by mnfisher »

Something like:
memchip.fcfx
(9.85 KiB) Downloaded 153 times
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

Post Reply