Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 2 months ago.
RS 232 IS NOT WORKING
Hi, I have done programing of rs 232 with lpc 2378(uart0).In the hardware DB 9connectors TXD and RXD are connected together(loop back test) for testing hardware.The code is as follows void main() { PINSELO|=0X00000050; U0FDR=0; U0LCR=0X83; 8 databit,1 stopbit,no parity U0DLL=78; 9600 baudrate U0DLM=0; U0LCR=0X03; while(1) { U0THR='a'; while(!(U0LSR&0x40));
} } The character a is not displayed in serial window0 .what will be the reason and why?is there any problem with code.please provide valuable suggestions
Thanks in Advance
So the serial data is looped back and connected to a PC at the same time?
Does the PC only have the Rx line connected in order to avoid conflicts on the Tx line?
Are you sure you wired your RS232 level shifter up correctly or are you using a special TTL level cable on the PC?
Do you have the grounds connected?
Do you have an oscilloscope you can use to check the signals?
posted by Andy A 20 Feb 2017