We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm trying to write and read internal RAM with w77e58 but without success. I'm using the following code. #include<string.h> #include<W77E58.h> unsigned char xdata xdata_buffer [1]; void main(void){ TA = 0xAA; /*W77e58 Time Accessed Functions*/ TA = 0x55; memcpy (xdata_buffer, "2", sizeof (xdata_buffer)); } It does not work. Any suggestion? Thanks in advance.
Sorry, I'm not explain my problem well because I just started to use microC few months ago. I'm creating an application that need some configuration parameters that I would like to store in a non volatile memory area in order to read it or save it as default configuration. I made some test using AT89S8252 from Atmel with this code a I have no problem, /* * Return EEPROM Byte at address 'adr' */ unsigned char ReadEEPROM (unsigned int adr) { unsigned char v; WMCON |= EEMEN_; // enable EEPROM v = XBYTE[adr]; // read value WMCON &= ~EEMEN_; // disable EEPROM return (v); } /* * Write EEPROM Byte 'val' at address 'adr' */ void WriteEEPROM (unsigned int adr, unsigned char val) { WMCON |= (EEMEN_ | EEMWE_); // enable EEPROM and set write bit XBYTE[adr] = val; // write value while ((WMCON & EERDY_) == 0); // wait until value programmed WMCON &= ~(EEMWE_ | EEMEN_); // disable EEPROM and write strobe } What I want to use is the Winbond W77E58 non volatile memory to store the configuration values.
Does this Winbond device actually have any EEPROM?
"Does this Winbond device actually have any EEPROM?" As far as I'm aware no, the code space is flash but I don't think any of it can be configured as xdata for runtime storage. There is some internal volatile xdata though, but there's an SFR bit that needs to be set if that's what he's trying to access. Stefan
That'll be why he can't get it to work, then!
Sorry, you're right. The W77e58 have not EEPROM, just 32Kb Flash EProm. As far as I khow, I think that it's possible to use the Flash Eprom to store non volatile information. That's right??
"Sorry, you're right. The W77e58 have not EEPROM, just 32Kb Flash EProm. As far as I khow, I think that it's possible to use the Flash Eprom to store non volatile information. That's right??" Everything I know about this chip has been gleaned from 5 minutes looking at the datasheet. It's your turn now. Stefan