Wenn die Zeile 124 Probleme macht, dann überführe dein long erst in ein single und rechne dann nur mit single. Eine Zuweisung von verschiedenen datentypen mit = macht keine Probleme, wenn man von abgeschnittenen Teilen absieht. Ein long in ein single gibt vielleicht eine leicht Unschärfe, aber keine Probleme, die zu einem Absturz führen. Hast du mal die info im codeexplorer bezüglich der stacks angeschaut? Wenn du die angezeigten Werte gemäß der Hilfe anpasst, dann hast du schon die Mindestwerte.
avrhelp.mcselec.com/view_code_explorer.htm und speziell
The calculated stack settings are based on the program call tree and local variables. This is just a tool to give you an idea about stack usage. Not taken into account is the stack required by the assembler routines. This means that you need to add a certain amount to the calculated values. When your code uses interrupts you need to increase the calculated $HWSTACK by 32. Otherwise increase it by 16. The $FRAMESIZE should have a minimum value of 24. Add a value of 16 to $SWSTACK.
Applications using AVR-DOS should use a minimum of 128 for all stacks.
A future version will also take the assembler code into account.
avrhelp.mcselec.com/view_code_explorer.htm und speziell
The calculated stack settings are based on the program call tree and local variables. This is just a tool to give you an idea about stack usage. Not taken into account is the stack required by the assembler routines. This means that you need to add a certain amount to the calculated values. When your code uses interrupts you need to increase the calculated $HWSTACK by 32. Otherwise increase it by 16. The $FRAMESIZE should have a minimum value of 24. Add a value of 16 to $SWSTACK.
Applications using AVR-DOS should use a minimum of 128 for all stacks.
A future version will also take the assembler code into account.
Raum für Notizen
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------