Custom interrupt, does it works?

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

Moderator: Benj

Post Reply
407charles
Posts: 122
Joined: Thu Jun 26, 2014 12:01 pm
Has thanked: 41 times
Been thanked: 19 times
Contact:

Custom interrupt, does it works?

Post by 407charles »

I found an example of a custom interrupt for capture mode of timer1 but flowcode displays error when I'm trying to use it. The website shows the setup and how to retrieve the value of ICR1 register onto a variable, well, the problem is: If I place the line FCV_CAPTVAL = ICR1; on a "C Box" it retrieves an error and it does not compile to the arduino uno with Atmega 328P; however, if I take this "C Box" out (deleted) then it goes through and compiles, the problem is: the value of the capture event is what I need to retrieve (on register ICR1). How can I achieve this? Can somebody tell me? Thanks a lot in advance.
Attachments
Arduino_frequency3.fcfx
Here is my program
(5.61 KiB) Downloaded 199 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: Custom interrupt, does it works?

Post by Benj »

Hello,

This should hopefully work as you are expecting.
Arduino_frequency3.fcfx
(5.53 KiB) Downloaded 255 times

407charles
Posts: 122
Joined: Thu Jun 26, 2014 12:01 pm
Has thanked: 41 times
Been thanked: 19 times
Contact:

Re: Custom interrupt, does it works?

Post by 407charles »

Thanks a lot for your help Benjamin . Now the program goes through but the macro never gets enable. I don't know if the application is right, it supposed to run when PB0 (ICP1) goes high but it does not capture. :(

Post Reply