@@ -10,41 +10,41 @@ then read back using I2C peripheral.
1010I2C EEPROM driver module takes two inputs viz., Command and Data Object
1111Driver supports two commands viz., Read and Write
1212
13- // EEPROM DRIVER Module
14- typedef struct {
15- unsigned int cmd; // Command Input
16- I2CEMEM_DATA * oData; // I2C Serial EEPROM Data Object
17- void (* init)(void * );
18- void (* tick)(void * );
19- }I2CEMEM_DRV;
13+ // EEPROM DRIVER Module< br />
14+ typedef struct { < br />
15+ unsigned int cmd; // Command Input< br />
16+ I2CEMEM_DATA * oData; // I2C Serial EEPROM Data Object< br />
17+ void (* init)(void * ); < br />
18+ void (* tick)(void * ); < br />
19+ }I2CEMEM_DRV; < br />
2020
2121I2C Serial EEPROM data object contains EEPROM address location, data buffer, size
22- of the data buffer and chip select bits for device addressing
23- // Data Object
24- typedef struct {
25- unsigned int * buff; // Data Buffer
26- unsigned int n; // Size of the Data Buffer
27- unsigned int addr; // EEPROM Address
28- unsigned int csel; // Chip Select bits (A2,A1,A0 bits)
29- }I2CEMEM_DATA;
22+ of the data buffer and chip select bits for device addressing< br />
23+ // Data Object< br />
24+ typedef struct { < br />
25+ unsigned int * buff; // Data Buffer < br />
26+ unsigned int n; // Size of the Data Buffer< br />
27+ unsigned int addr; // EEPROM Address< br />
28+ unsigned int csel; // Chip Select bits (A2,A1,A0 bits)< br />
29+ }I2CEMEM_DATA; < br />
3030
3131
32- * I2C Serial EEPROM read/write operation begins with transmitting control byte first.
32+ * I2C Serial EEPROM read/write operation begins with transmitting control byte first.
3333This control byte contains 8bits as shown below
34- ------------------------------------
35- | 1 | 0 | 1 | 0 | A2 | A1 | A0 | R/W |
36- ------------------------------------
34+
35+
36+ | 1 | 0 | 1 | 0 | A2 | A1 | A0 | R/W |
3737
38381010 is the code used for I2C Serial EEPROM peripheral and A2,A1,A0 is used for chip select (csel).
3939
4040
41- * After the control byte, address of serial EEPROM is sent for read/write operation
41+ * After the control byte, address of serial EEPROM is sent for read/write operation
4242Small memory I2C EEPROM will use 1byte address and large memory I2C EEPROM will need 2byte addressing.
4343User must select either 1byte memory address or 2byte memory address using
4444i2cEmem.h file.
4545
46- // EEPROM ADDRESS SIZE
47- #define ADDRWIDTH TWO_BYTE
46+ // EEPROM ADDRESS SIZE< br />
47+ #define ADDRWIDTH TWO_BYTE < br />
4848
4949
5050## Hardware Used
@@ -55,6 +55,6 @@ i2cEmem.h file.
5555
5656## Software Used
5757
58- - MPLAB® X IDE v5.50 or newer (https://www.microchip.com/mplabx )
59- - MPLAB® XC16 v1.70 or newer (https://www.microchip.com/xc )
58+ - MPLAB® X IDE v6.00 or newer (https://www.microchip.com/mplabx )
59+ - MPLAB® XC16 v2.00 or newer (https://www.microchip.com/xc )
6060
0 commit comments