4

I am getting into graphics programming and have come across an odd issue. I am using Microchip's Harmony + Legato platform on a PIC32MZ DA chip for a TFT screen that takes a 24-bit RGB format input and things are OK, but I am having an odd issue of where the image is being put to the screen twice, as you can see. I am using a template image.

What kind of phenomenon could cause this? It looks like my image is a bit squashed, horizontally, and I see some white vertical lines in the main MPLAB logo. My understanding of the porches and pixel data being written to the screen leads me to think that somehow not all pixels are being sent when writing a horizontal line and it seems to be writing an empty/incorrect line consistently in the same spot so I don't think this is so much of a noise issue.

However, whatever is causing the squashing might be the ultimate cause of this error in the data. If incorrect RGB values were being sent to the screen, I figure we would see more disorder... but this looks to have some sort of order to it. Does this seem more like a signal timing issue or potentially more of a source image sort of issue, where the source image is perhaps being incorrectly programmed?

I have a couple waveforms that Harmony outputs to indicate the timing of things, I am not sure if there is anything wrong with them yet when I compare to typical diagrams I am referencing online. Any thoughts as to what could be causing my issues, what I can try to analyze, etc etc would be greatly appreciated.

Microchip source image via screen capture

Displayed image

HSync waveform

VSync waveform

Microchip porch settings

ocrdu
  • 8,705
  • 21
  • 30
  • 42
jakob
  • 462
  • 3
  • 12
  • 3
    It looks to me as though you might be giving 24-bit RGB to something which is expecting 32-bit ARGB data. – brhans Aug 16 '22 at 16:35
  • 1
    Can you provide the reference for the screen and a link to its data sheet? There seems to be a mismatch somewhere, but it's hard to say where, it could be pixel format, screen size, or some kind of timing issue. What kind of controller drives the screen? How do you write to it? – jcaron Aug 16 '22 at 16:51
  • The screen is the E43GA-RW800-R from FocusLCDs, the datasheet link on their website is here. https://focuslcds.com/content/E43GA-RW800-R_Spec.pdf – jakob Aug 16 '22 at 16:57
  • 1
    I think it's likely to be something in your Harmony configuration. Does your setup support multiple layers with the option to perform alpha-blending between them in order to produce a final output image? If it does then it needs to work internally with 32-bit ARGB images - and might then expect you to be supplying them in that format, and not 24-bit RGB. – brhans Aug 16 '22 at 17:03
  • The controller on the TFT unit is the ST7282-G4, the GLCD on the PIC32 is what should be feeding the 24 RGB signal to the device. Harmony has a bunch of drivers to handle all the writing, I haven't gone thru all of its code yet since it looked like it somewhat worked but can if we think that's the issue. I have probed the clock line and verified that it is within spec, so I don't think it is the clock. – jakob Aug 16 '22 at 17:03
  • Harmony supports up to 3 layers, I have 2 enabled in Harmony and in their graphics composer for the template only one is used. I am not seeing an option for alpha blending yet in the program but documentation says it is available. I do see that a frame buffer setting in Harmony only has options for RGBA_8888 (selected currently), GS_8, and RGB_565. Perhaps this confirms what you suspect @brhans? I believe the composer has the render settings set to RGB_888. – jakob Aug 16 '22 at 17:16

0 Answers0