Read/Writing to a FRAM

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi everyone,

I'm working on a digital control system to work with amplifiers and I need to read and write to a FRAM chip using a microcontroller. I'm new to the world of writing to memory devices so I'm not to sure how to structure it in C.

The datasheet is here:
www.ramtron.com/files/datasheets/FM22L16ds_r1.2.pdf

Now for the reading I can see that there is a data holding time and data accessing time when the address is changed, meaning this can easily be set up with delays.

but the writing process can not be controlled solely by changing address (while holding WE and CE down)?

From this I take it that the easiest way to write to these devices is to toggle the WE pin after the address has been selected.

Thanks for the help
 
but the writing process can not be controlled solely by changing address (while holding WE and CE down)?

It does seem to suggest that you can write by just changing address on the first page, but this may just be the column address A1:0.

You can see the write cycle timing on page 11 of the datasheet, and on page 4, 'Writes occur in the FM22L16 in the same time interval as reads. The FM22L16 supports both /CE- and /WE-controlled write cycles. In both cases, the address A(17:2) is latched on the falling edge of /CE.'

You just need to read the datasheet in detail. It's got a paging address system, addresses A17:2 are latched and A1:0 select one of 4 bytes for fast access. There are also upper (/UB) and lower (/LB) byte enables.

It's probably best to write that bit of the code in inline assembler to guarantee the timing. Otherwise you want to be able to examine the assembly language before it goes to the linker, or whatever, depending on the workflow of the particular compiler and device.

A bit of experimentation usually clarifies what is going on. You might want to build a prototype jig to work out any problems. You can build on some LEDs for debugging. A scope helps, and a logic analyser is better but unless it's a complex system most issues can be worked out with a bit of ingenuity. You can even use switches to latch data in and out to make sure things are working the way you think.

Which controller/processor are you intending to use? Obviously some have dedicated address, data and memory pins, some are self contained in terms of program memory and just have I/O pins. Why do you need this part? Most microcontrollers have some static memory onboard.

w
 
Unk,
I'm not sure why you would want to go through the hassle of using FRAM. There's a good reason they haven't been adopted more widely by industry.... ;-)

If you need non-volatile memory and have a choice, why not serial flash or battery-backed static RAM? Both are much easier to interface to a micro and are much easier to write software for.

Just a thought...
Bill
 
Thanks wakibaki, I had read through the data sheet but it did not seem to make sense to me at the time, now with you comments its make much more sense!

I've already got the parts so I will go ahead and start experimenting, thanks for the suggestions on building a prototype jig, pretty sure this will be indispensable.

I will be using the MPLAB IDE so will have access to assembly code, I'm hoping I don't need this though.

I will let you know how i get on soon
 
Unk,
I'm not sure why you would want to go through the hassle of using FRAM. There's a good reason they haven't been adopted more widely by industry.... ;-)

If you need non-volatile memory and have a choice, why not serial flash or battery-backed static RAM? Both are much easier to interface to a micro and are much easier to write software for.

Just a thought...
Bill

Boy, how wrong can you be. FRAM has always tried to use standard interfaces to be drop-in compatible with parallel and serial memories. The only reason why they havent seen more popularity is simply they cost more than EEPROM, BBSRAM, or flash equivalents. The FM22L16 is a very standard parallel SRAM type interface. The beauty of FRAM is that they are as close to the "ideal" NVM as you can get, very high write endurance, fast writes, low power. No polling required like serial EEPROM.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.