Hi there, I made some changes in my code, according some tips in documentation and some great answears I got here in this forum, and got a binary code of 6K (I have 8K) of flash memory in an AT89S8252 kit. My application changes the values of the PORT 1 to control a step motor. It happens that it begins to work well and suddenlly stop working. I noticed that if I comment the lines that make calculations with float point numbers, the application behaves accordilly. When I compile the program it reports that it's using 144 Bytes of RAM (128 of DATA + 16 of Internal RAM). What can be happening for prevent the program to keep runing? Thank you.
Floating point math will significantly change calculation speed. Perhaps the non-FP code runs too quickly and acts faster than the motor can track. FP will also likely result in some different intermediate values that round differently. These changes might expose a bug in the original code where you calculate values to step the motor.