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

24LC32A ack [solved]

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



Joined: 01 Mar 2011
Posts: 30

View user's profile Send private message

24LC32A ack [solved]
PostPosted: Thu Mar 22, 2012 9:33 pm     Reply with quote

Hi again,

I'm testing with a futurlec board ET-MINI 24xx serial EEPROM. The EEPROM chips are 24LC32A. I use the provided 2432.c driver provided with CCS compiler version 4.104 but I have trouble with the acknowledge function. The module board works but with a problem. I Have to comment
Code:

while(!ext_eeprom_ready());

line from the read and write function for it to be working.

Here's the test program I'm using.
Code:

void main()
{
   BYTE value;
   BYTE valeur;
   signed long i;
   
   init_ext_eeprom();
   
   
   for(i = 0; i <= 254; ++i) // de 0 à 254
   {     
      value = i + 10;
     
      write_ext_eeprom(i,value);
     
   }
     
   while (TRUE)
   {
      for(i = 254; i >= 0; --i) // de 254 à 0
      {
      printf("\f");
      valeur = read_ext_eeprom(i);
     
      printf("%c%c",0xfe,0xc0);
      printf("A l'adresse %3Ld la",i);
      printf("%c%c",0xfe,0x94);
      printf("valeur a 10 de plus\n\r c'est a dire %3u",valeur);
     
      delay_ms(250);
      }
     
   delay_ms(1000);   
   }
}

When I'm testing this code on internal EEPROM it works fine but with the 24LC32A module the read function does not seem to be working properly.

Any pointers would be appreciated, as for the ext_eeprom_ready() I read the chip datasheet and the driver provided seems to be compatible.
danyboy666



Joined: 01 Mar 2011
Posts: 30

View user's profile Send private message

PostPosted: Thu Mar 22, 2012 10:49 pm     Reply with quote

Never mind I've found the problem. The slave address in the control byte I send is supposed to be A8, AA, AC or AE depending on which device on the Bus I want to read or write. I hope this can help someone in the future.

The driver provided is working A-1.
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