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

Robertrip
Fri Apr 26 2024, 11:20 am
ArnoldDiant
Fri Apr 26 2024, 03:53 am
RodneyKnorb
Thu Apr 25 2024, 07:08 pm
Williamjef
Thu Apr 25 2024, 02:08 pm
SamuelSmise
Thu Apr 25 2024, 09:56 am
DustinErele
Thu Apr 25 2024, 08:44 am
ztaletpzca
Wed Apr 24 2024, 11:19 pm
IrardlPex
Wed Apr 24 2024, 08:42 pm