Custom interrupts PICmicro question

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
Ras
Posts: 37
Joined: Sun Mar 30, 2014 9:27 pm
Contact:

Custom interrupts PICmicro question

Post by Ras »

So I need to create a custom interrupt to set the CCP1 to generate a frequency of my choice. I add the INT symbol then right click to Properties then of to learn some more on how to do it. Great so far!

The custom interrupts examples accessed by pressing ? and following trough to PICmicro custom interrupts shows a Custom interrupt properties window with a grayed out box titled Disable Code:

Clearly this code is to disable the interrupt but I can not find where it's used nor how to enter the custom code.
Can you please clarify the purpose of this box and the code entered there?

Kenrix2
Flowcode v5 User
Posts: 211
Joined: Tue Feb 19, 2013 9:51 pm
Contact:

Re: Custom interrupts PICmicro question

Post by Kenrix2 »

That was a bit confusing to me at first too. First, make your custom enable interrupt, then add another interrupt icon but select disable. Select the Custom interrupt name in the drop down box after pressing Properties.. . You can now enter your disable code. I am not sure from your question if you were asking what to put in the disable box, but it is usually just clearing the pie(X) bit you used to enable it (set it to 1). As to your application, I accidentally stumbled across another way to generate custom frequencies while working on a synchronous serial master slave project. Perhaps you will find it useful. It is 16 bit resolution and no interrupts required.
Attachments
FreqOut.fcfx
(4.85 KiB) Downloaded 90 times

Ras
Posts: 37
Joined: Sun Mar 30, 2014 9:27 pm
Contact:

Re: Custom interrupts PICmicro question

Post by Ras »

That worked thanks... I actually found that you do not need to add another interrupt but instead from the Properties:Interrupt window just select the Disable interrupt radio button instead of the Enable interrupt, then pressing the Properties button opens the Custom interrupt properties with the Disable code part available for editing.

This worked for me although on one occasion the Enable code and the Handler code did not show (grayed out and blank) and after editing the Disable code and attempting to OK, it gave an error asking for all parts to be filled in. I tried to re-create this but could not.

I understand that this allows one to enable (by adding the custom interrupt with the Enable interrupt radio button selected) or disable the interrupt (by adding the custom interrupt with the Disable interrupt radio button selected) at will anywhere desired.

I am attaching a JPG just to show how to access the Disable code part... was right there under my eyes.

I'll check the example shortly, tks
Attachments
PropertiesInterrupt_DisableCCP1.jpg
PropertiesInterrupt_DisableCCP1.jpg (48.6 KiB) Viewed 1618 times

Post Reply