RC5

Any bugs you encounter with Flowcode should be discussed here.
ELECTRONICA67
Posts: 239
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Re: RC5

Post by ELECTRONICA67 »

Thanks Martin,

I'm going to start running tests; I'll let you know how it goes in a bit.

Enrique

ELECTRONICA67
Posts: 239
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Re: RC5

Post by ELECTRONICA67 »

Hi,

I started by testing the Arduino receiver, but I only have the Arduino set up in Flowcode 10; do you think that’s why I’m getting this error when programming it :?:

And you created the flowchart in Flowcode 11.

Enrique
Attachments
DEC_ARD.png
DEC_ARD.png (89.08 KiB) Viewed 190 times

ELECTRONICA67
Posts: 239
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Flowcode v11 Re: RC5

Post by ELECTRONICA67 »

I was able to program it in Flowcode 11.

ELECTRONICA67
Posts: 239
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Flowcode v11 Re: RC5

Post by ELECTRONICA67 »

Hi

I’ve been testing the Arduino flowchart, but I haven't managed to get it to detect numbers. I used four IR remote controls, though I’m not actually sure if they operate on the same frequency as the receiver; among them is the Xinda remote sold with the Arduino receiver, which, as far as I understand, uses the NEC protocol.

Enrique
Attachments
Captura de pantalla 2026-08-26 214735.png
Captura de pantalla 2026-08-26 214735.png (64.33 KiB) Viewed 179 times

mnfisher
Valued Contributor
Posts: 2159
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 176 times
Been thanked: 998 times

Re: RC5

Post by mnfisher »

Did you try using the 12f transmitter?

The rc5 protocol seems much less common than NEC format (all the controllers I've tested generate NEC - somewhere i have a one-for-all stick that can do it, just haven't managed to find it)

The good news maybe is that i did a NEC decoder with Jan a few years ago.

ELECTRONICA67
Posts: 239
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Re: RC5

Post by ELECTRONICA67 »

I’m going to test the PCB I made for programming an RC5 transmitter; afterwards, I’ll test the PIC16F1847 flowchart.

You also mentioned that you and Jan built a decoder...

It’s great that the weekend is just a day away. :)

mnfisher
Valued Contributor
Posts: 2159
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 176 times
Been thanked: 998 times

Re: RC5

Post by mnfisher »

I got an NEC decoder working on the 16F1847.

I connected the signal pin of the IR receiver to INT (RB0) - and a UART outputting received data on RB2.

The received data (from in my case one of the little 'coloured LED strip' transmitters - is stored in a 4 byte array - ir_data[0] = address, [1] = inverse of address, [2] = command and [3] = inverse command.

I'm not sure I have the logic quite right - the first repeat signal comes very quickly after a signal (40ms - before I take my finger off the button!) I check that there is a valid signal (adr == ~adr and cmd == ~cmd)

Martin
Attachments
NEC_16f1847.fcfx
(19.14 KiB) Downloaded 572 times

medelec35
Valued Contributor
Posts: 2391
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 759 times
Been thanked: 825 times

Re: RC5

Post by medelec35 »

If it's of any use, my next planned component is going to be an NEC decoder.
The reason being Amazon UK sells 6 receivers for less than £5.
Plus the receiver and remotes are supplied in Arduino and ESP32 Kits ,e.g. by ELEGOO.
I plan to make it tomorrow and it will be a typical Flowcode component i.e. just drag function on to the workspace.
Martin

mnfisher
Valued Contributor
Posts: 2159
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 176 times
Been thanked: 998 times

Re: RC5

Post by mnfisher »

Now you tell us :-)

Feel free to use any of the above - it seems quite reliable. I'm not sure the 'user' needs to access the inverse values - they are useful as a check for a valid command - but this is handled in 'Edge'.

Martin

medelec35
Valued Contributor
Posts: 2391
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 759 times
Been thanked: 825 times

Re: RC5

Post by medelec35 »

mnfisher wrote:
Sat Aug 29, 2026 5:34 pm
Now you tell us
If you noticed, we posted at the same time.
If I posted a few seconds quicker, I would have told you :lol:
mnfisher wrote:
Sat Aug 29, 2026 5:34 pm
Feel free to use any of the above - it seems quite reliable.
Thanks Martin.
Although the offer is appreciated, I have already created and finished the component.
The reason I stated it will be tomorrow is I only decided early this morning I will be creating the component, so receivers hopefully arriving tomorrow.
I don't what to supply an untested component.
At least your project is available to use, which is great.
If you are curious about the code, I'm happy to supply my source code.
Currently you have to add a ioc component.
I did that as a bit of a cheat as it will be complex to add IOC selection for properties, as I'm nowhere as good as Ben or Steve is with components.
So, it's a bit of work in progress.
Martin

Post Reply