当前位置:网站首页>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 )
边栏推荐
- 简述C语言中的符号和链接库
- SAP ALV cell level set color
- Basic concepts of LTE user experience
- STC8H开发(十二): I2C驱动AT24C08,AT24C32系列EEPROM存储
- Record the process of reverse task manager
- Schnuka: 3D vision detection application industry machine vision 3D detection
- KS008基于SSM的新闻发布系统
- Cubemx transplantation punctual atom LCD display routine
- [analysis of variance] single factor analysis and multi factor analysis
- 如何修改表中的字段约束条件(类型,default, null等)
猜你喜欢
Do you know cookies, sessions, tokens?
在 .NET 6 中使用 Startup.cs 更简洁的方法
MySQL reads missing data from a table in a continuous period of time
Thread sleep, thread sleep application scenarios
Ethernet port &arm & MOS &push-pull open drain &up and down &high and low sides &time domain and frequency domain Fourier
mysql关于自增长增长问题
Data analysis Seaborn visualization (for personal use)
LTE CSFB test analysis
C#(三十一)之自定义事件
C form application of C (27)
随机推荐
Multi project programming minimalist use case
Introduction to data types in MySQL
2、GPIO相关操作
Schnuka: visual positioning system working principle of visual positioning system
BUAA计算器(表达式计算-表达式树实现)
在字节做测试5年,7月无情被辞,想给划水的兄弟提个醒
Codeforces Global Round 19
KS003基于JSP和Servlet实现的商城系统
Indicator system of KQI and KPI
A brief introduction to symbols and link libraries in C language
Ybtoj coloring plan [tree chain dissection, segment tree, tarjan]
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
给新人工程师组员的建议
施努卡:什么是视觉定位系统 视觉系统如何定位
three. JS page background animation liquid JS special effect
[analysis of variance] single factor analysis and multi factor analysis
SAP ALV color code corresponding color (finishing)
[American competition] mathematical terms
自动化测试怎么规范部署?
关于非虚函数的假派生