PIC18F4520 and RC5

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Clive44
Posts: 52
Joined: Tue Oct 18, 2011 12:35 pm
Has thanked: 3 times
Contact:

PIC18F4520 and RC5

Post by Clive44 »

Hi

After some problems trying to implement an RC5 infra red remote controller on a PIC16F887 which were attributed to possible stack overflow in the PIC I thought I'd try a PIC18F4520 which is pin compatible but has 31 levels of stack as opposed to 8 in PIC16F887. However even the most simple flowchart fails to compile for the PIC18F4520 if an RC5 macro is included.
Has anyone any ideas on this?

failure
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:

If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.

Thanks

Clive
Attachments
4520_RC5_test.fcf
(8.5 KiB) Downloaded 292 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F4520 and RC5

Post by Benj »

Hi Clive,

This updated component C file should fix the compilation issue you are currently having.
FC5_PIC_RC5.c
(28.61 KiB) Downloaded 310 times
Simply copy the file to your "Flowcode/v5/Components" directory before starting Flowcode.

Let me know how you get on.

Clive44
Posts: 52
Joined: Tue Oct 18, 2011 12:35 pm
Has thanked: 3 times
Contact:

Re: PIC18F4520 and RC5

Post by Clive44 »

Hi Ben

Yes, that's fixed it! Great job - thank you.

Clive

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: PIC18F4520 and RC5

Post by jgu1 »

Hi!

Most to Benj- :D

Concerning these files, I am not an expert, but trying to be, I don´t understand 100% Pls, have patience with me.
These C files as you change, is it because there is a bug in these files and you will recommend anyone to carry out updates every time we see these, or is is specific for Clive´s project. If it's a fix, would it not be a good idea to add them in "Minor fixes" everytime a change occour. :wink:
Thank´s in advance.

Best regard

Jorgen

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F4520 and RC5

Post by Benj »

Hello Jorgen,

Updates like this are specifically targeted at fixing bugs generally related to code running on specific devices where the register name or layout might be slightly different.

Minor fixes like this are pretty spread out on the forums so each minor update of Flowcode we gather together all the mods and put them together into the new install.

I think we have version v5.3 of Flowcode PIC due for release shortly which will include the updated file from this forum topic and others.

jgu1
Posts: 1333
Joined: Tue Oct 06, 2009 9:39 am
Has thanked: 1135 times
Been thanked: 299 times
Contact:

Re: PIC18F4520 and RC5

Post by jgu1 »

Hi Benj!


Thank you Benj! Thanks for your reply. :D It sounds good with the updates to ver. 5.3 I just thought it is not certain that everyone finds these fixes when they are scattered around.

Does this mean that in ver.5.3 are all bugs sorted inclusive those who are in "Minor fixes." :?:

Have a nice weekend

Best regard

Jorgen

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC18F4520 and RC5

Post by Benj »

Hi Jorgen,

Yes 5.3 will include all bug fixes published on the forums including minor bug fixes.

The is the policy we normally adopt so v5.2 had all the bug fixes from v5.1 and up to the release of 5.2 if this makes sense :)

benrouse77
Posts: 26
Joined: Thu Jul 05, 2012 11:29 pm
Has thanked: 12 times
Been thanked: 1 time
Contact:

Re: PIC18F4520 and RC5

Post by benrouse77 »

Hi, with the RC5 comand it states in the help part that it opperates on the 36khz, can I use other ir receivers like ones at 38khz or is it only for the 36khz ones?

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: PIC18F4520 and RC5

Post by Spanish_dude »

I think you should be able to receive data on a 38kHz receiver even thought it's 36kHz modulated.
I might have done this in one of my previous IR test, worked fine.

Nicolas

PS: Just to be sure, try with a scope or something with which you could see the output at the receiver.

benrouse77
Posts: 26
Joined: Thu Jul 05, 2012 11:29 pm
Has thanked: 12 times
Been thanked: 1 time
Contact:

Re: PIC18F4520 and RC5

Post by benrouse77 »

Thanks spanish_dude, I've been doing some research on IR protocol and see there are many more than just the RC5. do you know if flowcode is capable of producing any other IR protocol like sony, samsung or NEC?

Ben

Post Reply