Discussion in "New Ideas regarding projects" started by    iec    Sep 9, 2014.
Tue Sep 09 2014, 10:47 am
#1
HI ALL

I try to implement same code in master and slave for spi communication. Is it possible to do so? In detail, master will have code for both master_init and slave_init. The exact replica will be in slave controller. Which ever turns on first, it needs to configured as master and the other one as slave. This is my requirement. Innovative ideas, suggestions, h/w suggestions are requested on this concept
Thu Sep 11 2014, 10:14 am
#2
master will always lower down the Chip select... so who so ever lowers the chip select pin of other controller will be the master. thats the simplest thing I can think of. You can put chip select as input in both controller from start and if possible keep it on interrupt pin so it becomes a highest priority. as soon as interrupt comes you set the mode as slave for the controller and controller who is putting CS low will be come master automatically.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

TimmyJup
Wed May 08 2024, 12:22 am
Shawnarows
Tue May 07 2024, 10:16 pm
GlennVet
Tue May 07 2024, 04:46 pm
RonaldJoump
Tue May 07 2024, 10:15 am
Jasonkam
Mon May 06 2024, 10:00 pm
JamesroW
Mon May 06 2024, 09:37 am
Chrispes
Mon May 06 2024, 07:34 am
ArktiTic
Sun May 05 2024, 07:06 pm