PIC plus-5110 LCD-GPS-BMP280-HMC5983

Status
Not open for further replies.
What have you changed ?

Anyway the pressure seems right, 1018 mb at Dorset
https://www.worldweatheronline.com/dorchester-weather/dorset/gb.aspx
Hi J,
I didn't change anything, apart from removing the LED toggles that I always use to indicated a LOOP is running.
With it removed, the digits flash ON/OFF very fast so are blurred.

I'm not sure how the SPICS and the 5110 CS ON/OFF affects the 5110. Is there a way to clear the 5110 before re-writing screen changes?
EDITED.
C
 
Last edited:
Hi,

This line give an 'unused compiler warning': Dim row As Byte 'lcd row pointer
Is it necessary?
C
 
Last edited:
Hi,
I cleared the screen artifact using this, perhaps not elegant, way.

print:
msg1 = "TEMP= " + strtp
Call wr_msg(0, 0, msg1)
msg1 = "PRES=" + strpr
Call wr_msg(0, 1, msg1)
msg1 = " "
Call wr_msg(0, 2, msg1)
msg1 = " "
Call wr_msg(0, 3, msg1)
msg1 = " "
Call wr_msg(0, 4, msg1)
msg1 = " "
Call wr_msg(0, 5, msg1)
strtp = ""
strpr = ""
Return

EDIT: There are 14 spaces between the ,msg1= "14" in 2,3,4,5. Not seen because of page formatting (whatever that is?)

C.
 
Last edited:
Hi,
Here's the latest 184520-5110-BMP280 program tidied up a little:
The 18lf4520-5110-GPS program is at #532
Any changes to the 18LF4520-5110-BMP280 program, I'll correct here.
Thanks.
C
 

Attachments

  • 18LF4520 PCB BMP280 PRESS-TEMP 080218 0900.bas
    8.5 KB · Views: 330
