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.

Any IC functions exactly the same as relay?

Status
Not open for further replies.

LJJJ

New Member
I am doing a project which uses two SPI masters (a camera and a MCU) and two SPI slaves (memory cards). I need to switch the slaves from one master to another periodically.

Is there any IC (functions exactly as relay, with very low resistance and will not interfere with the signals) that I can use to do the switching?
 
I am doing a project which uses two SPI masters (a camera and a MCU) and two SPI slaves (memory cards). I need to switch the slaves from one master to another periodically.

Is there any IC (functions exactly as relay, with very low resistance and will not interfere with the signals) that I can use to do the switching?

What do you mean exactly "by does not interferre with the signal". What's wrong with using two different SPI ports on the MCU- one configured as a slave and another configured as a master? What do you need to be done exactly (now how you want to go about it, but what actually needs to be done).

Oh, it's called a muliplexer. But it would seem to add a bunch of unneeded complexity and you could probably reorganize things to make it simpler and not need a mux.
 
Last edited:
One SPI master is a commercial product which I cannot do anything to change it, which is a module recording data periodically into a memory card.

Another SPI master is a MCU which I use to read the memory card and transfer the data to somewhere else.

The reason to switch between the two memory cards is to minimize any interruption to the data recording process by the commercial module.

Any suggestion how can I do the switching?
 
Last edited:
Are you using SD cards or...? Are the cards socketed? Are the MCU and recording module part of the same project?
 
Last edited:
Oh I see. So the camera is a master that writes to the slaved memory cards, but you also want the MCU to read from the memory card at the same time (which means it also has to be a Master). So you almost want to use memory card as sort of a dual-port memory?

You'd use one memory card if you could, but so far the only way you can think of reading and writing from the memory card at the same time is two interleave two cards. Hmmm...that is a tricky one. Why can't you have the camera (SPI Master) going straight to the MCU (SPI slave)? Is it just not fast enough? What if you use a FIFO or something? Because if the problem is that the MCU is not fast enough...well...large flash memory cards aren't really going to fix that unless you decide to stop the camera periodically and wait for the MCU to catch up. Because if it runs continuously, the camera is going to outpace it eventually and you have to throw away some data somewhere. If the MCU was fast enough you would be able to feed it directly.

THe problem with switching memory cards is you need a way to pause the camera from sending data as you do the switch. Another issue is you may not be able to simply redirect the camera data to another memory card and expect to properly read it. It depends on the data structure that the camera is outputting, but since I don't know anything about it I can't say much more than that. Like is it video data? Or just time-stamped text strings for telemetry or something like that that can easily be broken apart during the memory card switch?
 
Last edited:
Oh I see. So the camera is a master that writes to the slaved memory cards, but you also want the MCU to read from the memory card at the same time (which means it also has to be a Master). So you almost want to use memory card as sort of a dual-port memory?

You'd use one memory card if you could, but so far the only way you can think of reading and writing from the memory card at the same time is two interleave two cards. Hmmm...that is a tricky one.


Yes, you are right.

Going straight to the MCU (SPI slave) is one option, but I would like to try with this switching method first, which I think will be easier.

The camera module is writing data intermittently, so I can do the switching when it is not writing.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top