Jump to content

forst step to begin development over KOPIN LCOS controller A


enrico.dallavia

Recommended Posts

Hi to all,

Is the information written at http://wiki.ugfx.org/index.php?title=Display_Driver_Model be enough to try to implement the support of the new hardware? I mean the functions I need to implement to make it work.

I have a board (not the discovery) with stm32F429 processor and I have to use a KOPIN LCOS controller A913. It is connected with display signals, 8 bit luminance and I2C.

So the pin I will use are

LCD_G0 with PA6

LCD_G1 with PG10

LCD_G2 with PB10

LCD_G3 with PB0

LCD_G4 with PA11

LCD_G5 with PA12

LCD_G6 with PB1

LCD_G7 with PG6

LCD_VSync with PA4

LCD_HSync with PC6

LCD_PCLK with PG7

The system has a 8 Mbyte of pSRAM as a frame buffer connected to FSMC controller, so can I look inside stm32f4xx_fmc.c as an "inspiration"?

Thanks for the suggestions.

Enrico

Link to comment
Share on other sites

Yes, that article should contain all the necessary information to write your own display driver and board files.

To use your display with uGFX you need to do two things:

  • Write a display driver
  • Write a board file

Display Driver

The display driver is represented by a folder in /drivers/gdisp. The display driver is the part that knows how to initialize the controller and how to manipulate the frame buffer content. There are three different types of how to implement a display driver and the wiki article you linked explains all three of them. Which one you are going to use depends on your display controller. Without knowing the A913 that you are mentioning I am pretty sure that you will want to write a driver using the Window Model.

Important: The display driver itself does NOT know how to talk to the actual display. It contains functions like write_cmd() and write_data() or similar, but it does not know how to communicate to the actual hardware.

Note: The display driver implements the interface specified in /src/gdisp/gdisp_driver.h.

Board file

The board file contains the actual interface to the hardware. It just implements the functions that the display driver is using. For example the display driver will call write_cmd(uint8_t cmd) from the board file. The implementation of that function in the board file will make sure that the display controller is in write mode and write the actual cmd value to the interface. In your case it would just put that value on the FSMC bus.

We strongly recommend taking a look at some existing drivers such as the SSD1289 or the ILI9341 to get some inspiration on how things should look at the end.

I hope that helps. Let us know when you have any additional questions.

~ Tectu

Link to comment
Share on other sites

I am not sure what the I2C peripheral on your display controller is there for as I couldn't find a datasheet. However, there are other display controllers that need to be configured before a particular interface can be used. For example, the ILI9341 that you can find on the STM32F429i-Discovery board needs to be configured via SPI before the RGB interface can be used. It is very well possible to cleanly encapsulate such behavior in the display driver & board files of the uGFX GDISP driver interface.

~ Tectu

Link to comment
Share on other sites

Good morning,

does anyone know how to use the L8 8bit mode of STM32? Because what I need is not a rgb 24 bit color output but only a monochromatic one (I read I maybe have to use a CLUT but the information is not clear and google does not help me so much..)

The I2C is to configure the controller, i've attached the pdf to anyone who want to take a peek.

Thanks

Link to comment
Share on other sites

does anyone know how to use the L8 8bit mode of STM32? Because what I need is not a rgb 24 bit color output but only a monochromatic one (I read I maybe have to use a CLUT but the information is not clear and google does not help me so much..)

I am not sure what your question really is. uGFX supports many different color formats and you select the one that your driver uses in the drivers configuration file. In your case you can just GDISP_PIXELFORMAT_MONO (or GDISP_PIXELFORMAT_GRAY* in case of you have a grayscale display) and everything else will be taken care of for you.

~ Tectu

Link to comment
Share on other sites

We never used a monochrome or grayscale display with the STM32 LTDC ourselves but I gave the STM32F4xx reference manual a quick look and it indeed looks like the L8 mode is what you would want to be using for that.

In either way I assure you that it will be no problem to use a monochrome or grayscale display with your STM32F429 and uGFX.

Please note that you ARE NOT SUPPOSED TO use the STM32F429iDiscovery GDISP driver unless that is the board you are really using. Please use the generic STM32LTDC driver instead. The reason is that the display used on the STM32F429i-Discovery board needs to be initialized via SPI before the LTDC can be used.

~ Tectu

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...