Hi E,hi,
Some users have had problems with clock rates, its suggested that the Slave is clocked faster than the Master.
E
Hi E,hi C,
Set up two 18F4620 PIC's as Master and Slave, using internal 8MHz clock, I am able to exchange data between the two PIC, but for some reason the UART signals are corrupted.
I suspect the UART is trying to use some internal hardware of the PICs that the SPI is using.
As you know the Oshonsoft compiler uses bit switching for SPI control, not the HW SPI.
Been on the problem most of the day, may have another session tomorrow.
E
Hi E,hi C,
Rem your Thread Title, Master <> Slave SPI,
That was the content of my last post, I can transfer data to and from PIC Master to Slave, using the set up I explained.
BUT, I know your project does use the PIC UART, so I tried testing the UART with SPI running, initial results show the UART data is corrupted.
I will try to determine the cause, if I get time later today.
I thought you knew that HW and SW are the shortened way of saying HardWare and SoftWare.
HW components refer to the physical modules within the MCU, ie: A HW SPI setup uses the inbuilt modules, SW SPI requires software/program Bit switching and Timing.
E
Hi E,hi C,
All I intend doing at the first stage is get reliable SPI data exchange between the Master and Slave MCU's, using the HW SPI, with Oshonsoft Basic coding, also hopefully fix the UART corruption.
There is no point in asking will it work with that code snippet you posted, that is not the problem we are trying to solve.
I am not using SW SPI Bit switching in my tests.
E
Hi E,1/ Only the 18F4620 MASTER uses UART in the TRANSMITTER. The 19F4431 SLAVE uses the same PIN for HSEROUT/UART and TX, so no UART needed here.
I think that from what I now understand it will all be compatible, as they both use HW SPI
Hi C,
You are missing my point.
The UART appears not to be usable in the 18F4620 when HW SPI is being used... I am working on a solution.
E
Hi E,hi C,
I have two 18F4620 PIC's running at 8MHz reliably exchanging SPI data using Oshonsoft Basic, also the two PICs have UART 9600 Baud communication to two external PC's for data validation.
For the next step I need to know from you, what,when and how the SPI, the two PIC's are using the SPI link.??
Please don't post any program code, just a text description explaining what data is being exchanged, how often etc............
E
Hi E,Hi C,
You are not answering my questions, so I cannot offer any further help you with your project.
E
Hi E,hi C,
Reading your last post, I read it as describing this block diagram of the project, please confirm.
E