Page 1 of 1

PIC18F4520 and RC5

Posted: Tue Jun 26, 2012 6:47 pm
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

Re: PIC18F4520 and RC5

Posted: Thu Jun 28, 2012 11:19 am
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 321 times
Simply copy the file to your "Flowcode/v5/Components" directory before starting Flowcode.

Let me know how you get on.

Re: PIC18F4520 and RC5

Posted: Thu Jun 28, 2012 12:16 pm
by Clive44
Hi Ben

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

Clive

Re: PIC18F4520 and RC5

Posted: Thu Jun 28, 2012 7:17 pm
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

Re: PIC18F4520 and RC5

Posted: Fri Jun 29, 2012 9:31 am
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.

Re: PIC18F4520 and RC5

Posted: Fri Jun 29, 2012 9:53 am
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

Re: PIC18F4520 and RC5

Posted: Fri Jun 29, 2012 11:34 am
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 :)

Re: PIC18F4520 and RC5

Posted: Sun Jul 22, 2012 8:32 pm
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?

Re: PIC18F4520 and RC5

Posted: Sun Jul 22, 2012 10:04 pm
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.

Re: PIC18F4520 and RC5

Posted: Mon Jul 23, 2012 12:52 am
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