danyboy666
Joined: 01 Mar 2011 Posts: 30
|
24LC32A ack [solved] |
Posted: Thu Mar 22, 2012 9:33 pm |
|
|
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
|
|
Posted: Thu Mar 22, 2012 10:49 pm |
|
|
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. |
|