[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
#define MaxExtEeprom 0x7FFF
#define byte0(x) (unsigned char)(*(((unsigned char *)&x)+0))
#define byte1(x) (unsigned char)(*(((unsigned char *)&x)+1))
// WrProt - pin, connected to a Write Protect input of the EEPROM
// To initialize:
SSPCON = 0b00111000; // SPI on, CKP = 0, I2C Master with Fosc/64
SSPCON2 = 0;
SSPADD = 15; // 100k at 4Mhz clock
Удачи !
E-mail: info@telesys.ru