custom interrupt for ch3 for ATMEGA2560

For general Flowcode discussion that does not belong in the other sections.
Post Reply
flowcode-developer
Posts: 37
http://meble-kuchenne.info.pl
Joined: Thu Feb 02, 2023 9:32 pm
Has thanked: 19 times
Been thanked: 3 times

custom interrupt for ch3 for ATMEGA2560

Post by flowcode-developer »

Hi,
I am working on an ATMEGA2560 with avr chipset. Overall goal I am trying to receive data from a device on ch1(inspectra), receive data from another device ch3(weather), and send clean info from both devices out via ch2(modbusSlave). I added a 2nd circular buffer so all weather data can be fed to it but was having issues with the circular buffer. When I would use my LED screen to see if data was incoming, I get a return of 0. Found out I need another interrupt but since Flowcode does not have an interrupt on UART2 RX I made a custom interrupt.

I made the customer interrupt (see image below) modeled after UART0 RX. After including this in my code now my LED screen is blank. I do not understand what I did wrong. I appreciate the help. Thank you
Attachments
Custom Interrupt
Custom Interrupt
customerInterrupt.PNG (18.16 KiB) Viewed 1837 times
inspectra5.fcfx
(75.07 KiB) Downloaded 257 times

medelec35
Matrix Staff
Posts: 1969
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 629 times
Been thanked: 659 times

Re: custom interrupt for ch3 for ATMEGA2560

Post by medelec35 »

Hello.
I have added UART2 RX & UART3 RX so you can just select them as normal.
As I have not got a ATMEGA2560 I can't test if it's working for not, so can you let me know, please?
To add the interrupts, browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\AVR
Replace the existing file with the attached file.
If Flowcode is already open, then you will need to reload your project for the new interrupts to work
If you run any component updates, then the interrupts added will be overwritten so they will be removed.
If they work, then they will be pushed onto the update system
Attachments
ATMEGA2560.fcdx
(33.94 KiB) Downloaded 250 times
Martin

BenR
Matrix Staff
Posts: 1936
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: custom interrupt for ch3 for ATMEGA2560

Post by BenR »

Aha sorry Martin,

Just answered the topic here with a similar fix.
viewtopic.php?p=10987#p10987

medelec35
Matrix Staff
Posts: 1969
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 629 times
Been thanked: 659 times

Re: custom interrupt for ch3 for ATMEGA2560

Post by medelec35 »

Hi Ben,
Not a problem, thank you.
Martin

Post Reply