⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eeprom.c

📁 AVR单片机的C语言源程序,包括按键扫描EEPROM通讯LCD显示数码管显示等等的源程序DEMO代码
💻 C
字号:
// EEPROM access example

// CodeVisionAVR C Compiler
// (C) 2000-2002 HP InfoTech S.R.L.
// www.hpinfotech.ro

// Chip: AT90S2313
// Memory Model: TINY
// Data Stack Size: 64 bytes

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++;

// 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++;

// stop here
while (1);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -