Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 7th May 2008, 05:09 PM   (permalink)
New Member
prabs1976 is on a distinguished road
Post EEPROM emulation using Flash?

I'm looking for a design document on implementing Emulated EEPROM , any links ,tutorials or sample code would be of great help.
prabs1976 is offline   Reply With Quote
Old 7th May 2008, 05:16 PM   (permalink)
Experienced Member
 
futz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to allfutz is a name known to all
Default

Quote:
Originally Posted by prabs1976
I'm looking for a design document on implementing Emulated EEPROM , any links ,tutorials or sample code would be of great help.
Umm... Flash doesn't need to emulate EEPROM because it IS EEPROM.

http://en.wikipedia.org/wiki/EEPROM
http://searchstorage.techtarget.com/...212130,00.html
http://www.gemalto.com/techno/chipware/other/flash.html

Maybe you want to emulate a particular EEPROM chip?
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is online now   Reply With Quote
Old 7th May 2008, 06:44 PM   (permalink)
Experienced Member
arhi is just really nicearhi is just really nicearhi is just really nice
Default

Quote:
Originally Posted by prabs1976
I'm looking for a design document on implementing Emulated EEPROM , any links ,tutorials or sample code would be of great help.
download PICC trial and there is EX_SLAVE.C that simulates 24LC01 eeprom.

but generally what you need to do is enable i2c and for i2c interrupt setup something like this

Code:
// put some config for your pic
//...

// set this procedure as i2c interrupt
void i2c_interupt ()

{

  BYTE inc, state;


  state = i2c_isr_state();


  if(state < 0x80){ // master sending data


    inc = i2c_read();

    if(state == 1) address = inc;

    if(state == 2) buffer[address] = inc;

  }

  if(state == 0x80){ //master requesting data


    i2c_write(buffer[address]);

  }

}


void main(){
  //enable i2c interrupt
 while(1) {}
}
__________________
http://www.it4um.com
arhi is offline   Reply With Quote
Old 8th May 2008, 04:53 AM   (permalink)
Experienced Member
 
donniedj has a spectacular aura about
Default

Quote:
Originally Posted by prabs1976
I'm looking for a design document on implementing Emulated EEPROM , any links ,tutorials or sample code would be of great help.
We need the manufacturer and device first. Yes, Microchip does provide Flash to EEPROM implementation. And it all depends on the device. If using flashed based PIC that does not have EEPROM, there are 2 types. Type 1 lets you write to flash at run-time and lets you write to individual random access bytes. Type 2 lets you write to flash at run-time but you must first erase a huge chunk of flash first, and then write to flash. Since a huge chunk is erases this of course raises the flag of "must I first save the chunk". That would be a yes if you want to keep that data and you must be all powerfull enough to know what chunks to access else you will suicide your own code at run-time.
__________________
I can still log in! Delete my account and all my post now.
donniedj is offline   Reply With Quote
Old 10th May 2008, 01:19 PM   (permalink)
New Member
prabs1976 is on a distinguished road
Smile

Thanks for the help.
prabs1976 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Logic circuit for two cameras and one flash. Hermit Electronic Projects Design/Ideas/Reviews 30 10th December 2007 03:25 AM
Flash and EEPROM. lord loh. General Electronics Chat 8 27th August 2006 07:02 PM
How to reset SCR used for triggering camera flash shootfirst Electronic Projects Design/Ideas/Reviews 20 28th September 2005 08:40 PM
Flash & EEPROM Electrix General Electronics Chat 8 17th September 2005 02:00 AM
FLASH and EEPROM bogdanfirst Micro Controllers 3 21st March 2003 05:40 PM



All times are GMT. The time now is 03:49 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.