TOP Contributors

  1. MIKROE (2752 codes)
  2. Alcides Ramos (372 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 (139062 times)
  2. FAT32 Library (71593 times)
  3. Network Ethernet Library (56989 times)
  4. USB Device Library (47330 times)
  5. Network WiFi Library (43006 times)
  6. FT800 Library (42297 times)
  7. GSM click (29777 times)
  8. mikroSDK (27874 times)
  9. PID Library (26858 times)
  10. microSD click (26129 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: 5912 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

IR Sense 3 click

5

IR Sense 3 Click is the infrared sensor Click board, designed to be used for the short range IR sensing applications. Unlike other pyroelectric sensors, it is able to sense environmental heat changes up to 1m, even through the glass.

[Learn More]

UV Click

0

Design devices that warn you of excesive ultraviolet radiation levels with UV Click. This Click boards carries the ML8511 IC that is sensitive to UV-A (365-315 nm) and UV-B (315-280 nm) rays.

[Learn More]

VCP Monitor 3 Click

0

VCP Monitor 3 Click is a high precision Voltage, Current and Power measurement Click board™ with an input capable of taking up to 15V. It features the LTC2947, from Analog Devices, a high precision power and energy monitor with an internal sense resistor supporting up to ±30A.

[Learn More]