UARTX_Write_Text limitation

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
Dominic75
Posts: 87
Joined: 05 Oct 2012 23:37
Location: Quebec, Canada

UARTX_Write_Text limitation

#1 Post by Dominic75 » 10 Nov 2018 00:12

Hi,
Does anybody know if there is a maximum character we can send using UARTX_Write_Text function? I can't seem to find any limitation in the documentation.

If I send 255 characters all is good:

Send:

Code: Select all

UART2_Write_Text("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890ABCDE");
MikroC Uart Terminal:

Code: Select all

1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890ABCDE
If I send 256 (I added the F in the string), the terminal keeps receiving data in loop forever:

Code: Select all

UART2_Write_Text("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890ABCDEF");

MikroC Uart Terminal:

Code: Select all

12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
01234567890123456789012345678901234567890123456789012345678901234567890ABCDEF123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012
3456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890ABCDEF1234567890123456789012345
67890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234
5678901234567890123456789012345678901234567890ABCDEF1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567
890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890ABCDEF12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
012345678901234567890ABCDEF123456789012345678901234567890123456789012345678901234567890123456789
(I formatted the output so its readable - there is no \r\n in the terminal)

I also tried with TeraTerm to see if the problem was not the MikroC terminal. It's not. Both have the same behaviour.

So is UARTX_Write_Text limited to 255 char max?

Thanks
Dominic

(PIC32MX170F256D / Mikroc PRO for PIC32 v.4.0.0)

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: UARTX_Write_Text limitation

#2 Post by filip » 13 Nov 2018 09:44

Hi,

Yes, this function is limited to 255 characters.

Regards,
Filip.

Dominic75
Posts: 87
Joined: 05 Oct 2012 23:37
Location: Quebec, Canada

Re: UARTX_Write_Text limitation

#3 Post by Dominic75 » 15 Nov 2018 09:23

Hi Filip,
Thanks for the confirmation. Might be an idea to put it in the doc. (Would have saved me an hour and would have saved an unnecessary post :) )

Dominic

Post Reply

Return to “mikroC PRO for PIC32 General”