henrik
i made a little change

used this style
IF P2.15 = 1 THEN
p2.highWORD = 65535
ENDIF

for all the casts to long , it saves a worthwhile bit of code space

can't test humidity on pic yet , just discovered the dishonest ebayer has sold me 4 out of 5 bmp280's in lieu of bme280 boards.
i can't tell them apart with naked eye, must admit the temp seems more accurate in absolute terms for the bmp boards there is nearly a 3 deg difference between bme and bmp readings in the same aircon'ed room and thats closer to the mercury bulb . are cheap ebay things always a bit dodgy?