Page 1 of 1
SPI Slave
Posted: Tue Nov 20, 2012 4:26 pm
by Mathy
Hello !
Is someone already changed the existing SPI macro to make a SPI slave ?
It will be very usefull to me
Thank you !
Re: SPI Slave
Posted: Tue Nov 20, 2012 5:14 pm
by Enamul
Hi
I am not quite clear what you are looking for! You can easily use existing SPI to communicate data to&from slave SPI device just need to know some basic bits about the slave device..like address, clk transition,SPI clock polarity and supported speed.
Re: SPI Slave
Posted: Tue Nov 20, 2012 5:29 pm
by Mathy
Oh sorry, my english is still so bad
I have already use the existing SPI macro to communicate with digital potentiometer for exemple. No problem for that.
But I would like to use SPI in slave mode to share data between two MCU or more so I need one MCU with a master SPI and some MCU with slave SPI.
Is it more clear ?
Re: SPI Slave
Posted: Tue Nov 20, 2012 6:12 pm
by Enamul
OK. Thanks. That's much clear now. If you don't need to strict to SPI you can use I2C to communicate between PIC. Here is a link for that where the code is mainly written for FCv4 but can be used for FCv5 with some correction for some of the chips.
http://www.matrixmultimedia.com/mmforum ... f=7&t=7081