Multiple UART connections questions

General discussion on mikroC PRO for AVR.
Post Reply
Author
Message
PPK
Posts: 18
Joined: 08 Jan 2018 06:27

Multiple UART connections questions

#1 Post by PPK » 31 Jan 2018 06:00

Hi,

In my new project I will be using either a Mega2560 or XMEGA device.
Both of these chips have four UARTS available.

I want to run TWO bidirectional serial connections at once. Typical baud rates of 19200KB or 38400KB.
I need to be transmitting and receiving on both connections at once.
How do I do this?

Second question. Does MikroC have a Transmit/Receiver buffers for the serial ports. Ie It would be nice if there were say a 20 byte TxBuffer and a 20 Byte RxBuffer or what ever size was required.

Thanks,
Neil.

User avatar
marko.stankovic
mikroElektronika team
Posts: 108
Joined: 18 Dec 2017 15:44

Re: Multiple UART connections questions

#2 Post by marko.stankovic » 02 Feb 2018 08:45

Hi,

You can use two UART at the same time if your microcontroller has this possibility.
In our compiler there is a library for UART, in the help file you can find an explanation for each function of UART.
Also, when you install a compiler you have an example for UART.
We do not have already defined Transmit/Receiver buffers for UART, but you can define a buffer in the project.

Best Regards,
Marko Stankovic.

Post Reply

Return to “mikroC PRO for AVR General”