Using UART1 in C

Questions on UARTs, and serial communication
Post Reply
YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

Using UART1 in C

Post by YahooArchive » Fri Jan 25, 2013 3:58 pm

Hello,
I am using an armite board with the C compiler. I would like to use the
hardware function of UART1. Is there a specific function I should be using,
similar to RXD0() and TXD0()? Also, which pins on the board are connected to
TXD and RXD of UART 1? I don't need access to hardware flow control or a full
modem interface. The documentation doesn't seem to mention UART1.

Thanks for your assistance.



YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

Re: Using UART1 in C

Post by YahooArchive » Fri Jan 25, 2013 3:58 pm

IO(0) and IO(1) txd1() and rxd1()

YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

Re: Using UART1 in C

Post by YahooArchive » Fri Jan 25, 2013 3:58 pm

Thanks, It looks like my version of MakeItC was out of date. I just downloaded
the one from your website and the RXD1() function is in the documentation.

I purchased the C sources a while back. Will I have any issues using them with
the updated compiler?

YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

Re: Using UART1 in C

Post by YahooArchive » Fri Jan 25, 2013 3:59 pm

> Thanks, It looks like my version of MakeItC was out of date. I just
downloaded the one from your website and the RXD1() function is in the
documentation.
>
> I purchased the C sources a while back. Will I have any issues using them
with the updated compiler?

MakeItC gets updated more often, but the GCC compiler we use has not changed for
quite some time, so you should not have any issues.

The latest C sources were generated in June, 2009. We don't update them often,
maybe once a year. We will send those that purchase the source the update if
they contact Coridium.

YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

Re: Using UART1 in C

Post by YahooArchive » Fri Jan 25, 2013 6:24 pm

I am using the ArmExpressLite.
The following is an excerpt from the C help for armexpress family documentation

void TXD0(int byte); // for hardware support
void TXD1(int byte); // for UART1

Description
UART0 UART1 support-
The hardware serial port routines are used, so the CPU is not tied up. So when
a byte is sent it is placed into the UART FIFO, but if the 16 byte FIFO is full
then the CPU will wait until space is available.


Where can I find more information about the UART that is refered to?
And more specific can I check the FIFO count before stuffing data into it?

Thanks, in advance for your help. Ken

YahooArchive
Posts: 1463
Joined: Fri Oct 19, 2012 5:11 am

Re: Using UART1 in C

Post by YahooArchive » Fri Jan 25, 2013 6:24 pm

> Where can I find more information about the UART that is refered to?
> And more specific can I check the FIFO count before stuffing data into it?

There is more info on the UART in the user manual from NXP, link in the help
file

http://www.nxp.com/acrobat_download/dat ... 2_03_4.pdf

Unfortunately other than knowing when the FIFO is empty, there is no other
indication of how much space is available.

Post Reply