Remote control by location (PIC in Oshonsoft)

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Gosub print is missing from the last program.
It explains why the temperature and pressure are not shown on the LCD.
Hi J,
I presume you mean the latest program in #308! I see it just above GOTO MAIN.

I've found other issues with the last program, so I'll have to check it all again.
C
 

jjw

Joined Dec 24, 2013
823
Hi J,
I presume you mean the latest program in #308! I see it just above GOTO MAIN.

I've found other issues with the last program, so I'll have to check it all again.
C
It is commented out.

''Gosub print 'TESTESTEST#####################################
''Gosub get_data 'TESTEST###########################
Goto main
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
It is commented out.

''Gosub print 'TESTESTEST#####################################
''Gosub get_data 'TESTEST###########################
Goto main
Hi J,
That's strange, I see this:

Anyway, I have tried different ideas, commenting lines IN/OUT and adding chip selects, etc.

Next I'm going to find an old PCB with 5110, and get an early program to work, then try copying it onto the latest one, once it's working.

Thanks, C.
 

Attachments

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Clearly the program in #308 is different from the program you are working on.
Hi J,
The screen shot from #325, is what I see if I click on it. This is strange isn't it.

I've been changing the #325 program slightly many times since then to get it to work.

I'm now going to try a very early much shorter 5110 program on a different TEST PCB.
C
 

jjw

Joined Dec 24, 2013
823
Hi J,
The screen shot from #325, is what I see if I click on it. This is strange isn't it.

I've been changing the #325 program slightly many times since then to get it to work.

I'm now going to try a very early much shorter 5110 program on a different TEST PCB.
C
I don't see any #325 program, only a screenshot from some secret program :)
 

ericgibbs

Joined Jan 29, 2010
21,452
hi C,
You don't add those parameters to the program code, it is posted just to show the internal timing as a reference only for the LCD.
E
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
Hi,
I've transferred #333 to the NEW PCB, and changed PINs SYMBOLS etc

From tests, I'm guessing that the problem isn't with the 5110, but if the program doesn't have results e,g, TEMP, PRESS, then nothing appears on the screen, then 'say' with a different program, that gets results, but the 5110 isn't set correctly, PRINTs because the first program set it up.
A bit difficult to follow, but I'll work on this idea.
C.
 

jjw

Joined Dec 24, 2013
823
I think I have found the error.
You have defined SPI_CS = PORTD.4 which is CS for LCD.
Everytime, when in the program there is SPICSON, LCD is selected even when BMP280 is selected by its own CS.

You can remove all SPICSON SPICSOFF and set/clear the actual chip selects by using the PORTD bits.
 

Thread Starter

camerart

Joined Feb 25, 2013
3,836
I think I have found the error.
You have defined SPI_CS = PORTD.4 which is CS for LCD.
Everytime, when in the program there is SPICSON, LCD is selected even when BMP280 is selected by its own CS.

You can remove all SPICSON SPICSOFF and set/clear the actual chip selects by using the PORTD bits.
Hi J,
Sadly SPI_CS = PORTD.4 is commented out, so not in the program. I left it there as a hint for when a PIC is used as SLAVE, in the RECEIVER.

I remembered adding the SPICSON/OFF when trying to get the 5110 to work a long time ago, but I can try your suggestion. Remind me if I don't please.

The program is a re-mapped #333.
1/We can rule out the 5110 as they are changeable, and still have the same affect.

2/ PIC: The last test PCB was the same PIC, so I doubt this is a problem.

3/ PIN Connection:: I keep checking the connections, and the logic analyser shows ok, also the 5110 does work after the 'sequence'
PIN settings: I'll keep checking settings.

4/ Could the 5110 to PCB distance be a problem. So far the distance has been <10CM the latest is 25CM?

5/ It's possible that the contrast setting could be wrong. I've tried changing it, but nothing changed?

C.
 
Last edited:

jjw

Joined Dec 24, 2013
823
Show the exact program, which won't work,
pins connected to LCD pins and BMP280 pins.
Chipselects in the LCD functions are missing.
The delays are now wrong.
Clock frequency = 32Mhz

I don't know if Oshonsoft accepts removing SPICSON, SPICSOFF, but try it.
Could also cheat it by defining SPI_CS__BIT some unused port pin.
 
Top