Please help with RXINT0

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times

Please help with RXINT0

Post by tiny »

I connected a Nextion touch screen to Com Port 1, the display is programmed so that every 5 seconds a query is made for changed data. In order not to reprogram the MCU every time, I have connected the display on the Com Port (USB) of my PC.
Now I want to jump over the serial interrupt into my routine, which performs the matching and provision of the data for the display.
It just does not work, whatever I try.
I am using FC7 7.1.1.0 with all updates.

Perhaps who can help me?

Christina
Uart_Test.fcfx
(12.72 KiB) Downloaded 330 times

ressi
Posts: 21
Joined: Fri Mar 25, 2016 6:05 pm
Been thanked: 14 times

Re: Please help with RXINT0

Post by ressi »

Do you already have a working nextion?
I describe my nextion as on the picture and the functioned.
First, I choose pointer (z0) - then the value what it should display (retval) and end the transmission with 3 times send of 255. I do not know whether it goes as you do (Slepp = 0 \ xff \ xff \ xff )
Attachments
Nextion.PNG
(7.51 KiB) Downloaded 4033 times

ressi
Posts: 21
Joined: Fri Mar 25, 2016 6:05 pm
Been thanked: 14 times

Re: Please help with RXINT0

Post by ressi »

And the Default Baud from the Nextion is 9600 you have 38400. https://www.itead.cc/wiki/Nextion_Instruction_Set, baud /Current value of baud /1.baud=2400 2.baud=4800 3.baud=9600

4.baud=19200 5.baud=38400 6.baud=57600 7.baud=115200

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times

Re: Please help with RXINT0

Post by tiny »

The baud rate works with Nextion up to 115200. I have set 38400 Bd. With Bauds=38400 the transmission rate is permanently adjusted, runs fine.
Sleep = 0 is needed because I have 3 minutes Auto Sleep.
The 3x \xff \xff \xff are the end signal of a command via the serial interface.
The functions of the display are:
EEprom Parameter setting, display of the switching states and manual switching of the MCU outputs via Nextion Touch symbols.

However, my problem is that the Receive Interrupt is not responding. All other is no problem!

Christina

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times

Re: Please help with RXINT0

Post by tiny »

Perhaps someone can tell me whether in the simulation the Interrupt RXINT0 of the RS232 interface with Injector functions. This would be very helpful, I do not know whether I should continue to try to configure the interrupt according to data sheet.

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times

Re: Please help with RXINT0

Post by tiny »

After I got no answer to my post, here again the question in short form:
Does RXINT work in simulation?

User avatar
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: Please help with RXINT0

Post by Benj »

Hello,

Many apologies for the delay in replying.

No the UART RXINT interrupts don't currently work in simulation. To get around this you can either include a call to the RXINT macro in your main loop or you can add a simulation API timer to call the macro for you on a regular basis.

I wonder if we can somehow add a hook to get a call back based interrupt from the PC COM port and injector components. I've made a note to try and investigate this but my guess is it's not an easy fix.

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times

Re: Please help with RXINT0

Post by tiny »

Thank you Benj for the answer! It would really help if this function can be realized. It is much easier to check the routines on the PC under real conditions and then program the MCU.
I will first create a workaround to complete my program.

Christina

Post Reply