• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Transfering DATA between two pics via SPI OSHONSOFT

jjw

Member
I meant, that in testing the SS can be at 0 permanently.
When using multiple SPI devices the Slave has to be setup every time before using it.
 

camerart

Active Member
I meant, that in testing the SS can be at 0 permanently.
When using multiple SPI devices the Slave has to be setup every time before using it.
Hi J,
I've tried all sorts of combinations of SS, but it only seems to work with [ SLAVEpic = 0 ] at the beginning and [ SLAVEpic = 1 ] at the end of the MASTER LOOP, otherwise nothing appears in the analyser.

EDIT: I added a toggling LED in SLAVE MAIN LOOP. This still flashes whether SS is [ 0 ] or [ 1 ] does this seem correct?
EDITEDIT: [ 1 ]
C.
 
Last edited:

jjw

Member
Hi J,
I've tried all sorts of combinations of SS, but it only seems to work with [ SLAVEpic = 0 ] at the beginning and [ SLAVEpic = 0 ] at the end of the MASTER LOOP, otherwise nothing appears in the analyser.

EDIT: I added a toggling LED in SLAVE MAIN LOOP. This still flashes whether SS is [ 0 ] or [ 1 ] does this seem correct?
C.
I tried to tell it in #160, #161
What do you see in the analyzer?
Show the main loop.
 

camerart

Active Member
I tried to tell it in #160, #161
What do you see in the analyzer?
Show the main loop.
Hi J,
I followed what you suggested in #160 #161, and set up the best I can, I find it easy to get mixed up, so I'll keep posting the whole programs and results as they change in the hope that you or someone can spot any mistakes. An alternative is that you edit the programs, and I'll test them, where there would be no misinterpretation by me. I don't mind either way.

Here's the 2x programs, and result.
C
 

Attachments

jjw

Member
Hi J,
I've tried all sorts of combinations of SS, but it only seems to work with [ SLAVEpic = 0 ] at the beginning and [ SLAVEpic = 0 ] at the end of the MASTER LOOP, otherwise nothing appears in the analyser.

EDIT: I added a toggling LED in SLAVE MAIN LOOP. This still flashes whether SS is [ 0 ] or [ 1 ] does this seem correct?
C.
So something appeared in the analyzer, what was it?
Now SDI in Master seems to be stuck at 1.
 

camerart

Active Member
So something appeared in the analyzer, what was it?
Now SDI in Master seems to be stuck at 1.
Hi J,
As #163 if there is SS ON in Master with no SS OFF, then it sticks. This is how I interpreted your #161.

If I add OFF back into the MASTER program [ SLAVEpic = 1 ] then it shows [ 255 ]

I've edited an error in #162.
C.
 

Latest threads

EE World Online Articles

Loading

 
Top