And what about BMP180 pressure sensor?
I only find sample code for BMP085 on this forum, and it requires PBPL and high end chip too
but why? isn't that simple I2C interfacing?
And what about BMP180 pressure sensor?
I only find sample code for BMP085 on this forum, and it requires PBPL and high end chip too
but why? isn't that simple I2C interfacing?
Sure, interfacing the chip is simple I2C or SPI but there's some quite heavy math involved in order to go from the raw values you get out of the chip to actual "units". Just look at the datasheet. If you can use the BME280/BMP280 instead, I've posted code for that - but yes it requires an 18F part in order to perform the math involved.
(It might be that the code would work for the BMP180 as well, I won't investigate).
Thanks!
So there is no PIC16 friendly barometric pressure sensor available?
I want to integrate it into my VFD clock project - I already have DHT22, DS3231, TTP223 up and running. So I wanted to add barometric pressure, to do some weather forecasting
(Sorry for not removing protective sheet from filter, this is quite expensive material, a gift was send by Noritake, so I'm keeping it sealed till I'll go to final design stage and incorporate it into finished product).
![]()
Say if 1% precision for me is enough, still 18F needed?
Got some time and tested that approach with ST7920. And it indeed works.
While PBP seems to beginning to belong to dead language category, I'll leave this simple code here anyways - maybe someone will find it useful.
ST7920 is wired as standard HD44780 in 4 bit mode. With appropriate LCD pins defined.
Note: X counter increases after each write by itself, but Y counter - not, so you have to do it manually.Code:LCDOUT $FE,$2E 'enable graphic mode LCDOUT $FE,$80 'set Y position to zero (Top) LCDOUT $FE,$80 set X position to zero (Left) LCDOUT 255 'draw a line consisting of 8 pixels in top left row
And this simple code fills up entire screen with white:
Code:LCDOUT $FE,$2E for Z=0 to 32 LCDOUT $FE,$80+z LCDOUT $FE,$80 FOR x=1 TO 18 LCDOUT 255 NEXT next
How to send $FE with LCDOUT ?
X=$FE
LCDOUT X
It sends statements instead of byte dataFound this accidentally - one of my custom font letters contained $FE pixels, and when using that char, it blowed up all my code. Took me several days to figure the reason (I was thinking about faulty EEPROM, display controller, SRAM on PIC and so on)
Any ideas?
This is very annoying and trashes whole idea of using LCDOUT statement...
Bookmarks