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

Richardgar
Sat Apr 20 2024, 11:05 am
AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am