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
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: 15147
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
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
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 10 times

Post Reply