Menu

The program cannot be completed

Help
JANIS
2023-10-07
2023-10-09
  • JANIS

    JANIS - 2023-10-07

    Hello to the best people.! I encountered one incomprehensible problem while compiling. The working code is attached. It works so far. But the program is not finished. I want to continue with some guidance. If I write some instruction (for example: set led_status off, or something else very simple) right after Main: (it can be elsewhere), the program stops working. The display no longer shows what it's supposed to show, and the light that comes from the timer, which should flash at half second intervals, flashes every 2 seconds. But the compiler says Download/Flashing OK.
    I've had this happen with others program code too, then I try to create a subroutine or change the execution of an instruction and it's ok, I can continue writing. Please Help!
    JANIS

     
  • JANIS

    JANIS - 2023-10-08

    Is there a limit to the number of variables? It turns out that you don't even need to write an instruction, but add one more variable and the program doesn't work.

     
  • Anobium

    Anobium - 2023-10-08

    The limit to the number of variables is the memory (RAM) limit. So, this is not the issue.


    I think your interrupt could be the cause. You are updating the GLCD and then that long running interrupt is handled. Then, the GLCD is timing out? I dont know but I would look there first by making the interrupt a lot smaller ( set a flag in the interrupt and then handle that falg i the main routine.

    However, at the moment, the interrupt/GLCD would not explain why the interrupt runs slower. As a stability test - try wrapping the all the GLCD commands with INTOFF & INTON. Does this help?


    I have looked at the ASM and see nothing jumping out at me. So, try to resolve.

     
  • Anobium

    Anobium - 2023-10-08

    The limit to the number of variables is the memory (RAM) limit. So, this is not the issue.


    I think your interrupt could be the cause. You are updating the GLCD and then that long running interrupt is handled. Then, the GLCD is timing out? I dont know but I would look there first by making the interrupt a lot smaller ( set a flag in the interrupt and then handle that falg i the main routine.

    However, at the moment, the interrupt/GLCD would not explain why the interrupt runs slower. As a stability test - try wrapping the all the GLCD commands with INTOFF & INTON. Does this help?


    I have looked at the ASM and see nothing jumping out at me. So, try to resolve.

     
    • Anobium

      Anobium - 2023-10-08

      I have also inspected the DAT file. The memory map looks correct.


      I could be making an error so if you can check that would be best.

       
  • JANIS

    JANIS - 2023-10-09

    Thank you! I think it might be related to the graphics display because I had the same problem in another program with GLCD. I will think about how to implement your suggestion in Anobium and I will try.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.