Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hi J, [ TRANSMITTER ]send something from master once.
in the slave read buffer full bit until it is 1
then data=SSPBUF
print data
stop
What is the hint?Hi J,
With these: I got a hint on MISO.
C.
Hi J,What is the hint?
You can't use spisend, spireceive on the hw slave.
The slave is a passive device. It outputs SSPBUF on masters clock.
Try a small pause between SSPsend and SSPreceive on master
The slave waits for 8 or 9.Hi J,
HINT: This is the first time, I've noticed anything on the ANALYSER MISO line.
Ok, I changed SLAVE to this:
I added [ waitms 10 ] in MASTER and only ever see [ 255 ]
C
Hi J,The slave waits for 8 or 9.
What does the master send?
Hi J,The slave waits for azilb or azihb. What are they?
Hi J,If SSPBUF = azilb Then <------ what is the value of azilb
SSPBUF = azi.LB
Else
If SSPBUF = azihb Then <------ what is the value azihb
SSPBUF = azi.HB
Endif
Endif
If the master does not send the value of azilb or azihb the program gets never past this.
The naming of variables like azilb, azihb and then using azi.lb azi.hb is confusing.
Edit: found azilib is 1, azihb is 2
Try to send 1 from master, then 2
Show the whole Slave procram.
Surely the master can send anything.Hi J,
The MASTER can't SEND the values, because it doesn't know them, as they are generated in SLAVE.
I've tried many variations to get this to work, including your suggestions, so far I don't think anything has gone from SLAVE to MASTER along the MISO track, apart from 255.
SLAVE:
I used AZI as the ENCODER result, being AZIMUTH (=0-359) which is a WORD, and is split into 2x BYTEs, AZI.LB and AZI.HB
Pleas EDIT the programs, and I'l test them, with whatever VARIABLEs you choose.
Here' are the 2x programs:
C.
Hi J,Remove this from the master:
azilb = 121
SSPBUF = azilb
Add this:
SSPSend 1.
remove SSPSend azilb
Hi J,This shows SPIsend 1
Can you show also the result for SPIReceive
Edit: you can shorten waitms 10 to waitus 40 for example, so send an receive fits on the same screen.