Open sbfreddie opened 7 years ago
I'm working on some new products using the buy display LCD's and WiFi Arduino CPU modules. I started with the sumotoy RA8875 (thanks man, you must have spend a ton of time to write this code) . I have rewritten many parts of the code to fit our hardware design.
Above problem I also encountered during testing. It seems to be related to the SPI bus speed and the CPU clock speed (or compiler efficiency) and the _circler_helper() function. As sumotoy mentions in his Wiki there must be bug in the RA8875 related to the DCR_CIRCLE_START command. He mentions the SPI bus speed should be no higher then 10MHz. On my hardware I tried 7.5MHz which was too high, I mean the clock2 has above mentioned problem. So I slowed down the SPI speed to 3.75MHz, and now all is ok. As this slow down is only done while drawing circles I don't mind so much. You might try this too in your design.
There is another peculiar thing in the _circle_helper() functions. The functions ends with a call to _waitBusy(0x80);. I've read the RA8875 spec and I can not find why this call would be needed. The _waitBusy() function checks the status registers bit 7. But it is needed, especially with large circles (like the one in clock2). For fast CPU's it even might be necessary to increase the timeout in the _waitBusy() function from 10 to 100 msecs. In my code this was only needed for one particular CPU type, the other CPU modules work fine.
I can not explain why this solves the problem, I can only guess a RA8875 bug.
Max: When using the example: /Teensy/clock2 the bottom part of the outer circle is missing. The ticker marks are fine, just the bottom of the circle is missing. This used to work fine before the most recent changes. I think there is a problem in the drawCircle code. I am using a Teensy 3.1 and the Buy Display ER-TFTM070-5-2765 800 x 480. Thanks, Ed