Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

internal i2c eeprom

Status
Not open for further replies.

alamy

New Member
Hi all..

I'm urgently looking to the routine for i2c to cummunicate with 24lc512...

i'm prefer to use internal i2c since i'll use pic16f88 taht have internal i2c..

pls advice
 
alamy said:
Hi all..

I'm urgently looking to the routine for i2c to cummunicate with 24lc512...

i'm prefer to use internal i2c since i'll use pic16f88 taht have internal i2c..

Check my tutorials for master mode I2C assembler routines.
 
thanks nigel...

looks like ur tutorial on software routine but i'm looking to the hardware routine since my PIC16F88 have internal i2c...

any advice...similar project/coding?

thanks in advance..
 
alamy said:
thanks nigel...

looks like ur tutorial on software routine but i'm looking to the hardware routine since my PIC16F88 have internal i2c...

any advice...similar project/coding?

I can't comment specifically on the 16F88 (as I've not tried it), but historically the I2C hardware in PIC's has been very troublesome, with the application notes not working!.

There seems very little reason to do master mode in hardware, slave mode is a different matter, but master mode works perfectly just in software.

If you want to play with the hardware, I suggest you have a look at the PICList.
 
i would have to kind of disagree, if you persivere [sp?] u will get very stable comms going, its just peachy starting out. For small tasks software is fine, but if u plan on using a lot of i2c comms then going hardware will be stable in the long run.

Mainly due to the SMBUS version of i2c, which has timeouts. If your software has interrupts then you could easily get out of sync and lose data comms with software programming.
 
pittuck said:
If your software has interrupts then you could easily get out of sync and lose data comms with software programming.

Not for master mode, which is what I specified! - I wouldn't advise software only slave mode, that is fraught with potential problems.

But generally you would be using I2C to talk to specific I2C slave chips (like a serial EEPROM), so usually only master is required.
 
ok thanks guy...

just to get the idea clearly from thsi discussion...

for my case...my pic16f88 communicate with24l512 through i2c (ssp), there is no problem to use hardware routine using master mode ...and not for slave mode..

meaning that my pic will be master and eeprom is a slave..am i correct?..

or...i just can use software routine to create the same thing...


pls correct me..

i have another question related to this eeprom...how do i know that my eeprom full..if full, how about the previous data?...will be overwrite or eeprom will give a signal to inform pic?

thanks in advance..
 
Unlike the 16F877 (and many 18F' devices), the built-in 16F88 I2C peripheral supports 'slave' mode nicely but requires implementing software 'master' mode routines... Please check out the 16F88 Data Sheet carefully...

I also need to implement I2C 'master' mode software for the 16F88 sometime soon and I really appreciate Nigel's great resources/examples... Thank you Nigel...

Regards, Mike
 
alamy said:
ok thanks guy...

just to get the idea clearly from thsi discussion...

for my case...my pic16f88 communicate with24l512 through i2c (ssp), there is no problem to use hardware routine using master mode ...and not for slave mode..

meaning that my pic will be master and eeprom is a slave..am i correct?..

Yes, an EEPROM is a slave, and the PIC will be master.

or...i just can use software routine to create the same thing...

Yes you can, the routines in my tutorials do exactly what you want!.

pls correct me..

i have another question related to this eeprom...how do i know that my eeprom full..if full, how about the previous data?...will be overwrite or eeprom will give a signal to inform pic?

It's up to you to keep a count of the current address, and act accordingly, depending how you want to handle the EEPROM being full. So you don't lose the current address if power should go off, it's a good idea to store the address in the EEPROM itself, usually in the first memory locations. Or if the PIC used has internal EEPROM, you can store it there instead.
 
ok..thanks a lot guys..

i'll try to implement both using software and hardware..since i'll not going using slave mode..it should be ok..

and thanks for your tutorial Nigel...i'll try to implement this on my pic16f88..

i'll ask you..if i have problem on your routine..thanks in advance.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top