#include<pic12f683.h> #include<pic.h> #define uchar unsigned char #define uint unsigned int __CONFIG(0XF4); extern void eeprom_write(unsigned char addr, unsigned char value); extern unsigned char eeprom_read(unsigned char addr); // void eeprom_write(uchar addr,uchar value);//EEPROM写函数 // uchar eeprom_read(uchar addr);//EEPROM读函数 void FtoS(float a,uchar adr); float StoF(uchar adr); void initial(); void delay(); float x,y,z; void main() { uchar mm,nn; mm=0x40; eeprom_write(0x30,mm); nn=eeprom_read(0x30); //NOP(); } |