TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139568 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57256 times)
  4. USB Device Library (47631 times)
  5. Network WiFi Library (43222 times)
  6. FT800 Library (42566 times)
  7. GSM click (29932 times)
  8. mikroSDK (28292 times)
  9. PID Library (26934 times)
  10. microSD click (26309 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: 5998 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

Qi RX click

5

Qi RX Click is a compact add-on board made for the purpose of wireless power transfer. This board features the PIC16F15313, a general-purpose 8-bit MCU that makes a flexible, low-cost alternative to the wireless charging solutions based on ASICs from Microchip.

[Learn More]

mikromedia plus for STM32 and SpeakUp Chess

6

We challenge you to beat an STM32 it in a blitz game. Our chief of software can do it fairly consistently. How well will you fare? You can use the SpeakUp to speak out your moves while you skim a book on chess openings.

[Learn More]

H-Bridge 4 Click

0

H-Bridge 4 Click is a Click board™ that contains the AP1010AEN, which is a two channel H-Bridge motor driver compatible with a motor operating voltage up to 18V and can drive two DC motors or one stepper motor.

[Learn More]