Hi,
I've just come back to this thread, and now see that my optimism in #81 has been dashed, because even though this works with HSEROUT/IN, it needs to work with SPI EDIT: I've re-read this post, and now I think it may be what I need, so I'm testing it again. EDIT EDIT: First attempt failed, I'm puzzled why the SLAVE PIC doesn't need a CS?
Hi J,
The SLAVE is the only SLAVE, but not the only MODULE addressed by SPI. CS/SS is used to time the READing of each module. I thought the SLAVE SS could be used to READ the SLAVE at the correct time in the program.
I don't see on the MASTER (18F4620) what is coming from the SLAVE, but I do see what is HSEROUT from the SLAVE (18F4431) by using a computer Terminal (e,g Tera term)
Hi M,
I consider a SLAVE as one that has been set up as a SLAVE, e,g,
______________________________________________________________________________
• Serial Data Out (SDO) • Serial Data In (SDI) • Serial Clock (SCK) Additionally, a fourth pin may be used when in a Slave mode of operation: • Slave Select (SS)
______________________________________________________________________________
And MODULES e,g, COMPASS which is simple switched on with CS
______________________________________________________________________________
Hi M,
I can see why all modules need a CS/SS PIN, but I don't know how to set up 2xPICs as MASTER SLAVE. I have an SS track on my PCB between the 2x PICS
I didn't know that CS and SS meant the same thing.
C
Your master and slave setup has been ok before, because some data has been received from the slave.
Check all chip select and sdi / sdo connections for all SPI devices.
Your master and slave setup has been ok before, because some data has been received from the slave.
Check all chip select and sdi / sdo connections for all SPI devices.
Hi J,
No DATA has ever been received by the MASTER PIC from the SLAVE PIC yet.
The slave had a RADIO MODULE that transmitted the QEI AZIMUTH into a computer Terminal, to show the INCREMENTAL ENCODER is working [ HSEROUT "AZI", strazi, crlf ] , but the setting for transferring SSBUF has not yet been done correctly. All the other MODULES e,g, Compass are working on SPI ok.
C.
Hi J,
No DATA has ever been received by the MASTER PIC from the SLAVE PIC yet.
The slave had a RADIO MODULE that transmitted the QEI AZIMUTH into a computer Terminal, to show the INCREMENTAL ENCODER is working [ HSEROUT "AZI", strazi, crlf ] , but the setting for transferring SSBUF has not yet been done correctly. All the other MODULES e,g, Compass are working on SPI ok.
C.