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
USART Rx Interrupts
Moderator: Benj
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: USART Rx Interrupts
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
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 272 times