Exactly one week ago #1117:Hi,
All of this detail when the problem was obvious in hindsight. I hadn't set the radio up, even though it was working.
I always used to post the full program, where I knew everything was in them, but as they got longer, I was advised to make smaller test programs, and this is where I went wrong this time.
Sorry for all of the wasted effort caused.
Anyway today I'm allowed to post the mini test program, as previously, it had underscores in the title and previously wasn't allowed.
Here is the latest working program and the results, now where was I?
C
Hi J,Exactly one week ago #1117:
...
Check the radio setup![]()
Is the rotary encoder connected?Hi,
Stuck again, with a strange problem.
I'm again trying to get the MASTER and SLAVE PICs to talk between themselves, but for some reason the Chip select isn't working. It is stuck on, so I do get readings, but I want it to switch OFF.
Here is a small test program, that works in the SIM, but not live.
The LED flashes.
C
Hi J,Is the rotary encoder connected?
Porta.4 is an input pin for the encoder.
Hi S,Either something else is holding the CS line "on", or you are not seeing the 100ms transition between on and off. The other possibility is that the CS pin is damaged on the chip - try another pin just as an experiment. Also, verify the TRIS state is "output" for the new test pin.
Does rled flash in the CS loop? If so, then the code is working and the CS line is either dead or being held high by something external, as mentioned at the start of my comments. Is the analog/comparator turned off for PortA?
No.Hi J,
It's easy to get confused, as I am most of the day, but the encoder is on the PORTA of the SLAVE PIC.
Would you like a clarification post of how it's all connected, including the REMOTE?
C
Hi E,hi C,
It sounds as though you are blaming the problems on writing/using short test programs for debugging.?
I test program will only give the required debug if written correctly.
E
Hi E,hi C,
How have you defined the Array.?
Look at this link, search for Array.
E
https://www.oshonsoft.com/picbasiccompilerreferencemanual.php
Clip:
For experienced users, it is worth noting that a string variable can actually be treated as a byte array, if needed.
For example:
string_var = "1234567"
string_var(3) = "a"
After the execution of this example, string_var variable will contain the string "123a567".
Update:
When the above link has been clicked and displayed, use File/SaveAs [ top left corner].
This will save the complete document as .html.
So to query any Command double-click the .html Icon and you will have all the Oshonsoft text and examples at a click of the mouse on your desktop.![]()