PIC18F452 Eeprom
Moczik Gabor
progzmaster at freemail.hu
Tue Jul 5 21:24:12 CEST 2005
Nya'ri Viktor wrote:
> int int_eeprom_data;
>
> eeadr = int_eeprom_address;
> //cim_pointer beallitas
> eepgd = 0;
> //16F87x-nel es 18Fxxx-nel jeloli, hogy eeprom hozzaferes
> cfgs = 0;
> //18Fxxx-nel eeprom adat hozzaferes
> rd=1; //Read
> Control bit; olvasas indul
> while (rd) {}
> int_eeprom_data = eedata; //adat
> kiolvasas eeprombol
> return (int_eeprom_data);
nekem ennyivel mukodik 18F452-n (18.432MHz-en):
EEADR=addr;
EEPGD=0;
CFGS=0;
RD=1;
return EEDATA;
felesleges az int_eeprom_data, az EEDATA-bol is visszaadhatsz. Valamint
felesleges a while (rd); mert az olvasas egy ciklus alatt vegrehajtodik, a
kovetkezo utasitasra mar kesz is.
Nincs library fuggveny magy macro az eepromhoz?
--
((( Móczik Gábor )))--((( hu <- DOT <- freemail <- AT <- progzmaster )))
((( Skype: moczik )))--((( Website: http://progzmaster.homelinux.org )))
More information about the Elektro
mailing list