We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2019-11-04
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: FRAM
Downloaded: 3236 times
Not followed.
License: MIT license
The FRAM 3 Click is a Click boardâ„¢ that carries a ferroelectric RAM module. Ferroelectric RAM, also known as FRAM, is a non-volatile memory type, with characteristics that are comparable to much faster DRAM memory modules.
Do you want to subscribe in order to receive notifications regarding "FRAM 3 Click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "FRAM 3 Click" changes.
Do you want to report abuse regarding "FRAM 3 Click".
Library Description
Library provides control over reading and writing data via I2C module. You can use 2 specific functions for reading and writing to memory.
Key functions:
void fram3_read_data ( uint8_t *data_buf, uint8_t n_buf_size )
- Generic read data functionvoid fram3_write_data ( uint8_t *data_buf, uint8_t n_buf_size )
- Generic write data functionuint8_t fram3_read_free_access_memory ( uint8_t start_addr, uint8_t *data_buf, uint8_t n_buf_size )
- Memory read functionuint8_t fram3_write_free_access_memory ( uint8_t start_addr, uint8_t *data_buf, uint8_t n_buf_size )
- Memory write functionExamples description
The application is composed of three sections :
void application_task ( )
{
mikrobus_logWrite( " - Writing... ", _LOG_LINE );
Delay_ms( 500 );
status_check = fram3_write_free_access_memory( 0x00, &write_data[ 0 ], 7 );
if ( status_check == FRAM3_ERROR )
{
mikrobus_logWrite( " - ERROR WRITING!!! ", _LOG_LINE );
for ( ; ; );
}
mikrobus_logWrite( " - Reading... ", _LOG_LINE );
Delay_ms( 500 );
status_check = fram3_read_free_access_memory( 0x00, &read_data[ 0 ], 7 );
if ( status_check == FRAM3_ERROR )
{
mikrobus_logWrite( " - ERROR READING!!! ", _LOG_LINE );
for ( ; ; );
}
for ( cnt = 0; cnt < 7; cnt++ )
{
mikrobus_logWrite( &read_data[ cnt ], _LOG_BYTE );
Delay_ms( 100 );
}
mikrobus_logWrite( "", _LOG_LINE );
Delay_ms( 1000 );
mikrobus_logWrite( "__________________________", _LOG_LINE );
Delay_ms( 500 );
}
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.