Unofficial Nextion/TJC User Forum

Nextion Waveform updating

I try to use addt command but it does not work on real Intelegent LCD as expected

I send addt 10,0,255 /0xff/0xff/0xff

Then i waiting for LCD answer 0xFE 0xFF 0xFF 0xFF may be the time not ~5ms But the answer does not come for some reason.

Then i try to send 255 raw data and get unswer 0xFD 0xFF 0xFF 0xFF

MCU send that block ( command + data ) permanently and It’s began to work from about 16 sended command + data block.

What i am doing wrong ?

addt is the volume variant of add .

Instead of using something like:

add 1, 0, 19
add 1, 0, 39
add 1, 0, 85
add 1, 0, 98

you can group them all together with an addt :

addt 1, 0, 4
<5ms delay>
\x13\x27\x55\x62

The third parameter of the addt command is the number of values you want to send. Then you have to leave at least 5ms after sending the command so the display is ready to receive (it will actually send a “go” signal to you of \xFE\xFF\xFF\xFF . You send the data as raw binary values (shown as C string escape sequences above), and after it has received the specified number it responds with an “ok” signal of \xFD\xFF\xFF\xFF .

The maximum number of values you can send in one batch is 128.

Hi

Yes i do so, but MCU recieve GO - \xFE\xFF\xFF\xFF after 16-17 sendings addt command ( never at first command or random value of tryes ), and only then magic begins - stable work , every MCU addt command recieve GO from LCD and after every last byte was send, MCU see \xFD\xFF\xFF\xFF DONE message from LCD.

The problem is LCD did not respond on first addt 10,0,255 ( only after 16-17 in a row ) 5ms - does not work MCU send addt 10,0,255 and waiting longer then 5ms , no GO - \xFE\xFF\xFF\xFF was received , so it stop waiting and loop back to send new addt 10,0,255 only after MCU got GO - \xFE\xFF\xFF\xFF it begins to send 255 bytes block - BINGO! MCU got \xFD\xFF\xFF\xFF DONE message from LCD.

By the way , why you wrote that only 128 bytes should be sent ? the limitations 1024 bytes - LCD buffer ( Nextion manual )

Each value is 8 bit. I not an authority on the matter I just pritty sure it is.

So if I got this right you are sending

addt 10,0,255ÿÿÿ

Wait for
\xFE\xFF\xFF\xFF

Loop back after Time if no reply

After Reply send data

\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62\x13\x27\x55\x62

Screen Reply \xFD\xFF\xFF\xFF

Its strange that it only works sometimes.

Exactly.

And i use the same function for exchange procedure. After first \xFE\xFF\xFF\xFF reply from LCD there is no any problems or glitches, no pauses occured during sending 255 bytes blocks, no errors ( MCU controling errors during transmission \ reception )

It’s works not sometimes. its begin to work after 16 or 17 addt 10,0,255ÿÿÿ was send.

Basic and Intelegent LCD works the same. I asume that something wrong , but cant figure it out what exactly. I tried blocks 64 / 128 / 256 with 128 or 64 data blocks LCD respond faster but not at first command

Are you using the simuator or a nextion screen?

I use real LCD screens Basic & Intelligent versions.

Without looking at how you are sending the data I won’t be much help. It could be that you are sending data while in sleep mode or tying to send data to it from multipal functions at the same time.

You could try connectiong your MCU to the nextion simulator and it will show incomming and outgoing messages.

Ok Thank you.

In your case real LCD works at first command ?


This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).