- 1965 C Code Mustang
- Serial Communication C
- Pic16f690 Serial Communication C Code Mustang
- Pic16f690 Serial Communication C Code Mustang Gt
Feb 22, 2014 PIC16f690 serial communication using pl2303. Code-N-Logic 79,804 views. Simple C program plus demo for the microchip PIC16F690 - Duration. Jul 18, 2016. UART stands for Universal Asynchronous Receiver / Transmitter. It is a very popular serial communication interface which provides Full Duplex communication between two devices. Home › PICkit2 programming with MPlabX – PIC16F690 UART ADC. PICkit2 programming with MPlabX – PIC16F690 UART ADC. My main focus was on how difficult it is with the PIC MCUs to get serial communication working (UART), how to read out the ADCs and use the digital pins.
I have a PIC 16F887A connected to the serial port. I want it to lit a green led when it receives 0x01 and lit a red led when it receives 0x00 from pc. I send the characters from a C# windows forms application, the PIC itself is programmed with CCS C. Can you please tell me what i'm doing wrong as the codes below don't work?
Edit: By doesn't work i mean it lits the red led in both cases.
C# Code
CCS C Code
1 Answer
1965 C Code Mustang
If it receives 0x00 in both cases, it is likely that you have a baud rate mismatch, even a slight one. After detecting a start bit, the PIC might be seeing the first 7 zeroes and think it saw 8, going you 0x00 in both cases. I would try transmitting from the PIC and PC and watching the lines on a scope to ensure they are running the same speed. You can also try continuously transmitting 0xAA to get an eye pattern (10101010) and comparing the two signals.