uart_read() - no blocking call

General discussion on mikroBasic PRO for PIC.
Post Reply
Author
Message
vartisrl
Posts: 15
Joined: 22 Jun 2023 10:09

uart_read() - no blocking call

#1 Post by vartisrl » 21 Apr 2024 10:39

Dears,
i need your help.
is possible send me an example to use uart_read() to read the string sending from rs232 by pc?
I use Mikrobasic

the scope:
I send a string by serial rs232 from PC and receive in mikrobasic (PIC18F26K80) the same string.
after i comapre the received string by other string stored in the program if the strings are same i execute program, example turn on a led.
The comman uart_read() receive only one byte and is not a blocking call, correct?

I used the uart_read_text, bu this library is a blocking call, if the string arrived is not correct from pc.

thaks for any suggestions.

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: uart_read() - no blocking call

#2 Post by IvanJeremic » 22 Apr 2024 09:46

Hi,

You can find the examples for RS232 on the webpage of our RS232 Click boards.
https://www.mikroe.com/click/interface/rs232

The receiver examples should work for your project.

Regards,

Ivan.

vartisrl
Posts: 15
Joined: 22 Jun 2023 10:09

Re: uart_read() - no blocking call

#3 Post by vartisrl » 23 Apr 2024 04:59

HI,
i use the rs232 on board on easypic7, not click board. The example not work with local rs232 on Easypic7

User avatar
IvanJeremic
mikroElektronika team
Posts: 316
Joined: 05 Sep 2022 14:32

Re: uart_read() - no blocking call

#4 Post by IvanJeremic » 23 Apr 2024 09:18

Hi,

The codes that I sent are to be used as a reference.

You can use the UART example from the compiler as well, just move the jumpers on the board so that you are using the RS232 connector.

Regards,

Ivan.

Post Reply

Return to “mikroBasic PRO for PIC General”