This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC2368 UART1 auto flow control using RTS-CTS

I use MCB2300 keil boards for serial communication in lpc2368. I am try to make auto flow control using RTS- CTS signal given by LPC23xx user mannual. I got proper performance of RTS in keil popup window but i can't get effect on CTS in another kit. My receiver programming is here.

void main (void)
{
#include<stdio.h>
#include<lpc23xx.h>
int main(void)
{
        int i,j;
        CCLKCFG = 0x2F;         // make cclk = Fcco/24
        PINSEL0 |= 0x00000010;  // set pin function as TXD0
        PINSEL1 |= 0x00001001;  // set pin function as RXD1 and RTS1
        U0LCR |= 0x83;
        U0DLM = 0x03;
        U0DLL = 0x54;
        U0LCR = 0x03;
        U0FDR = 0;              // disable Fractional divider register

        U1LCR |= 0x83;          // set 8 databit, 1 stop bit, no parity
        U1DLM = 0x03;
        U1DLL = 0x54;           // set baud rate to 110
        U1LCR = 0x03;
        U1FDR = 0;

        U1MCR |= 0x42;
        U1IER |= 0x00000001;    // enable RDA
        U1FCR |= 0xC7;          // FIFO trigger level at 12 character
        while(1)
                {
                while ((U1LSR & 0x01) != 0x01);
                j = U1RBR;
                while (!(U0LSR & 0x20));
                U0THR = j;
                for(i=0;i<709999;i++){}
                }
        }
}