FRAM COMPONENT

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
BenR
Matrix Staff
Posts: 2053
http://meble-kuchenne.info.pl
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 545 times
Been thanked: 729 times

Re: FRAM COMPONENT

Post by BenR »

I have implemented a component for v11 which is now tested and working.

I've not looked at Martin's code yet and so there may be things there that would be good to bring into the component but let me know if there's anything lacking.

As always many thanks to Martin for providing his time to give a v10 solution for the community.

max.tisc
Posts: 146
Joined: Thu Dec 10, 2020 5:40 pm
Been thanked: 11 times

Re: FRAM COMPONENT

Post by max.tisc »

Hi,
great work, will you also make a version for FC10?

BenR
Matrix Staff
Posts: 2053
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 545 times
Been thanked: 729 times

Re: FRAM COMPONENT

Post by BenR »

Hello,

I probably won't release for v10 no.

But there's likely not a lot I can do if you were to download the component in v11 and transfer it into v10 yourself ;)

mnfisher
Valued Contributor
Posts: 1763
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 148 times
Been thanked: 831 times

Re: FRAM COMPONENT

Post by mnfisher »

Thanks Ben,

Is the component source on the wiki yet? - I did have a brief look and didn't find it...

Martin

BenR
Matrix Staff
Posts: 2053
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 545 times
Been thanked: 729 times

Re: FRAM COMPONENT

Post by BenR »

Hi Martin,

Thanks for letting me know. I have now pushed all the latest component changes to the wiki and written a script so filtering out all the bits that need pushing is now far easier to keep track of :D

I need to refresh the main components index page which I'll do in the new year but all the new component pages and source files should be up to date now.

Here's the page you were looking for.
https://www.flowcode.co.uk/wiki/index.p ... C_(EEPROM)

mnfisher
Valued Contributor
Posts: 1763
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 148 times
Been thanked: 831 times

Re: FRAM COMPONENT

Post by mnfisher »

Thanks Ben - will take a look...

This is where I got to - now with a Write String, Int and Long array macros - and their read equivalents.
Tested on an Arduino (but also compiled for a PIC16F18877) using v10.

Have tested the (and here using just 4 value writes) - Int and Long versions. And looks good at UART and on logic analyser.

The String read is actually the slowest - and here are two versions - one which will read to a maximum number of bytes and one which looks for the termination character (\0)

Note that the arduino stores data in memory is LSB..MSB format - so values written as an int for '1' - is 1, 0 - but the FRAM chip expects the address in MSB LSB format - so address 1000 is 3, 0xE8 - which looks odd (on the 'scope) - but is correct (and the read will work - as long as you don't try and change types - or change MCUs :-) )

The WriteLongArray - the argument is MX_UINT32 **PFCL_DATA - which might vary with different MCUs?

Martin
Attachments
FRAM_2.fcfx
(51.46 KiB) Downloaded 8 times

Post Reply