TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (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 (136523 times)
  2. FAT32 Library (69722 times)
  3. Network Ethernet Library (55834 times)
  4. USB Device Library (46167 times)
  5. Network WiFi Library (41797 times)
  6. FT800 Library (40982 times)
  7. GSM click (28920 times)
  8. PID Library (26383 times)
  9. mikroSDK (26274 times)
  10. microSD click (25296 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: 5419 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

Audio Amp 5 click

5

Audio Amp 5 Click is a stereo audio amplifier, capable of delivering up to 10W per channel with the 8Ω load. It is based on the TPA3138D2, a class-D integrated amplifier, which utilizes a highly efficient switching scheme.

[Learn More]

Light mix-sens click

0

Light mix-sens Click is carrying TMD37253, an advanced proximity measurement, color sense (RGBC+IR), and digital ambient light sensing (ALS) device. The TMD37253 slim module package has been designed to accommodate a “single hole” aperture approach that incorporates an IR LED and factory calibrated LED driver. The proximity detection feature provides object detection (e.g., mobile device screen to the user’s ear) by photodiode detection of reflected IR energy (sourced by the integrated LED). The ALS detection feature provides photopic light intensity data. The color photodiodes have UV and IR blocking filters and a dedicated data converters producing 16-bit data.

[Learn More]

Accel 7 click

5

Accel 7 click is a three-axis acceleration sensing Click board™. It uses the KXTJ3-1057, a 14bit tri-axis digital accelerometer, which can sense the acceleration up to ±16 g. This sensor is built using the proprietary Kionix micromachining technology, which results with a high accuracy and very good noise immunity.

[Learn More]