Page 1 of 1
Please help with RXINT0
Posted: Tue Dec 20, 2016 6:40 pm
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
Re: Please help with RXINT0
Posted: Tue Dec 20, 2016 9:50 pm
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 )
Re: Please help with RXINT0
Posted: Tue Dec 20, 2016 9:57 pm
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
Re: Please help with RXINT0
Posted: Tue Dec 20, 2016 10:49 pm
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
Re: Please help with RXINT0
Posted: Wed Dec 21, 2016 11:58 am
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.
Re: Please help with RXINT0
Posted: Thu Dec 22, 2016 7:51 pm
by tiny
After I got no answer to my post, here again the question in short form:
Does RXINT work in simulation?
Re: Please help with RXINT0
Posted: Thu Dec 22, 2016 10:57 pm
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.
Re: Please help with RXINT0
Posted: Thu Dec 22, 2016 11:09 pm
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