Page 1 of 2

send/receive string

Posted: Fri Jun 02, 2023 1:16 pm
by samtin
Hello!
I have a question. I want to transmit the string "AD1CB4E1AA2EDDAF" through the serial communication pin (RC6) of the PIC16F877A using a transmitter RF module and receive the string using a receiver RF module connected to the pin (RC7) of the second PIC16F877A, and as confirmation that the string was received to light a led. How should I proceed? I am attaching the two flowcharts.
Thank you very much.

Re: send/receive string

Posted: Fri Jun 02, 2023 3:51 pm
by chipfryer27
Hi

Although for Bluetooth, principles are the same
Hope this helps
Regards

Re: send/receive string

Posted: Fri Jun 02, 2023 6:03 pm
by samtin
Hi
Thank you very much for the answer, I think it will help me.

Re: send/receive string

Posted: Fri Jun 02, 2023 7:21 pm
by medelec35
Hi.
Just one additional thing to chipfryer27's helpful post.
When converting a Float to a string, you can state how many decimal places to round to.
Take a look at this Wiki entry

Re: send/receive string

Posted: Sat Jun 03, 2023 9:04 am
by samtin
Hi
Thank you very much medelec35 for the link, it really adds to what interests me.

Re: send/receive string

Posted: Sat Jun 03, 2023 12:54 pm
by samtin
Hello everybody
I did not get the expected results, the LED does not light up. I did a test by connecting the development boards with wires and it works like that, but in RF it doesn't work. If the data is received in RF, shouldn't the received string be found in the "receiver" variable?

Re: send/receive string

Posted: Sat Jun 03, 2023 1:29 pm
by chipfryer27
Hi

Do you have a datasheet for the RF modules? Do they perhaps need some configuration or to be paired?

Regards

Re: send/receive string

Posted: Sat Jun 03, 2023 2:35 pm
by samtin
Hello
They are 433MHz RF modules, they are simple, they work because I test on the same development boards with 16F877A other string sending and receiving programs.

Re: send/receive string

Posted: Sat Jun 03, 2023 3:46 pm
by chipfryer27
Hi

Can you post your Flowcode file?

Stange it works over wire but not RF which does suggest module related.

Do you have a USB-TTL serial converter? If so run a terminal program and see what is happening at the module Tx/Rx pins.

Regards

Re: send/receive string

Posted: Sat Jun 03, 2023 4:06 pm
by samtin
Hi
I don't have HC-05 modules, nor USB-TTL serial converter, I only have RF 433MHz modules that work, for tx a pin in data and for rx a pin out data.

Sorry, I forgot the flowchart.