uart interrupt avr

For general Flowcode discussion that does not belong in the other sections.
d820513
Posts: 56
http://meble-kuchenne.info.pl
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

uart interrupt avr

Post by d820513 »

Hi guys! why flowcode 9 does not work interrupt on UART avr microcontroller?

medelec35
Matrix Staff
Posts: 1481
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 525 times
Been thanked: 481 times

Re: uart interrupt avr

Post by medelec35 »

Hi.
I have just tested the ATmega328P with UART0 RX and the interrupt is working as expected.
For make sure the one-second flasher test works as expected.
Have you tested UART is set up correctly by seeing chars and checking they are as expected?
It makes a difference where the RXINT interrupt is placed.
For example, the interrupt will only work if its placed after the UART Initialise and not before.
If your Flowchart is still not working, then can you post it and I will see if I can spot any issues.
Martin

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: uart interrupt avr

Post by d820513 »

Thank you. I will now post an example, I am trying to receive data from sim800l, and unfortunately I can't get interrupted
Attachments
Uart_exp1.fcfx
(12.08 KiB) Downloaded 99 times

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: uart interrupt avr

Post by d820513 »

baud rate on sim 800l 9600, as well as on the atmega328p controller, I do not understand what the problem is. I would be grateful if you showed how to properly organize the reception of data via UART

medelec35
Matrix Staff
Posts: 1481
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 525 times
Been thanked: 481 times

Re: uart interrupt avr

Post by medelec35 »

The attached works for me when I change it to my target.
If it does not work for you, then you have a hardware issue.
First, can you check your components are up to date?
Try the second flash as suggested.
Send a character and make sure it's shown correctly in your terminal software.
If it's not then the hardware clock speed does not match the clock speed of your configuration settings.
Attachments
Uart_exp v2.fcfx
(12.44 KiB) Downloaded 87 times
Martin

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: uart interrupt avr

Post by d820513 »

yes I checked everything, this option works without interruption.
I do not understand what's the matter
Attachments
Uart_exp2.fcfx
(12.09 KiB) Downloaded 88 times

medelec35
Matrix Staff
Posts: 1481
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 525 times
Been thanked: 481 times

Re: uart interrupt avr

Post by medelec35 »

What about trying with the version I have uploaded?
Martin

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: uart interrupt avr

Post by d820513 »

what version are you talking about? did I miss something

medelec35
Matrix Staff
Posts: 1481
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 525 times
Been thanked: 481 times

Re: uart interrupt avr

Post by medelec35 »

The version on this post.
Uart_exp v2.fcfx
Martin

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: uart interrupt avr

Post by d820513 »

unfortunately the interrupt does not work for me :(

Post Reply