Hi, [ TRANSMITTER ]
Testing 2x PICs on 2x PCB is tricky, and prone to accidental reading errors by me.
MASTER: I've realised that, if a VARIABLE is SENT then RECEIVED, then HSEROUT, it may never have left the MASTER, but looks as if it has been SENT/RECEIVED.
SPIsend data always sends. I have checked this in the simulator.
Try SPIsend 0, then SPIreceive data.
If you still get data=255, then SDI is stuck at 1 or SSBUF in slave is always 255.
Check SDI, SDO at master and slave, SCK at master.
SPIsend data always sends. I have checked this in the simulator.
Try SPIsend 0, then SPIreceive data.
If you still get data=255, then SDI is stuck at 1 or SSBUF in slave is always 255.
Check SDI, SDO at master and slave, SCK at master.
In the slave you have now
loop:
goto loop before SPI slave is initialized, so slave does not respond.
To test, move the loop before '' get count
You have also set QEI interrupts.
Remove them because there are no interrupt routines for them.
In the slave you have now
loop:
goto loop before SPI slave is initialized, so slave does not respond.
To test, move the loop before '' get count
You have also set QEI interrupts.
Remove them because there are no interrupt routines for them.
I looked sdi, sdo, clk, ss tristates settings at slave and they look ok.
Have you checked the connections between master-slave.
Can you watch the signals from master: clock, sdo, sdi.
I looked sdi, sdo, clk, ss tristates settings at slave and they look ok.
Have you checked the connections between master-slave.
Can you watch the signals from master: clock, sdo, sdi.
Hi J,
The two PICS are surface mount and the tracks I measured are between the 2x PICs. The analyser clips, only clip on wires, so won't connect to PICs.
I previously checked PIN to PIN, and how I found the missing Vias.