This project is a temperature monitoring and fan control system implemented on a PIC18F4620 microcontroller. The system reads temperature data from a DS1621 sensor via I2C and dynamically controls a cooling fan using PWM. The temperature readings are displayed on an ST7735 TFT screen over an SPI interface.
✅ Real-time temperature monitoring using a DS1621 sensor
✅ Dynamic fan speed control based on temperature thresholds
✅ TFT display for live temperature readings (ST7735, SPI interface)
✅ UART-based debugging for real-time diagnostics
✅ Optimized I2C routines to improve bus reliability
- Microcontroller: PIC18F4620
- Sensors: DS1621 (I2C Temperature Sensor)
- Display: ST7735 TFT (SPI Interface)
- Communication Protocols: I2C, SPI, UART
- Software Development: Embedded C (XC8 Compiler)
-
Clone the repository:
git clone https://github.com/mluna030/ECE3301LabFinal.git cd ECE3301LabFinal -
Build & Flash the Firmware
Open the Final_lab.X project in MPLAB X. Compile the project using the XC8 compiler. Use a PIC programmer (e.g., PICKIT 3) to flash the generated HEX file to the PIC18F4620.
- Power up the circuit (5V supply).
- The TFT display will show real-time temperature readings.
- The fan will adjust speed dynamically based on temperature.
- Use UART logging to debug and monitor system behavior.
