This is my first post on this forum, my name is Gabriel and i'm an electronics addict (and spear-fisherman addict but that is another story) :)).
The problem is like this: I have one arduino uno board, one SD Card module (from LCstudio the one without level adapter) and one ENC28j60 module.
I use CD4050 for SD module level shifting .
When i use them separately everything goes smooth and clear (i can read/write on sd card using any of the available library) and regarding the ETH module i've test it with the examples from EtherShield -so they work as they should (well there are some errors sometimes on the sd card but i guess that is because of the long cables that i use).
I've also tried to make them work together: reading an html file from SD card and send it over the network.... well here was no success. It doesn't really matter what method i used (read in buffer the print it out... send it char by char... anyway nothing i've tried worked).
I have some question for you, if you are kind enough to answer:
Is there any order in particular that i should initialize the net module and sd card? (could be that both modules keep the MISO line up ... as far as i know, MISO line should be in a tristate if the device is not in use)
Could be a problem to the fact that both output signals are from 3.3v IC (i saw that ENC28j60 is 5v tolerant but... could be a problem on SPI bus ? as far as i know it would be 3.6v as a minimum for a signal to be recognized as logical 1)
I'm sorry for being so rude, but can anyone put me on the right track... if there is one? It's almost a week since i do all kind of research and still not being able to make it work.
Are you supplying power to the arduino externally or just from the usb? i was advised to do that when i was having hardware issues. hope that helps because thats all i have right now. cheers!
Thank you for the answers ... but.... is it possible to enable both SPI slave (sd and network card)? That was one of the questions i had in mind, when one is enable the other one is disabled, of for this sync the SPI library have it own way?
The libraries low level read and write functions control the SPI slave selects for each device once the devices are started correctly. Both should leave the slave select for that device HIGH (disabled) after each access call, so there will be no interference (bus collisions) on the SPI bus.
SurferTim thank you for your time. I will do some more tests and i will let you know. And again i will make a PCB that will host both modules and i will not use wires to connect them to arduino ... and also i will build a separate power supply of 5v and 3.3v hope it will help.