This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Program stops suddenlly

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.

  • What can be happening for prevent the program to keep runing?

    Here are my guesses...

    1. It's broken?
    2. There is an error?
    3. A hardware problem occurs that the software doesn't handle?
    4. The oscillator stops?
    5. The MCU is flakey (I kinda doubt this)?
    6. There is a spurious interrupt?
    7. There are compiler warnings that are ignored?
    8. There are linker warnings that are ignored?

    Well, that's my list. I'm sure there are more guesses that others could make.

    Jon

  • 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.

  • " (128 of DATA + 16 of Internal RAM)."

    Eh???

    DATA is internal RAM!

    It'd really help if you would just read those basic documents (the "bible" and the Keil Manuals) - then at least you could use terminology that we all understand!

  • Do not forget to check for stack overflow.

  • It'd really help if you would just read those basic documents (the "bible" and the Keil Manuals) - then at least you could use terminology that we all understand!

    and get you helpful answers instead of
    I guess ...
    maybe ...
    more information, please
    I do not understand ...

    Erik

    ANdy,
    Do you really believe that he is going to read that before he ask again?