USART Rx Interrupts

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

Moderator: Benj

Post Reply
Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

USART Rx Interrupts

Post by Docara »

Hi

Trying to follow Wiki help regarding custom interrupts for Serial reception

https://www.matrixtsl.com/wiki/index.ph ... upts_-_AVR

From the following, if I had a macro called ' MyRoutine' where / how do I put in the 'Call Flowcode Macro' section - do I replace the %n, do away with the line completely and just put 'MyRoutine' in its place or what. I've tried a couple of iterations but nothing works.

ISR(USART_RXC_vect) // USART receive vector

{

FCM_%n(); // Call Flowcode Macro

}

Thanks

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: USART Rx Interrupts

Post by Benj »

Hello,

Are you placing the code inside the interrupt icon and not inside a C icon? The %n is correct and will be overridden for you.

If you post a simple project with the code you have then we can take a look for you.

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times
Contact:

Re: USART Rx Interrupts

Post by Docara »

Hi Ben,

A bit of background - Just need to show 5 characters a LCD sent from a terminal window (tera term) to (eventually) simulate and debug another project written in AS7 for a Mega .
This code is for a genuine UNO R3 (AtMega 328P) with a 16x2 LCD shield.


Thought I'd have a play with FC interrupts with USART instead of polling.

Code below

Thanks

Edit - Opps this is an old version there is now a continuous loop after INT Icon
Attachments
Rx Receive LCD.fcfx
(12.22 KiB) Downloaded 192 times

Post Reply