RA8875 SPI amd STemWin, editable texts really small

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • RA8875 SPI amd STemWin, editable texts really small

      I have been trying to get RA8875 with SPI to work with STemWin, but not fully succeeded. All others seem to be right, but the texts in edit boxes and other editable widgets are really small. It will not help, if I change the size of the font. The layout is made by GUIBuilder. Also I have not been able to find any combinations of settings for 65K colors, only 256 colors work, The attachment is in 256 colors and not very nice.

      Any ideas how to proceed?
    • Hi,

      The attachment is in 256 colors and not very nice.

      Unfortunately, there is no attachement.

      Also I have not been able to find any combinations of settings for 65K colors
      What do you mean by that?

      The color conversion should be 16bpp (e.g. GUICC_M565) and the driver GUIDRV_FlexColor. The driver has to be set up for the specific controller and the chosen color depth:

      GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66721, GUIDRV_FLEXCOLOR_M16C0B16);

      Attached is an LCDConf.c wich is for a RA8870 but should give you an idea how to configure emWin.

      • LCDConf.zip

        (2.38 kB, downloaded 209 times, last: )
    • Hello Sven,

      thank you for your reply and sorry, that attachment was missing. Your code is for parallel 16 bit bus, but I am using 8 bit SPI and I think the problem is there.

      I have been doing some new tests and also reading more manual and below is the situation I am now in.

      Manual33.2.3 Indirect interface - 4 pinSPI (p. 1168)

      Normal SPI is 4 pin, clock, MISO, MOSI and chip select, emWinSPI is aspecial case, it has dedicated line for C/D and no data read line. GUIDRV_FLEXCOLOR_F66721 needs read data line, too(p. 1199).

      RA8875 uses standard SPI = 4 lines,so there is no C/D line and selecting A0 / A1based on C/D is difficult. On page 1198 there is nothing mentioned, which one is dataor command.

      To my mind it would be better in the manual to forget C/D and start using command/data (memory data).

      p. 1198 there are required port_api. Because only one read (status) is required, A0 must be status and then A1 must mean data. This cannot be decided elsewhere, because manual uses C/D line and that is nothing standard, e.g. in ILI9341 is D/CX, low means command.

      In manual p. 1198 there are 4 A1 functions, according to my tests, theydo not work. My definitions are as follows, A0 is data:

      PortAPI.pfWrite8_A0 = LcdWriteData;
      PortAPI.pfRead8_A0 = RA8875_ReadData;
      PortAPI.pfWriteM8_A0= LcdWriteDataMultiple;
      PortAPI.pfReadM8_A0= LcdReadDataMultiple;

      PortAPI.pfWrite8_A1 = LcdWriteCommand;
      PortAPI.pfRead8_A1 = LcdReadStatus;
      PortAPI.pfReadM8_A1 = LcdReadCommandMultiple;

      and this way it almost works.

      Ihave also tested separate routines (attached pictures are based on GUIBuilder), and they work correctly only with RA 256 colors = 2 layers. (Note, separate routines, not all tested, work fine, only GUIBuilder components do not all work.)

      Themainproblemsare nowthose missing texts, and that I can use only 256 colors in RA, because if I select 1 layer(RA requires 1 layer if 65k colors), alltexts are missing or blurry. Also with 256 colors editbox text is very small and multiedit text is totally missing, listbox's 1. row is missing or the same color as background.

      I have been trying to find working combination by changing values in number of layers in RA and emWin and mode, but not yet found a decentone. Ithink the problem is inthe 8-bit driver.

      emWin ongelmakuvia.pdf

      Best regards,