AI

## Technical Overview: M95320-RBN6G
The **M95320-RBN6G** is a low-voltage, 32-Kbit serial SPI (Serial Peripheral Interface) EEPROM (Electrically Erasable Programmable Memory) manufactured by **STMicroelectronics**. It is widely used for parameter storage, configuration data, and small-scale data logging in embedded systems.
---
### 1. Key Technical Specifications
| Parameter | Specification |
| :--- | :--- |
| **Memory Size** | 32 Kbits (4096 x 8 bits) |
| **Interface** | SPI (Mode 0 and Mode 3) |
| **Operating Voltage ($V_{CC}$)** | 1.8V to 5.5V |
| **Clock Frequency** | Up to 20 MHz (at 4.5V - 5.5V) |
| **Page Size** | 32 Bytes |
| **Write Cycle Time** | 5 ms (Maximum) |
| **Endurance** | 4 Million Write Cycles |
| **Data Retention** | 200 Years |
| **Operating Temperature** | -40°C to +85°C |
| **Package Type** | PDIP8 (Plastic Dual In-line Package) |
---
### 2. Pin Configuration (PDIP8)
The device typically follows the standard SPI EEPROM pinout:
| Pin Number | Name | Description |
| :--- | :--- | :--- |
| 1 | **S#** | Chip Select (Active Low) |
| 2 | **Q** | Serial Data Output (MISO) |
| 3 | **W#** | Write Control / Protect |
| 4 | **Vss** | Ground |
| 5 | **D** | Serial Data Input (MOSI) |
| 6 | **C** | Serial Clock |
| 7 | **HOLD#** | Pause Serial Communication |
| 8 | **Vcc** | Supply Voltage |
---
### 3. Core Features
* **SPI Protocol:** It uses a four-wire synchronous bus, allowing for high-speed data transfer compared to $I^2C$.
* **Block Protection:** Users can software-write-protect portions of the memory array (Quarter, Half, or Entire memory) via the Status Register.
* **Byte and Page Write:** Supports writing a single byte or a full page (32 bytes) in one cycle, improving efficiency.
* **Low Power Consumption:** Optimized for battery-powered applications with low active and standby currents.
* **Self-Timed Write Cycle:** Once a write command is sent, the chip manages the internal erasure and programming automatically.
---
### 4. Part Number Decoding (RBN6G)
* **M95320:** 32 Kbit SPI EEPROM.
* **-R:** Operating Voltage range of 1.8V to 5.5V.
* **BN:** PDIP8 Package (Plastic Dual In-line).
* **6:** Industrial Temperature range (-40°C to +85°C).
* **G:** ECOPACK2 (RoHS compliant, Lead-free, Halogen-free).
---
### 5. Common Applications
```cpp
// Example: Basic SPI Instruction Set for M95320
#define WREN 0x06 // Write Enable
#define WRDI 0x04 // Write Disable
#define RDSR 0x05 // Read Status Register
#define WRSR 0x01 // Write Status Register
#define READ 0x03 // Read from Memory
#define WRITE 0x02 // Write to Memory
```
1. **Consumer Electronics:** Storing user settings in smart home devices.
2. **Industrial:** Calibration data and error logs for sensors.
3. **Medical:** Patient settings or device usage history.
4. **Prototyping:** The PDIP8 package is breadboard-friendly, making it popular for Arduino/ESP32 development.
- ⤷What is the difference between SPI and I2C versions of this EEPROM?
- ⤷ How do I implement the 'Hold' function in a circuit?
- ⤷ What happens if I exceed the 4 million write cycle limit?