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

Problem with eeprom access

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



Joined: 07 Sep 2003
Posts: 56

View user's profile Send private message

PostPosted: Sun Aug 19, 2007 11:18 am     Reply with quote

Hi, my program is ok in V 4.017 but in 4.050 in function below, not work, i am using a 18F4525 and drive 24LC256.C

somebody can help ?

Thanks

Code:


//*********************************************************
              GRAVA um INT32 na EEPROM externa
//***********************************************************

void ee_write32(int16 base_address ,int32 data)

  {
     char i;
     for(i=0; i<4; i++)
     write_ext_eeprom(base_address+i,*(&data+i));
  }

//***********************************************************
//                  LÊ um INT32 na EEPROM  externa
//**********************************************************


int32 ee_read32(int16 base_address)
{
     char i;
     int32 data_read;

     for(i=0; i<4; i++)
     *(&data_read+i) = read_ext_eeprom(base_address+i);
     return (data_read);
}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Aug 19, 2007 1:58 pm     Reply with quote

Read this item from the CCS versions page:
Quote:
4.021 The & unary operator by default no longer returns a generic (int8 *)

See the updated FAQ article that shows how to do it:
http://www.ccsinfo.com/faq.php?page=write_eeprom_not_byte
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