Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Connecting serial EEPROM to two PICs

Status
Not open for further replies.

joe_1

Member
I've heard of connecting multiple EEPROMS to same PIC and controlling which one is selected via the CS, but I am wondering if there is any way where I can connect the same serial EEPROM to two different PICs. Because I want both to be able to access the info stored on it.
Of course the two PICs won't be talking to the EEPROM at the same time I have control over that, but the issue I see is that the serial EEPROM has two inputs into it (DO, CLK), and they are outputs from the PICs, and they will certainly have different voltages, and I don't see how I can solve this issue.
 
You should arrange the PICs so that:

1. They don't both talk at the same time

2. When not talking, the output are high impedance, also known as tristate.

3. There is a pull-up resistor on each line and the PICs are configured as Open-Drain outputs.

For I2C EEPROMs, the pull-up resistor and the open drain outputs is the normal way of doing things. It prevents a clash between the EEPROM and the PIC if the PIC changes its connection from an output to an input slightly late.

Condition 2 from my list is just about inevitable if you meet condition 1 and 3.

Many PICs cannot explicitly make the outputs Open-Drain. On those PICs, you should make the output low all the time, and when you want the pin to be high or an input, set the corresponding bit on the TRIS register.
 
...
Many PICs cannot explicitly make the outputs Open-Drain. On those PICs, you should make the output low all the time, and when you want the pin to be high or an input, set the corresponding bit on the TRIS register.

I just wanted to add that you can use a diode on each PIC output to make them simulate "open drain". That can be convenient if using the PIC internal MSSP or USART module that might not have an open drain pin.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top