Giter Club home page Giter Club logo

esp-idf-93cx6's Introduction

esp-idf-93Cx6

Three-Wire Serial EEPROM Access Library for esp-idf.

Configure

You have to set this config value with menuconfig.

  • CONFIG_MODEL
  • CONFIG_CS_GPIO
  • CONFIG_SK_GPIO
  • CONFIG_DI_GPIO
  • CONFIG_DO_GPIO
git clone https://github.com/nopnop2002/esp-idf-93Cx6
cd esp-idf-93Cx6
make menuconfig
make flash

config-1 config-2 config-3 config-4


Interface

It look like SPI.
But CS is ACTIVE HIGH.
And data bit is not always 8bit.


Memory size vs Organization

The 93Cx6 memory is organized either as bytes (x8) or as words (x16).
If Organization Select (ORG) is left unconnected (or connected to VCC) the x16 organization is selected.
When Organization Select (ORG) is connected to Ground (VSS) the x8 organization is selected.

Device Number of Bits Number of 8-bit Bytes Number of 16-bit Words
93C46 1024 128 64
93C56 2048 256 128
93C66 4096 512 256
93C76 8192 1024 512
93C86 16384 2048 1024

API

// Open Memory Device
// model:EEPROM model(46/56/66/76/86)
// org:Organization Select(1=8Bit/2=16Bit)
int eeprom_open(EEPROM_T * dev, int16_t model, int16_t org, int16_t GPIO_CS, int16_t GPIO_SK, int16_t GPIO_DI, int16_t GPIO_DO)

// Erase/Write Enable
void eeprom_ew_enable(EEPROM_T *dev)

// Erase/Write Disable
void eeprom_ew_disable(EEPROM_T *dev);

// Check Erase/Write Enable
bool eeprom_is_ew_enabled(EEPROM_T *dev);

// Erase All Memory
void eeprom_erase_all(EEPROM_T *dev);

// Erase Byte or Word
void eeprom_erase(EEPROM_T *dev, uint16_t addr)

// Write All Memory with same Data
void eeprom_write_all(EEPROM_T *dev, uint16_t value)

// Write Data to Memory
void eeprom_write(EEPROM_T *dev, uint16_t addr, uint16_t value)

// Read Data from Memory
uint16_t eeprom_read(EEPROM_T *dev, uint16_t addr)

Wireing for x8 Organization

93Cx6 ESP32
CS -- GPIO12(*1)
SK -- GPIO13(*1)
DI -- GPIO14(*1)
DO -- GPIO15(*1)(*2)
GND -- GND
ORG -- GND
NC -- N/C
Vcc -- 5V(*2)

(*1)
You can change any GPIO using menuconfig.

(*2)
It's insufficient in 3.3V Power supply.
You have to supply 5V.
So you have to shift level about DO line.

esp32-93cx6-byte

Wireing for x16 Organization

93Cx6 ESP32
CS -- GPIO12(*1)
SK -- GPIO13(*1)
DI -- GPIO14(*1)
DO -- GPIO15(*1)(*2)
GND -- GND
ORG -- 5V(*2)
NC -- N/C
Vcc -- 5V(*2)

(*1)
You can change any GPIO using menuconfig.

(*2)
It's insufficient in 3.3V Power supply.
You have to supply 5V.
So you have to shift level about DO line.

esp32-93cx6-word


93C46

93c46-bytes

93c46-word

93C56

93c56-bytes

93c56-word

93C66

93c66-bytes

93c66-word

93C86

93c86-bytes

93c86-word

esp-idf-93cx6's People

Contributors

nopnop2002 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.