Forums

UART1 CODE HELP

Started by kanok53 October 22, 2008
hi,
i am new in lpc2106. i want to use UART0 and UART1 simultaneously. i
have successfully run the UART0 which is given in the winarm example
code. but i'm having a problem in running the UART1 which is not in
the example. i have just changed the register name like U0LSR to U1LSR.
i also changed the required PINSEL0 configuration. as it has the full
modem interface so do i have to consider the flow control signal for
simple(no handshaking)data transfer? or what should i do more to work
it out. if possible give me the full code preferably in WINARM as i am
a newbie in this line. thanks in advance?

An Engineer's Guide to the LPC2100 Series

--- In l..., "kanok53" wrote:
>
> hi,
> i am new in lpc2106. i want to use UART0 and UART1 simultaneously. i
> have successfully run the UART0 which is given in the winarm example
> code. but i'm having a problem in running the UART1 which is not in
> the example. i have just changed the register name like U0LSR to U1LSR.
> i also changed the required PINSEL0 configuration. as it has the full
> modem interface so do i have to consider the flow control signal for
> simple(no handshaking)data transfer? or what should i do more to work
> it out. if possible give me the full code preferably in WINARM as i am
> a newbie in this line. thanks in advance?
>

You have to use interrupt based programming. write the routine for the
interrupt and then call one by one for uart0 uart1 respectively.
--- In l..., "vijay_patil53"
wrote:
>
> --- In l..., "kanok53" wrote:
> >
> > hi,
> > i am new in lpc2106. i want to use UART0 and UART1
simultaneously. i
> > have successfully run the UART0 which is given in the winarm
example
> > code. but i'm having a problem in running the UART1 which is not
in
> > the example. i have just changed the register name like U0LSR to
U1LSR.
> > i also changed the required PINSEL0 configuration. as it has the
full
> > modem interface so do i have to consider the flow control signal
for
> > simple(no handshaking)data transfer? or what should i do more to
work
> > it out. if possible give me the full code preferably in WINARM as
i am
> > a newbie in this line. thanks in advance?
> > You have to use interrupt based programming. write the routine for
the
> interrupt and then call one by one for uart0 uart1 respectively.
>
thanks to all.
i have just successfully completed my program to use both the uart
simultaneously. actually it was my fault to determine which uart is
connected to rs232 port(!!!).