Searching \ for '[PIC]:Reading EEPROM from the start till end' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Reading EEPROM from the start till end'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]:Reading EEPROM from the start till end'
2004\04\23@084215 by Nicholas

picon face
Hi there,

Does anyhow know how to used PIC C18 language to fix the start address of the EEPROM.

The first 2 line of the data in the EEPROM is as follow:

This is how i write to test the EEPROM. But the return value to 'err' is FF (Bus collision). Does anyone know how can I let the PIC read the data from the EEPROM starting from address 0x00 to the end.

void main(void){

int a, b, c, d, e, f, g, h, i, j;
unsigned char *rdptr, err;

TRISC = 0X18; //Set SDA & SCL as input. Activate I2C port

SSPADD = 24;    //400KHz Baud clock @ 40MHz
SSPCON1 = 0x28;  //set up SCL & SDA
OpenI2C(MASTER, SLEW_ON); //Initialize I2C module
 err = EESequentialRead(0xA1, 0x00, rdptr, 1); //make current address at EEPROM address 0xA1
a = EECurrentAddRead(0xA1); //Read a single byte EEPROM and store in a
b = EECurrentAddRead(0xA1); //Read a single byte EEPROM and store in b
c = EECurrentAddRead(0xA1);
d = EECurrentAddRead(0xA1);
e = EECurrentAddRead(0xA1);
f = EECurrentAddRead(0xA1);
g = EECurrentAddRead(0xA1);
h = EECurrentAddRead(0xA1);
i = EECurrentAddRead(0xA1);
j = EECurrentAddRead(0xA1);

}//end of main

Thank you,

-- hint: The PICList is archived three different
ways.  See for details.

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...