I currently have two problems with my RA8875 display (480*272 pixels).
1) Layers (FIXED, nevermind). If I'm not mistaken I can make use of two layers on this display. It should be able to draw on one layer, while displaying the other. When all drawing is done, I can switch between them to get flicker-free updates.
The layer that is drawn on is selected in MWCR1, bit 0. Selecting the visible layer is done in LPTR0, bit 0. Is there any other trick to using the two layers? Because when I select a layer this way, my display simply shows nothing at all.
Turns out I forgot to activate two-layer operation in DPCR, bit 7. The updates are somewhat flicker-free, better than before.
2) Touch Screen Controller. I enable the controller with these commands (register names and bit definitions snatched from sumotoy):
This should enable the touch screen controller with a sufficiently slow ADC clock (less than 10 MHz, my F_SYS is 60 MHz). Regardless of auto mode and debouncing, the status register should show me when the screen is being pressed. I am confident that my write_reg8 function works, I use it for the whole initialization of my display. Again: Am I missing something?
1) Layers (FIXED, nevermind). If I'm not mistaken I can make use of two layers on this display. It should be able to draw on one layer, while displaying the other. When all drawing is done, I can switch between them to get flicker-free updates.
The layer that is drawn on is selected in MWCR1, bit 0. Selecting the visible layer is done in LPTR0, bit 0. Is there any other trick to using the two layers? Because when I select a layer this way, my display simply shows nothing at all.
Turns out I forgot to activate two-layer operation in DPCR, bit 7. The updates are somewhat flicker-free, better than before.
2) Touch Screen Controller. I enable the controller with these commands (register names and bit definitions snatched from sumotoy):
Code:
write_reg8(g, RA8875_TPCR0, 0x80 | RA8875_TPCR0_WAIT_16384CLK | RA8875_TPCR0_ADCCLK_DIV16); gfxSleepMilliseconds(1);
write_reg8(g, RA8875_TPCR1, RA8875_TPCR1_AUTO | RA8875_TPCR1_DEBOUNCE); gfxSleepMilliseconds(1);
Last edited: