Hi,
thank you for contacting us.
in 8bit MCU, long int computation is very memory consuming.
Data=Data/1000l takes around 420bytes.
so i don't think your project have enough memory for it.
optimization for code size can reduce some code size, but the reduction is quite limit according to my experience.

can this help you?
Have a great day,
Zhang Jun
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------