Continue to Site

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.

  • 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.

PIC plus-5110 LCD-GPS-BMP280-HMC5983

Status
Not open for further replies.
Ok, you are right.
There was another table in the calculations page, where UT, UP where mixed.
Hi J,
Ok.

Do you have the Oshonsoft simulator?
I just ran your latest CALC through it:

For i = 0 To 2
adr = 0xf7 + i
'SPISend adr
'SPIReceive data
b(i) = data
Next i
[Produced i+1 adr=247, i+2 adr=248, i=3 adr=249]


For i = 0 To 2
adr = 0xfa + i
'SPISend adr
'SPIReceive data
b(i) = data
Next i
[Produced i+1 adr=250, i+2 adr=251, i+3 adr=252]

EDIT: When you edit your latest CALC will you change 't' to 'tp' please, for ease of reading. (for me anyway:))

C.
 
Last edited:
Hi,
Trying to understand .HB .LB and .3B

Is this correct?

t_raw.LB = b(2) _________XXXXXXXX
t_raw.HB = b(1) XXXXXXXX_________
t_raw.3B = b(0) __________________XXXXXXXX_________
C.
 
Hi J,
Ok.

Do you have the Oshonsoft simulator?
I just ran your latest CALC through it:

For i = 0 To 2
adr = 0xf7 + i
'SPISend adr
'SPIReceive data
b(i) = data
Next i
[Produced i+1 adr=247, i+2 adr=248, i=3 adr=249]


For i = 0 To 2
adr = 0xfa + i
'SPISend adr
'SPIReceive data
b(i) = data
Next i
[Produced i+1 adr=250, i+2 adr=251, i+3 adr=252]

EDIT: When you edit your latest CALC will you change 't' to 'tp' please, for ease of reading. (for me anyway:))

C.
I have the simulator, the values are ok.
 
Hi,
Trying to understand .HB .LB and .3B

Is this correct?

t_raw.LB = b(2) _________XXXXXXXX
t_raw.HB = b(1) XXXXXXXX_________
t_raw.3B = b(0) __________________XXXXXXXX_________
C.
The values from b() are correct, the picture not, if you mean the byte positions.
They are the bytes in a long integer ( 32 bit, 4 bytes )
Starting from the most significant byte ( left )
X.4B X.3B X.HB X,LB
X.4B not used here.
 
The values from b() are correct, the picture not, if you mean the byte positions.
They are the bytes in a long integer ( 32 bit, 4 bytes )
Starting from the most significant byte ( left )
X.4B X.3B X.HB X,LB
X.4B not used here.
Ok, Is this ok? I hope so, it looks more sensible.

t_raw.LB = b(2) _________________________XXXXXXXX
t_raw.HB = b(1) ________________XXXXXXXX_________
t_raw.3B = b(0) ________XXXXXXXX___________________
C.
 
Ok, Is this ok? I hope so, it looks more sensible.

t_raw.LB = b(2) _________________________XXXXXXXX
t_raw.HB = b(1) ________________XXXXXXXX_________
t_raw.3B = b(0) ________XXXXXXXX___________________
C.
It is ok, but the bits don't overlap :)
 
Hi,
Here's the latest program with CALC. Will someone check it please?
The TEMP looks like it's reading and shows TEMP= 512XXX.0 to 52XXXX.0 with finger heat.
PRES is all over the place.

There are lines with ?????????????????? that I doubt.
C.
 

Attachments

  • 18LF4520 PCB CALC 020218 1200.bas
    11.1 KB · Views: 197
Is the TEMP a raw or ADC_t value or the final t after calculation?
Can you display the adc_t and t.
t should be something like 22.34 in room temperature.
It is better forget the pressure until temperature measurement is ok and display now only temperature values.
 
Is the TEMP a raw or ADC_t value or the final t after calculation?
Can you display the adc_t and t.
t should be something like 22.34 in room temperature.
It is better forget the pressure until temperature measurement is ok and display now only temperature values.
Hi j,
TEMP is now showing 22.0 to 24.0 with finger heat:)
C.
 
Hi,
The TEMP is showing approx 2.5° higher than my none scientific thermometer.
The PRES is showing 154xxx.xx, but seems too influenced by the TEMP.
I tried it in a food container, and pressed on it to make the PRESS rise, but it didn't.
Here's the latest:

C.
 

Attachments

  • 18LF4520 PCB CALC 020218 1600.bas
    10.7 KB · Views: 196
I don't see any writes to Conf, Reset, Control addresses
0xF5, 0xE0, 0xF4 ?
You could strip extra unused variables and constants.
Would be easier to read.
 
I don't see any writes to Conf, Reset, Control addresses
0xF5, 0xE0, 0xF4 ?
You could strip extra unused variables and constants.
Would be easier to read.
Hi J,
Here's a shorter one.
Check my WRITE addresses are correct, HIGH BIT = 0 instead of the actual address.
I've removed some of the WAITs. Earlier it didn't seem to work without them, but now the results are the same, with this program.
C.
 

Attachments

  • 18LF4520 PCB CALC 030218 1000.bas
    8.9 KB · Views: 188
Could you check, that SPI is working correctly.

Add a byte variable ID ( device Id ) and get it by:
SPIsend 0xD0
SPIreceive ID

ID should be 0x58 ( 88 decimal )
 
Could you check, that SPI is working correctly.

Add a byte variable ID ( device Id ) and get it by:
SPIsend 0xD0
SPIreceive ID

ID should be 0x58 ( 88 decimal )
Hi J,
Check the 0xF4 0xF5 settings, as I haven't set them with much thought yet.
C.
 

Attachments

  • ID.jpg
    ID.jpg
    43.6 KB · Views: 203
Hi,

:facepalm::facepalm::facepalm::)

Previously, I chose to READ TEMP and PRESS in separate programs, to narrow down the errors. When I combined the CALC into one of these MAIN programs, I forgot to turn on the PRESS BITs in 0xF4.

Now I'm getting TEMP READings around 22.00° and PRESS READings, downstairs average '701' and upstairs '670' repeatedly.

I'll need to check all of the settings, again, then post the program.

Thanks J and all.
C.
 
hi C.
Use the online Govt local weather station site to get your local Barometric pressures.
Today should around 980 to 1000mB
E

Edit: I read 1010mB over here.
 
Last edited:
hi C.
Use the online Govt local weather station site to get your local Barometric pressures.
Today should around 980 to 1000mB
E

Edit: I read 1010mB over here.
Hi E,
That's handy for anyone who want to make a weather station. I haven't had chance to check any conversions, but the PRESS was reading 100896.xx yesterday, and today is 102711.xx

I don't actually need this though, as I will zero it on the ground, then use numbers above that as it's altitude. I'll work out how I will use it as I get readings, and get the feel for it.
C.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top