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 CCS Technical Support

Writing into EEPROM directly through I2C Bus

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








Writing into EEPROM directly through I2C Bus
PostPosted: Thu Jun 10, 2004 10:35 pm     Reply with quote

Hi

Is it possible to write directly some data directly into the Pic Micro's internal EEPROM over the I2C Bus by an external Processor

To reframe the question, is it possible to have the following I2C operation by an external Master to slave PIC 16F819

Write <Pic-Add><PIc's EEPROM-Add> <Data>

What is the best way to do this
Any pointer on this would be of great help

Thanks & best regards,
Raghu PV
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Fri Jun 11, 2004 8:49 am     Reply with quote

I, personally, haven't done this one before but I'm sure that it's possible. You could have your Slave I2C interrupt routine look for a certain command word and then take the data that follows it and enable a function to write that data to it's internal eeprom.

Ronald
valemike
Guest







PostPosted: Fri Jun 11, 2004 12:41 pm     Reply with quote

Yeah, in your PIC's slave routine, then call write_eeprom(). If I had to do it, I probably wouldn't do it in the SSP ISR, but rather defer the eeprom operation once i get out of the isr.

If you're asking is it it possible for the i2c data to write directly to the eeprom, then this reminds me of DMA. And no, it's not possible. You have to go thru the SSP/MSSP module first, read the SSPBUF, then write software to store it in the appropriate eeprom location.
Guest








PostPosted: Fri Jun 11, 2004 9:26 pm     Reply with quote

Hi ,

Thanks for the replies.

I was looking for the DMA kind of operation , so that external master CPU can write some data into the PIC without PIC's intervention

I understand now the requirement of EEPROM as it is not not directly mapped into the PIC's mem map

well, I have another question ..
Since GPR area is directly mapped into the data memory , writing a data directly into this area is possible ?

For example in the PIC 16F 819 , in Bank 1 C0 to FF is available for GPR
Can the host CPU can write any data directly into this area say by
<i2C Device address><word address-C0>,<Data> ?

Appreciate your reply

Thanks & Best regards,
Raghu PV
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