TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139250 times)
  2. FAT32 Library (71746 times)
  3. Network Ethernet Library (57118 times)
  4. USB Device Library (47429 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28074 times)
  9. PID Library (26885 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

EEPROM 4 click

Rating:

5

Author: MIKROE

Last Updated: 2018-01-19

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: EEPROM

Downloaded: 5955 times

Not followed.

License: MIT license  

EEPROM 4 click is 2,097,152 bits on a click board, organized into 262,144 bytes. In other words, this click board is an EEPROM memory medium with the capacity of 256 KB.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "EEPROM 4 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "EEPROM 4 click" changes.

Do you want to report abuse regarding "EEPROM 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

EEPROM 4 Click

EEPROM 4 Click

Native view of the EEPROM 4 Click board.

View full image
EEPROM 4 Click

EEPROM 4 Click

Front and back view of the EEPROM 4 Click board.

View full image

Library Description

Initializes and defines SPI bus driver, driver functions which communicate with the memory array and configures click to the writable state.

Key functions

uint8_t eeprom4_sendCommand(uint8_t command_byte);- The function sends command (instruction) to the click. In case that command byte is _EEPROM4_LOW_POWER_WRITE_POLL_COMMAND (0x08) function returns 0x00 if a part is not in a write cycle and returns 0xFF if the part is still busy completing the write cycle. In other cases, the function returns 0.

void eeprom4_writeStatusReg(uint8_t data_value);- The function writes data determined in the parameter of the function to the status register.

uint8_t eeprom4_readStatusReg(void);- The function reads a one-byte data value from the status register.

void eeprom4_writeMemory(uint32_t memory_address, uint8_t *data_input, uint8_t nBytes);- The function writes a number of bytes determined by nBytes parameter from buffer determined by data_input pointer to memory location determined by memory_address parameter.

void eeprom4_readMemory(uint32_t memory_address, uint8_t *data_output, uint8_t nBytes);- The function reads a number of bytes determined by nBytes parameter from memory location determined by memory_address parameter and stores bytes to buffer determined by data_output pointer.

void eeprom4_enableWriteProtect(uint8_t state);- The function sets RST pin on state value to enable or disable writing to status register and memory array. WP pin is used in conjunction with the block protection bits of the status register and with WPEN and WEL bits also.

void eeprom4_enableHoldOperation(uint8_t state);- The function enables or disables the Hold operation. To pause the serial communication with the master device without resetting the serial sequence, the HOLD pin must be brought low. To resume serial communication, HOLD pin must be brought high.

uint8_t eeprom4_checkStatusReg(uint8_t check_bit);- The function checks the value of the status register bit determined by check_bit parameter.

Examples Description

The application is composed of three sections :

  • System Initialization - Initializes peripherals and pins.
  • Application Initialization - Initializes click driver and configures click that all memory block is unprotected. Also configures that HOLD operation is disabled, and the memory and status register are writable.
  • Application Task - (code snippet) - Enables writing to the memory array, writes data from the buffer to the memory, checks if the part is in a write cycle, and if is not reads data from memory array and stores data to buffer. Shows data on USB UART.
void applicationTask()
{
    eeprom4_sendCommand(_EEPROM4_SET_WRITE_ENABLE_LATCH_COMMAND);

    eeprom4_writeMemory(_EEPROM4_FIRST_MEMORY_LOCATION, &data_write[0], 8);

    cnt = eeprom4_checkStatusReg(_EEPROM4_READY_BIT);

    check_state = eeprom4_sendCommand(_EEPROM4_LOW_POWER_WRITE_POLL_COMMAND);

    while(cnt | check_state)
    {
        cnt = eeprom4_checkStatusReg(_EEPROM4_READY_BIT);

        check_state = eeprom4_sendCommand(_EEPROM4_LOW_POWER_WRITE_POLL_COMMAND);
    }

    eeprom4_readMemory(0x00000001, &data_read[0], 6);

    for(cnt = 0; cnt < 6; cnt++)
    {
        WordToStr(data_read[cnt], text);
        mikrobus_logWrite(text, _LOG_TEXT);
        if(cnt < 5)
        {
            mikrobus_logWrite(",", _LOG_TEXT);
        }else
        {
            mikrobus_logWrite("", _LOG_LINE);
        }
    }

    Delay_ms(2000);
}


MikroElektronika Libraries used in the example:

  • Conversions
  • SPI
  • UART

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.

ALSO FROM THIS AUTHOR

EEPROM 13 Click

0

EEPROM 13 Click is a compact add-on board that contains a highly reliable, nonvolatile memory solution. This board features the M24M01E, an electrically erasable programmable memory with enhanced hardware write protection for entire memory from STMicroelectronics. Its memory size of 1Mbit is organized as 128K words of 8bits each, with a page size of 256 bytes and an additional 256 bytes of identification page. The identification page can be used to store sensitive application parameters, which can be (later) permanently locked in read-only mode.

[Learn More]

Temp-Hum 7 click

6

Temp&amp;Hum 7 click is a Click board which is perfectly suited for measuring the relative humidity (RH) and temperature.

[Learn More]

Matrix G click

5

Matrix G click is a mikroBUS add-on board with two 5x7 matrices driven by two MAX7219 8-bit LED Display Drivers.

[Learn More]