英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流
标题:
picc的编译器正常
[打印本页]
作者:
winnie
时间:
2009-4-26 12:35
标题:
picc的编译器正常
picc的编译器正常。就是出问题!我的程序如下:
for(i=0;i<50;i++)
{
m++;
addr=0x01;
EEPROM_WRITE(address,m);
m=EEPROM_READ(address);
}
作者:
winnie
时间:
2009-4-26 12:35
#include "pic.h"
const unsigned char s[8]={0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08};
unsigned char i,s1[8],data,addr;
void delay(unsigned int data)
{
unsigned int d=data;
while(--d){;}
}
main()
{
for(i=0;i<8;i++){
addr=i;
eeprom_write(addr,s[i]);
delay(2000);
}
for(i=0;i<8;i++){
addr=i;
s1[i]=eeprom_read(addr);
}
while(1)
{
data=s1[0];
data=s1[7];
}
}
欢迎光临 英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 (http://enroobbs.com/)
Powered by Discuz! X3.2