// EEPROM access example
// CodeVisionAVR C Compiler
// (C) 2000-2009 HP InfoTech S.R.L.
// www.hpinfotech.ro
// Chip: ATmega8515
flash char f[]="This is a test";
#pragma warn-
eeprom char e[16];
#pragma warn+
char r[16];
void main (void)
{
char flash *ptr_to_flash;
char eeprom *ptr_to_eeprom;
char *ptr_to_ram;
// copy the string f from FLASH to
// the string e in EEPROM
ptr_to_flash=f;
ptr_to_eeprom=e;
while (*ptr_to_flash)
*ptr_to_eeprom++=*ptr_to_flash++;
// NULL terminate the string in EEPROM
*ptr_to_eeprom=0;
// copy the string e from EEPROM to
// the string r in RAM
ptr_to_eeprom=e;
ptr_to_ram=r;
while (*ptr_to_eeprom)
*ptr_to_ram++=*ptr_to_eeprom++;
// NULL terminate the string in RAM
*ptr_to_ram=0;
// stop here
while (1);
}
EEPROM.rar_eeprom_test
版权申诉
59 浏览量
2022-09-21
06:30:03
上传
评论
收藏 2KB RAR 举报
alvarocfc
- 粉丝: 111
- 资源: 1万+
最新资源
- 开源代码分享(31)-计及电转气协同的含碳捕集与垃圾焚烧虚拟电厂优化调度
- meta-llama-3-8b-instruct 的 model-00002-of-00004.safetensors 的1/3
- AnyTXT.Searcher.1.3.1168.Win32&Win64.exe
- Redis windows版本的redis安装包和可视化工具客户端、redis存取数据的项目demo
- code1_2
- L999_期末项目.ipynb
- 数字频率计的设计(内含原理图、源代码、实物照片)
- 国密SM4加解密,前后端文件合集
- 基于TypeScript和UmiJS的高校学生报名系统设计源码 - student-sign
- 免费gpt4系列、claude-3、gemini 等模型傻瓜式开箱即用
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