PDA

View Full Version : External Serial EEPROM Speed Questions



rsocor01
- 27th September 2010, 18:45
Hi all,

I have been playing with this 24FC1025 1024Kbits serial EEPROM memory.

http://ww1.microchip.com/downloads/en/DeviceDoc/21941E.pdf

I am using a PIC18F4550 at 48 MHz using a 4 MHz crystal oscillator. I have no problems reading and writing to this serial EEPROM. My questions are regarding the speed at which the serial memory chip is running. From the I2CREAD section in the PBP 2.50 manual it says


The timing of the I2C instructions is set so that standard speed devices (100KHz) will be accessible at clock speeds up to 8MHz. Fast mode devices (400KHz) may be used up to 20MHz.

But, the maximum clocking speed for this 24FC1025 chip is 1MHz, and the PBP manual doesn't mention anything (that I'm aware of) about running a serial I2C memory chip at 1 MHz. Running at the maximum frequency of 1MHz is what I need since I am reading graphics from EEPROM to display in a GLCD.

Since I'm running my PIC18F4550 at 48MHz, is this memory chip running at 1MHz automatically? How do I know at what speed is this I2C communication for this chip running? In the PBP manual when they say "may be used up to 20MHz" are they talking about the crystal frequency or the PIC frequency?

Thank you all for your help,

Robert

Dave
- 28th September 2010, 11:51
rsocor01 , If using the command I2CWRITE or I2CREAD, they are both bit banging routines and will not operate at the full I2C bus speed. If you want to operate the eeprom at it's maximum speed you will have to use the hardware module built into the processor you are using. This module is called the "Master Synchronous Serial Port". It will allow you to set the slew rate for the bus to either 100Khz. or 400Khz. There is an option to set the master clock mode to Fosc(4 * (sspadd + 1)). All the information is in the data sheet for the processor you are using........

Dave Purola,
N8NTA

rsocor01
- 29th September 2010, 13:06
Dave,

Thank you for your answer.

Yes, you are right. After some research done, I found out that MSSP is the way to go. Unfortunally, PBP does not directly support MSSP. There is an interesting thread in which somebody asked in the "PBP Wish List" for a HI2CREAD / HI2CWRITE type command.

http://www.picbasic.co.uk/forum/showthread.php?t=6136&highlight=mssp

I found a promising thread started by circuitpro that I hope it will help me. I'll be back with results after some testing is done.

http://www.picbasic.co.uk/forum/showthread.php?t=13488&highlight=mssp

Has anybody made this MSSP work with an external EEPROM? Any inputs/ideas?

Robert