当前位置:网站首页>20、 EEPROM memory (AT24C02) (similar to AD)
20、 EEPROM memory (AT24C02) (similar to AD)
2022-07-06 03:51:00 【Can't go on the ground】

EEPROM Memory (AT24C02): Power down data is also saved
//************EEPROM Memory ***********************************************
unsigned char eeprom_read(unsigned char add)// from EEPROM( Which address ) Reading data
{
unsigned char temp;
IIC_Start();
IIC_SendByte(0xa0);// Allow writing ( read 1/ Write 0) 1010 000 0/1
IIC_WaitAck();
IIC_SendByte(add);// Tell it the address
IIC_WaitAck();
IIC_Stop();
IIC_Start();
IIC_SendByte(0xa1);// Allow to read ( read 1/ Write 0) 1010 000 0/1
IIC_WaitAck();
temp = IIC_RecByte();// Reading data
IIC_Stop();
return temp;
Delayms(5);//( Read continuously , Write in succession , Only the first one is right ) Need a delay
}
void eeprom_write(unsigned char add, dat)// Go to EEPROM Writing data ( Where is the writing , What to write )
{
IIC_Start();
IIC_SendByte(0xa0);// Allow writing ( read 1/ Write 0) 1010 000 0/1
IIC_WaitAck();
IIC_SendByte(add);// Tell it the address
IIC_WaitAck();
IIC_SendByte(dat);// Write content
IIC_WaitAck();
IIC_Stop();
Delayms(5);// Need a delay
}
//***********************************************************************
application :
EEPROM_write(0x01,32);// towards 0x01 Write 32
dat1 = EEPROM_read(0x01);// read 0x01 The data of (dat1 It's a digital tube )
边栏推荐
- Facebook等大廠超十億用戶數據遭泄露,早該關注DID了
- LTE CSFB test analysis
- BUAA calculator (expression calculation - expression tree implementation)
- 阿里测试师用UI自动化测试实现元素定位
- Basic concepts of LTE user experience
- 施努卡:什么是视觉定位系统 视觉系统如何定位
- Custom event of C (31)
- 2.13 weekly report
- Codeforces Global Round 19
- C language -- structs, unions, enumerations, and custom types
猜你喜欢
![[practice] mathematics in lottery](/img/29/2ef2b545d92451cf083ee16e09ffb4.jpg)
[practice] mathematics in lottery
![Cf464e the classic problem [shortest path, chairman tree]](/img/6b/65b2dc62422a45cc72f287c38dbc58.jpg)
Cf464e the classic problem [shortest path, chairman tree]

WPF effect Article 191 box selection listbox

Pointer written test questions ~ approaching Dachang

ESP32_ FreeRTOS_ Arduino_ 1_ Create task

Scalpel like analysis of JVM -- this article takes you to peek into the secrets of JVM

Record the pit of NETCORE's memory surge

Schnuka: visual positioning system working principle of visual positioning system

Blue Bridge Cup - Castle formula

【FPGA教程案例11】基于vivado核的除法器设计与实现
随机推荐
Cubemx transplantation punctual atom LCD display routine
在字节做测试5年,7月无情被辞,想给划水的兄弟提个醒
Flask learning and project practice 8: introduction and use of cookies and sessions
Record the process of reverse task manager
Record the pit of NETCORE's memory surge
Microkernel structure understanding
1、工程新建
Ks003 mall system based on JSP and Servlet
【按键消抖】基于FPGA的按键消抖模块开发
C#(三十一)之自定义事件
Why do you want to start pointer compression?
Canvas cut blocks game code
ESP32_ FreeRTOS_ Arduino_ 1_ Create task
C form application of C (27)
Schnuka: 3D vision detection application industry machine vision 3D detection
BUAA calculator (expression calculation - expression tree implementation)
C language -- structs, unions, enumerations, and custom types
Cf603e pastoral oddities [CDQ divide and conquer, revocable and search set]
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Maxay paper latex template description