Page 1 of 1

custom interrupt for ch3 for ATMEGA2560

Posted: Tue Apr 04, 2023 12:29 am
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

Re: custom interrupt for ch3 for ATMEGA2560

Posted: Tue Apr 04, 2023 8:53 am
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

Re: custom interrupt for ch3 for ATMEGA2560

Posted: Tue Apr 04, 2023 10:21 am
by BenR
Aha sorry Martin,

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

Re: custom interrupt for ch3 for ATMEGA2560

Posted: Tue Apr 04, 2023 10:25 am
by medelec35
Hi Ben,
Not a problem, thank you.