I have fours sensors on my input to a microcontroller. I want anyone of this when detects should send a corresponding status message on my PC via a USB or RS232 ports.
I experienced challenges both on the software part and the hardware part using the PIC16F4550 Microcontroller.
Can anyone suggest me the codes for it and the circuit to accomplish my project?
you can refer uart tutorial of the PIC16F4550 in this website to sent the data to computer…. For detecting the sensors checking the status of the input pin inside a while loop or you can also use interrupt to detect.