Hello Kasch If you look in the blog section you will find https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14531 I show my learning how to use the display Note its not like all the other graphical displays you just need to send the values for the objects you create. You will also see that it is able to do a lot of the work that the AVR would normally have to do. Regards Paul
sorry for the stupid question: i downloaded the zip-file from Duval JP. I compiled the example but i got an errormessage: missing file declaration_nextion.inc and page_button.inc...what i do wrong? Thank you
[quote:89e5f98610="TSEYFARTH"]How to find the maximum value to use to set $hwstack, $swstack and $framesize ?[/quote:89e5f98610]Call the report(Ctrl+W) and look for 'Space left', which is the difference between available SRam size, minus variables, minus stacks/frame. [quote:89e5f98610]Is it bad to over allocate these?[/quote:89e5f98610]You shalt not allocate more than is free.
Every byte of SRam not being used by variables, which start on the lower address range or by stack on SRamend, going down, is wasted memory. The big advantage of allocating and subdividing any free space into hardstack, softstack and frame is: it becomes less likely, that they overwrite each other.
If for example hwstack = 64 and you use heavy recursion in code, then each recursion takes some stack, which moves from SRamend downwards. At a certain point it will overwrite the soft-stack and then the frame.
If you have 12kByte SRam left and assign each 4k to hardstack, softstack and frame, then recursion has much more space till things go mad. The exact distribution is not necessarily same for each hw, sw, frame, instead it depends on how your program works. If the program relies heavily on recursion, you want a big hardware stack, if you use tons of locals, a bigger frame size is your friend. See the help how and for what each of the stack/frame memory ranges is used.
[quote:85c8faa90e="albertsm"] i have seen your amazing projects so i can almost not believe you did not knew about it. [/quote:85c8faa90e] thank. That's right, for all the decades I have never used [b:85c8faa90e]Data[/b:85c8faa90e] of type "word" in your compiler :oops: Yes, I have not met the requirements for marking the parameters of the data block anywhere in other compilers. I worked with different computers (ZX-Spectrum, IBM, Soviet computers...) and compilers, but there was no such need. :shock:
[quote:85c8faa90e="albertsm"] so only the actual data is stored. now if you have a value of 123, how should the compiler know that this is a byte? or a word, or dword, integer, etc. ? [/quote:85c8faa90e] yes, this is a logical decision. I completely agree with you.
[quote:85c8faa90e="albertsm"] I hope this was just a quote and not your own writing. [/quote:85c8faa90e] this is a poorly translated phrase, :oops: I wrote the text, translated it in the [u:85c8faa90e]translate.google[/u:85c8faa90e] and sent it, but I did not check the quality of the translation. This phrase from a book for beginner programmers. The author is Hungarian or Pole, I do not remember. Completely this phrase sounds like this: (I specifically checked the translation several times. The meaning of the phrase is now translated correctly): "Having received a new compiler, my old experience of work with past compilers made me make stupid mistakes and wasted time learning new things."