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.
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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.
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.
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.
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.
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!
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.
Error Spotted: @Mikam spotted an error, which led to the resolution.
The Resolution:
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.
Update GLCD_ILI9341: Change GLCD_ILI9341 to have proper conditional testing and handle the PIC cases correctly.
Revert HWSPI.H: Revert the changes made to HWSPI.H.
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.
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.
99.01 asm version
2025-02-06 version (Not working)
Thank you. I will investigate ASAP.
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
No Problem. Please see attached.
Sorry, no GCBASIC source/comments in the file. You need to change the Preference to add these comments in the source.
Sorry. Hopefully this is what you are after.
Try the attached. Replace in the latest build.
This does change the way the test in completed in GLCDCLS()
Sorry to say. Still white screen.
Ok.
Can you upload your DAT files ( old and new) and the old glcd .h file.
More examining required
99.01 version
99.01 version
Latest dat
latest dat
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:
#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.#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.'
cannot be present in a conditional test. For example,SPPCON1.WCOL
was no longer permitted..
in the conditional tests. This led to a valid test for the WCOL bit in GLCD_ILI9341.The Resolution:
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.So, try the attachment as the first step.
Last edit: Anobium 2025-02-16
Excellent. Now working. Thanks.
Thanks for your patience and thank you for reporting.
Angel will make a release asap. Test again when that drops.