CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

multiple external eeproms with one pic

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
shalts



Joined: 20 Oct 2006
Posts: 17
Location: Ankara

View user's profile Send private message Send e-mail

multiple external eeproms with one pic
PostPosted: Sat Feb 24, 2007 8:39 am     Reply with quote

hi,

what I Am tryign to do is a simple EEPROM copier (24LC65) with LCD.

I connected 2 EEPROMs to my pic. One is A2-A1-A0 = 0-0-0 . And other is A2-A1-A0 = 0-0-1 . And I couldnt manage to change this A2-A1-A0 from the PIC to select which EEPROM I am going to work with .

Anyone has any idea about that ?

Regards ,

Shalt
_________________
Murat Shalt Unal
SimpleAsPossible



Joined: 19 Jun 2004
Posts: 21

View user's profile Send private message

Sample code?
PostPosted: Sun Feb 25, 2007 7:27 pm     Reply with quote

You seem to be on the right track. Take a look at EX_EXTEE.C and 2416.C. I found this function in 2416.C:
Code:
void write_ext_eeprom(long int address, BYTE data) {
   while(!ext_eeprom_ready());
   i2c_start();
   i2c_write((0xa0|(BYTE)(address>>7))&0xfe);
   i2c_write(address);
   i2c_write(data);
   i2c_stop();
}


The IC expects the address as part of the read/write commands.
Shalt
Guest







still working on it
PostPosted: Mon Feb 26, 2007 10:18 am     Reply with quote

Thank you for the reply. It gave me some clues.

From the datasheet of 24LC65 (what I am working with) I understood today as I have to mkae A0=1, A1=0, A2=0 from the hardware and from the software inorder to make A0=1 I have to set the 13th bit of the long int address.

but still couldnt run both of the EEPROMs together yet . Smile

I am going to keep working on it.

regards,

shalt
shalts



Joined: 20 Oct 2006
Posts: 17
Location: Ankara

View user's profile Send private message Send e-mail

Problem Solved
PostPosted: Fri Mar 02, 2007 9:57 am     Reply with quote

Hi there ,

I solved the problem . Everything is working with my EEPROM copier now.

I am going to write the solution soon .

regards&Peace

Shalt
_________________
Murat Shalt Unal
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group