Menu

GLCD ILI9341 - Resolved

Help
Mikam
2025-02-12
2025-02-17
  • Mikam

    Mikam - 2025-02-12

    Updated to latest revision 2025-02-06. Above display only displays white blank screen.
    Reverted back to 99.01 Build 1073 working with attached file.
    Have not used this display for a while (2024 revisions)
    Thanks in advance.

     
    • Anobium

      Anobium - 2025-02-12

      Thanks for reporting.

      Can you compile with the new .h file and with the version of the .h that works for you. I need both ASM files to review what changed.

      Thank for your help to resolve.

       
  • Mikam

    Mikam - 2025-02-12

    99.01 asm version

     
  • Mikam

    Mikam - 2025-02-12

    2025-02-06 version (Not working)

     
  • Anobium

    Anobium - 2025-02-12

    Thank you. I will investigate ASAP.

     
  • Anobium

    Anobium - 2025-02-13

    Sorry to ask but one version has GCBASIC comments in the ASM, which I need, and the other does not. The latest version does not have the GCBASIC comment. Can you repost?

    I can see that one routine FASTHWSPITRANSFER is not in the new ASM but without being able to compare with the GCBASIC comments it is hard to figure out.

     

    Last edit: Anobium 2025-02-13
  • Mikam

    Mikam - 2025-02-13

    No Problem. Please see attached.

     
    • Anobium

      Anobium - 2025-02-13

      Sorry, no GCBASIC source/comments in the file. You need to change the Preference to add these comments in the source.

       
  • Mikam

    Mikam - 2025-02-13

    Sorry. Hopefully this is what you are after.

     
  • Anobium

    Anobium - 2025-02-13

    Try the attached. Replace in the latest build.

    This does change the way the test in completed in GLCDCLS()

     
  • Mikam

    Mikam - 2025-02-14

    Sorry to say. Still white screen.

     
    • Anobium

      Anobium - 2025-02-14

      Ok.

      Can you upload your DAT files ( old and new) and the old glcd .h file.

      More examining required

       
  • Mikam

    Mikam - 2025-02-14

    99.01 version

     
  • Mikam

    Mikam - 2025-02-14

    99.01 version

     
  • Mikam

    Mikam - 2025-02-14

    Latest dat

     
  • Mikam

    Mikam - 2025-02-14

    latest dat

     
  • Anobium

    Anobium - 2025-02-16

    Thanks, this has taken some time but I have found that I had made an undocumented change to a lowlevel file.

    This change is still a mystery to me. Like 'why I did it'. But, it would have incorrectly initialised the Hardware SPI.

    So, download. Replace the file in your include\lowlevel folder. Test. Report back please.



    This was actually way more complex than it seems.

    The root cause started many years ago:

    1. Conditional Compilation Issue: Hugh implemented conditional compilation that incorrectly handled #IFDEF BIT(SPPCON1.WCOL) where the register is specified with the bit. This always returned FALSE. So, back in the day, conditional compilation just did not work as expected. Hugh assumed that everyone would use the conditional compilation test correctly, but we, the developers, had no idea it was handling the conditional compilation tests incorrectly.
    2. GLCD_ILI9341 Library Implementation: Many years later, the GLCD_ILI9341 library was implemented. It used the test #IFNDEF BIT(SPPCON1.WCOL) and, due to the issue mentioned above, this NDEF test always returned TRUE. Consequently, the GLCD worked more by luck than anything else.
    3. Improvement in Conditional Testing: Unrelated to the GLCD issue, I improved conditional testing by ensuring that a ' cannot be present in a conditional test. For example, SPPCON1.WCOL was no longer permitted.
    4. Library Updates: I ran all the tests and updated many libraries that had used . in the conditional tests. This led to a valid test for the WCOL bit in GLCD_ILI9341.
    5. Duplicate Tests in GLCD_ILI9341: Unrelated and not spotted by me, the two tests in GLCD_ILI9341 were doing the same thing, and therefore neither worked!
    6. HWSPI.H Change: Years later, I made an incorrect change in HWSPI.H and released it. This was my error, and it was easy to spot as I had not documented the change.
    7. Error Spotted: @Mikam spotted an error, which led to the resolution.

    The Resolution:

    1. Fix the Compiler: Correct the compiler to validate the conditional test when SPPCON1.WCOL is used. The compiler now tests if the bit exists and if the associated parent register is the one specified in the conditional test. I have tested this, and it now works as expected.
    2. Update GLCD_ILI9341: Change GLCD_ILI9341 to have proper conditional testing and handle the PIC cases correctly.
    3. Revert HWSPI.H: Revert the changes made to HWSPI.H.

    So, try the attachment as the first step.

     

    Last edit: Anobium 2025-02-16
  • Mikam

    Mikam - 2025-02-17

    Excellent. Now working. Thanks.

     
    • Anobium

      Anobium - 2025-02-17

      Thanks for your patience and thank you for reporting.

      Angel will make a release asap. Test again when that drops.

       

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.