Last edited:
hi C,
Barometric pressure changes due to the weather pattern.
Unless you have fixed Base station measuring ambient pressure as a correction factor, how will you calculate the Alt of the model?
E
Hi E,
The transmitter (which I'll be holding) will be sending the LOCation including ALT, which will add/subtract any changes in PRESS on the ground, before sending.
C.
 
hi C.
Perhaps I am missing a point.
If the Base station that you are holding has say a GPS NEO module, that will have the Base Altitude value.??
Also why are you sending the Base Alt to a Remote point/station.?

E
 
hi C.
Perhaps I am missing a point.
If the Base station that you are holding has say a GPS NEO module, that will have the Base Altitude value.??
Also why are you sending the Base Alt to a Remote point/station.?

E
Hi E,
Would you mind asking the question again here please?: https://www.electro-tech-online.com/threads/radio-control-by-location.152926/
so that anyone looking at the project will see what I'm trying to do.

On this thread I'm now trying to combine the last BMP280 program with the earlier GPS part. Can you recall an earlier program where the GPS shows on the 5110? I've tried the one at #301, but while the 'hardware UART' shows the inputted NMEA sentence it doesn't show on the 5110.
I'll carry on looking and let you know if I find a suitable one.

EDIT: Found one here:
C
 

Attachments

  • 18LF4520 8MHz x4 5110 NEO8 SML 050118 1400.bas
    5.2 KB · Views: 309
Last edited:
Hi,
Here's the combined program so far:
The GPS is working ok and showing on the 5110.
The BMP280 shows on the 5110, but the READing is incorrect, and not updating, I recognise those READings from previous tests. I'll have another try tomorrow.
If anyone can spot any obvious errors, please let me know.

EDIT: Programs 050118 1400 and 080218 0900 are the two WORKING programs I'm trying to combine. (Including the two INCLUDES fontsml and get_neo.)
C
 

Attachments

  • RAM.jpg
    55.6 KB · Views: 314
  • 18LF4520 8MHz x4 5110 NEO8 SML 050118 1400.bas
    5.2 KB · Views: 348
  • 18LF4520 PCB BMP280 PRESS-TEMP 080218 0900.bas
    8.5 KB · Views: 329
  • fontsml.bas
    3.9 KB · Views: 315
  • get_neo.bas
    1.4 KB · Views: 298
  • 5110.jpg
    76.8 KB · Views: 323
  • 18LF4520 5110 GPS BMP280 COMBINED 110218 0900.bas
    10.8 KB · Views: 316
Last edited:
You have changed the data to control and config registers from working version.
Try with old values.
Also the reset address is wrong.
 
Last edited:
Could you make some editing to make the program easier to read.
Add empty lines between blocks of code and between procedures.

I am not sure, but it seems that the program goes once through the bmp280 calculation and is then looping in the get_neo
 
You have changed the data to control and config registers from working version.
Try with old values.
Also the reset address is wrong.
Hi J,
I can't see the errors, can you let me know which lines are incorrect please?

From PRESS-TEMP 080218 0900 Program
SPICSOn
PORTD.5 = 0 'CHIP SELECT BMP280 ON
SPISend 0x60 'WRITE 0xe0 RESET ADDR [Is this needed?]
SPISend 0xb6 '%10110110 RESET TO 0x00
PORTD.5 = 1 'CHIP SELECT BMP280 OFF
PORTD.5 = 0 'CHIP SELECT BMP280 ON
SPISend 0x74 'WRITE 0xF4 Control CTRL_MEAS reg addr
SPISend 0xff '%11111111 T/ON P/ON 't_x2 px16 Normal Mode
PORTD.5 = 1 'CHIP SELECT BMP280 OFF
PORTD.5 = 0 'CHIP SELECT BMP280 ON
SPISend 0x75 'WRITE 0xF5 Control CONFIG reg addr
SPISend 0x1c '%00011100 osrs_t 0.5ms Table 11-11R filter x16 table 6
PORTD.5 = 1 'CHIP SELECT BMP280 OFF
SPICSOff

From COMBINED 080218 1600 Program
SPICSOn
PORTD.5 = 0 'CHIP SELECT BMP280 ON
SPISend 0x60 'WRITE 0xe0 RESET ADDR [Is this needed?]
SPISend 0xb6 '%10110110 RESET TO 0x00
PORTD.5 = 1 'CHIP SELECT BMP280 OFF
PORTD.5 = 0 'CHIP SELECT BMP280 ON
SPISend 0x74 'WRITE 0xF4 Control CTRL_MEAS reg addr
SPISend 0xff '%11111111 T/ON P/ON 't_x2 px16 Normal Mode
PORTD.5 = 1 'CHIP SELECT BMP280 OFF
PORTD.5 = 0 'CHIP SELECT BMP280 ON
SPISend 0x75 'WRITE 0xF5 Control CONFIG reg addr
SPISend 0x1c '%00011100 osrs_t 0.5ms Table 11-11R filter x16 table 6
PORTD.5 = 1 'CHIP SELECT BMP280 OFF
SPICSOff

Here's what I'm following regarding RESET, can you point out what's wrong please?

I'll update a more open program in #533
C
 

Attachments

  • Reset.jpg
    43.8 KB · Views: 308
Spisend 0x60 should be Spisend 0xE0

You changed the values of control register and config register.
I don't know if they are wrong now.

Seems that there is no return from get_neo ?
 
This was control register in the last .version

' BMP280
SPISend 0x74 'WRITE to 0xF4 Control CTRL_MEAS reg addr
SPISend 0x5f '%01011111 T/ON P/ON 't_x2 px16 Normal Mode

The reset was there also wrong.
Maybe it is not needed.
 
This was control register in the last .version

' BMP280
SPISend 0x74 'WRITE to 0xF4 Control CTRL_MEAS reg addr
SPISend 0x5f '%01011111 T/ON P/ON 't_x2 px16 Normal Mode

The reset was there also wrong.
Maybe it is not needed.
Hi J,
I've changed the 0x5f settings.

I use the Reset with MSB switched to '0' for WRITE, so E0 = 60 Is this incorrect?

I've posted the two programs 050118 1400 and 080218 0900, that I'm combining in #533 they both work individually ok.

EDIT: I've changed the get_neo! I think what happens is, in the MAIN LOOP there is a 'get_neo' LOOP which has a 'get_val' GOSUB which RETURNS to inside the 'get_neo' LOOP. I've removed the 'GUSUB
Having said that it's the BMP280 that is not updating on the 5110, and the GPS is working ok.

C.
 
Last edited:
Is the Yled toggling in the combined program?
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…