Hi All.
Can some one please help me out here
I want too communicate between a PIC16F1938 and a PIC16F1704 with SPI the 1938 is the Master and the 1704 is the Slave,
I understand that the Master is controlling the SCK(Clock) an the Slave will transmit and Receive the Data on the SCK pulses,
My confusion is if for example the master is running a Clock speed of 20Mhz and the SPI clock is configured as FOSC/64 = 312500Hz and the Slave is Running 500Khz( this is because it must only do a PWM at 10Hz) will the Slave still receive the data correctly as there is a huge difference in Clock speeds.
My guess is yes as the SLAVE SPI is controlled by the clock of the Master however i want to check with you guys before I loose hours trying to ride a dead horse Any thoughts on this is appreciated
General SPI Question /Confusion
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: General SPI Question /Confusion
Hi Peter,
I believe this should be ok.
The only problem I can think of might be that the Master will have to ensure there is enough time between sending SPI bytes to ensure the slave has enough time to receive and process the transferred value.
I believe this should be ok.
The only problem I can think of might be that the Master will have to ensure there is enough time between sending SPI bytes to ensure the slave has enough time to receive and process the transferred value.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: General SPI Question /Confusion
Thanks Ben,
i will give it ago and see
i will give it ago and see
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
- Contact:
Re: General SPI Question /Confusion
Hi Ben.
Just to give some feed back to the question asked here ,it is working well communication with the Slave at such slow OSC speed as you mentioned a person must just allow time for the slave to process the data.the SPI coms are running now a few hours on the bench
Thanks again for your help an advise
Just to give some feed back to the question asked here ,it is working well communication with the Slave at such slow OSC speed as you mentioned a person must just allow time for the slave to process the data.the SPI coms are running now a few hours on the bench
Thanks again for your help an advise
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR