This embedded system measures temperature and humidity and outputs the data on an LCD. The BME280 sensor can also do pressure but I didn't implement it because the MCU had no more space available. The whole project can be found here; I've also included datasheets for the MCU, sensor and LCD.
Development was done on FreeBSD using the workflow I describe here. If you're using Microchip's own tools, you'll have to make some small changes to the code, but nothing too extreme.
The source code.
- Microchip PIC16F877A-I/P microcontroller.
- Adafruit BME280 temperature, humidity and pressure sensor.
- 16x2 LCD.
- 1x 16MHz crystal oscillator.
- 2x 10kΩ resistor.
- 2x 300Ω resistor.
- 1x 10kΩ potentiometer.
- 2x 22pF ceramic capacitor.
- 2x LED.
- 2x push-button.
- Breadboard and wires.
- 3x AAA batteries (4.5V total) or a 9V battery with a 5V voltage divider.
Safe temperature range
|PIC16F877A||-40°C - 85°C|
|BME280||-40°C - 85°C|
|LCD||-20°C - 70°C|
So, it's best for the system to operate in the -20°C to 70°C range.
You can also get the PDF version.