Forum Discussion
Altera_Forum
Honored Contributor
16 years agoBidirectional SPI switch?
This is a complex problem which I am very unsure of, the basic idea is that I want code that switches between 3 SPIs. I was startled when I noticed the statement that I was about to write ...
Altera_Forum
Honored Contributor
16 years agoIf I have understood you, you have A,B,C SPI interfaces and you want C to talk to either A or B:
(1) C to A or B Since you have chipselect then you can drive both at same time then use chipselect. (2) A or B to C: use your switch to drive C This pseudocode may explain my idea:
if OE = ?
A <= C;
B <= C;
C <= 'Z';
else
A <= 'Z';
B <= 'Z';
if select = ?
C <= A;
else
C <= B;
end if;
end if;