Configuring PIC24FJ128GC010 for Sensor Module and UART with MPLAB X IDE

Hello! I am using MPLAB X IDE v6.20, XC 16 compiler, MCC(MPLAB Code Configurator), I already configured my master(PIC24FJ128GC010) in MPLAB X IDE with the use of MCC but I don't know is there any need to configure the Sensor module separately or not. I also want to send the sensor readings through UART Communication with the use of USB to TTL convertor to my windows PC and want to observe them in putty terminal. For that I configured UART communication in the same project in MPLAB X IDE and gave the Baud rate of 9600, Start bit 1, Stop bit 1, Parity bit = none, flow control= none and also gave the same to the putty terminal as well. I couldn't find any example explanation video or materials about this sensor module integration with a PIC MCU, ather I could only found the scenario for connecting an external EEPROM with PIC MCU via i2c interface.
5 Replies
Dark AI
Dark AI2mo ago
Hi, @wafa_ath what type of sensor are you using? and have you been able to configure it?
wafa_ath
wafa_ath2mo ago
I am using DHT11 I haven't been able to configure I’ve set up the UART communication with a baud rate of 9600, start bit 1, stop bit 1, parity bit none, and flow control none. Any advice or resources on configuring the sensor
Dark AI
Dark AI2mo ago
To configure the DHT11 sensor with your PIC24FJ128GC010 and transmit data via UART, start by setting up a digital I/O pin on your microcontroller to interface with the sensor. The process involves sending a start signal to the DHT11 sensor, waiting for its response, and then reading the 40 bits of data it transmits.
Dark AI
Dark AI2mo ago
Also ensure your UART is configured correctly (baud rate 9600, no parity, 1 start bit, 1 stop bit, no flow control) and use the UART_SendString function to transmit data. To view the data in Putty, match the serial communication parameters to your UART settings and connect your USB to TTL converter to your PC. Refer to the DHT11 datasheet and MPLAB Code Configurator documentation for further details.
Dark AI
Dark AI2mo ago
@wafa_ath Feel free to reach out here if you have any further questions or run into issues.
Want results from more Discord servers?
Add your server