View previous topic :: View next topic |
Author |
Message |
javick82(Guest) Guest
|
Multiple PIC controlling same EEPROM |
Posted: Thu Jul 30, 2009 6:26 pm |
|
|
I am running into an issue with 2 microcontrollers accessing a single EEPROM chip. In my application, one MCU controls ethernet communications, while the other controls robot functions.
Each MCU can independently access the EEPROM, but when combined I am running into some trouble. I am setting the chip select pin to float when the EEPROM access is completed, but that's still not doing the trick.
Does anyone have some tips or know some resources on the topic?
TIA.
Jason |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jul 30, 2009 7:51 pm |
|
|
Post the part number of the eeprom.
Post your PIC.
Post your compiler version. |
|
|
Guest
|
|
Posted: Thu Jul 30, 2009 9:39 pm |
|
|
I would suggest letting the other CPU know you are accessing the eeprom via IO lines so you don't get collisions. |
|
|
javick82 Guest Guest
|
|
Posted: Fri Jul 31, 2009 5:32 am |
|
|
MCU - PIC 18F6722 (both)
EEPROM - 25LS1024
Compiler: V. 4.2. Something (it's all I remember from home)
I am reading 0's back instead of the data. The driver I am using to control the EEPROM is based off of the one that comes with the compiler. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Fri Jul 31, 2009 5:56 am |
|
|
You apparently missed to tristate all output pins to the EEPROM, only chip select isn't enough. |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Fri Jul 31, 2009 7:10 am |
|
|
I did a very similar thing with 2-16F877 and I2C FRAM (similar to serial eprom) Very easy.
Note you only need one set of pull-ups.
Both of my PICs had and extra I/O connected together. and to a pull-up.
Thus if you wanted access to the eprom, you check if the i/o was low.
If it was high, you were granted access to the eprom and set the I/o low
so the other PIC knew the bus was bussy. simple hand-shaking. |
|
|
|