Page 2 of 2
Re: uart interrupt avr
Posted: Sat Dec 18, 2021 4:16 pm
by medelec35
It works for me with the RedBoad/Arduino Uno.
I have some AtMEGA328P devices lying around at home.
I will see if I can replicate the issue with your settings when I get a chance.
Re: uart interrupt avr
Posted: Sun Dec 19, 2021 1:50 pm
by medelec35
I have just tried with a ATMEGA328P dip, 16MHz xtal and 2x 22PF caps.
All working as expected using Uart_exp v2.fcfx, posted earlier.
What I did to make sure the hardware was set up correctly, was to change the delays of the 1sec flasher to 10ms for a loop count of 100.
I then checked the delay was exactly 10ms and it was.
As the interrupt is working for me, I still would suggest you have an issue with your hardware.
I can't explain how the RX worked when not using an interrupt.
Re: uart interrupt avr
Posted: Mon Dec 20, 2021 5:05 pm
by d820513
thanks! I think I found what was the problem. I was using software uart, which caused the interrupt to not work
Re: uart interrupt avr
Posted: Mon Dec 20, 2021 5:07 pm
by d820513
Martin, thank you, could you tell me how I can send text to uart through the flowcode console?
I can not find it
Re: uart interrupt avr
Posted: Tue Dec 21, 2021 12:09 am
by medelec35
d820513 wrote: ↑Mon Dec 20, 2021 5:05 pm
I was using software uart, which caused the interrupt to not work
That will be the case.
I did use Channel 1 UART for the demo I posted.
At least you have it working now.
d820513 wrote: ↑Mon Dec 20, 2021 5:07 pm
could you tell me how I can send text to uart through the flowcode console?
I will need more information.
Normally the console is for simulation.
However, a tab can be created within the console, then any text entered can be transferred to a string variable for transmitting via UART.
Is that what you want to do?
Re: uart interrupt avr
Posted: Mon Dec 27, 2021 9:00 pm
by d820513
thanks Martin