In order to get 1MHz operation you'll likely have to reduce the SDA/SCL pullups to a lower value than you're typically used to.
The rise time of the open-drain signals will need to be faster than when you're working at 100K or 400K.
You might also consider an I2C risetime accelerator IC which will boost the current during the rising edge.
I've used these up to 800KHz with good success... much faster and the internal logic of the MSSP in the PIC18 tends to generate a bus collision (BCLIF) during the START bit.
If you're looking for a BASIC that supports MSSP operation up to 1MHz you might try Swordfish BASIC https://www.sfcompiler.co.uk/swordfish/
Since you don't really get a big performance boost running that much faster if you really want speed then switch to an SPI EEPROM.
Bookmarks