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: 2020-12-24
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: SRAM
Downloaded: 1732 times
Not followed.
License: MIT license
nvSRAM Click is a compact add-on board that contains the most reliable nonvolatile memory. This board features the CY14B101J, a 1-Mbit nvSRAM organized as 128K words of 8 bits each with a nonvolatile element in each memory cell from Cypress Semiconductor.
Do you want to subscribe in order to receive notifications regarding "nvSRAM click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "nvSRAM click" changes.
Do you want to report abuse regarding "nvSRAM click".
Library Description
The library covers all the necessary functions to control nvSRAM Click board™. Library performs a standard I2C interface communication.
Key functions:
uint32_t nvsram_read_dev_id ( void )
- Read device ID function.void nvsram_memory_write ( uint32_t mem_adr, uint8_t *p_tx_data, uint16_t n_bytes )
- Write memory function.void nvsram_memory_read ( uint32_t mem_adr, uint8_t *p_rx_data, uint16_t n_bytes )
- Read memory function.Examples description
The application is composed of three sections :
void application_task ( )
{
mikrobus_logWrite( " Write data : ", _LOG_TEXT );
mikrobus_logWrite( demo_data, _LOG_TEXT );
nvsram_memory_write( 12345, &demo_data[ 0 ], 9 );
mikrobus_logWrite( "- - - - - - - - - - - -", _LOG_LINE );
Delay_ms( 100 );
mikrobus_logWrite( " Read data : ", _LOG_TEXT );
nvsram_memory_read( 12345, &read_data[ 0 ], 9 );
mikrobus_logWrite( read_data, _LOG_TEXT );
mikrobus_logWrite( "-----------------------", _LOG_LINE );
Delay_ms( 5000 );
}
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.