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: 2018-11-13
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: FRAM
Downloaded: 3891 times
Not followed.
License: MIT license
Excelon LP click carries a ferroelectric RAM module. Ferroelectric RAM, also known as FRAM, is a non-volatile memory type, with characteristics comparable to much faster DRAM memory modules. It is a much faster alternative to common serial FLASH and EEPROM modules which use the conventional technologies.
Do you want to subscribe in order to receive notifications regarding "Excelon-LP click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Excelon-LP click" changes.
Do you want to report abuse regarding "Excelon-LP click".
Library Description
The library initializes and defines the SPI bus driver and drivers that offer a choice for writing data in memory and reading data from memory.
Key functions:
void excelonlp_sendCommand(uint8_t opcode)
- Functions for send opcode commandvoid excelonlp_readData(uint8_t opcode, uint8_t *OUTBuf, uint8_t nData)
void excelonlp_writeMemoryData(uint8_t opcode, uint32_t addr, uint8_t _data)
uint8_t excelonlp_readMemoryData(uint8_t opcode, uint32_t addr)
Examples description
The application is composed of the three sections :
void applicationTask()
{
mikrobus_logWrite("Read Device ID : ", _LOG_TEXT);
excelonlp_sendCommand(_EXCELONLP_OPCODE_SET_WRITE_ENABLE_LATCH);
excelonlp_readData(_EXCELONLP_OPCODE_READ_DEVICE_ID, &OUTBuf[0], 9);
for(cnt = 0; cnt < 9; cnt++)
{
IntToHex(OUTBuf[cnt], demoText);
mikrobus_logWrite(" 0x", _LOG_TEXT);
mikrobus_logWrite(demoText, _LOG_TEXT);
Delay_100ms();
}
mikrobus_logWrite(" ", _LOG_LINE);
mikrobus_logWrite("Write MikroE data.", _LOG_LINE);
excelonlp_sendCommand(_EXCELONLP_OPCODE_SET_WRITE_ENABLE_LATCH);
for(cnt = 0; cnt < 6; cnt++)
{
excelonlp_sendCommand(_EXCELONLP_OPCODE_SET_WRITE_ENABLE_LATCH);
excelonlp_writeMemoryData(_EXCELONLP_OPCODE_WRITE_MEMORY_DATA,
memoryAddress++, sendBuffer[cnt]);
Delay_100ms();
}
memoryAddress = 0x00000055;
mikrobus_logWrite("Read memory data : ", _LOG_TEXT);
for(cnt = 0; cnt < 6; cnt++)
{
MemoryData[0] = excelonlp_readMemoryData(_EXCELONLP_OPCODE_READ_MEMORY_DATA,
memoryAddress++);
mikrobus_logWrite(MemoryData, _LOG_TEXT);
Delay_100ms();
}
Delay_ms( 5000 );
}
Other mikroE Libraries used in the example:
SPI
Additional notes and information
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.