2010-07-11 03:32 AM
Simple LCD example that works with st_lib 3.x
#lcd2011-05-17 04:58 AM
How are you driving the
ili9320, with the SPI interface or a parallel interface?
2011-05-17 04:58 AM
Hi
I had first intended to just run parallel data in bit bang mode, without FSMC since it is the function that I have not really understood. Then move to the FSMC usage. Can you get decent lcd speed Update with SPI? I would like to see such a solution. In many of my coming projects the update speed is not important so that would be interesting to test. havent seen any example code using only the SPI. Many Thankshttp://www.qtl.co.il/img/copy.png
http://www.google.com/search?q=HiI had first intended to just run parallel data in bit bang mode, without FSMC since it is the function that I have not really understood.The move to the FSMC usage.Can you get decent lcd speed Update with SPI?I would like to see such a solution.In many of my comming projects the update speed issent importent so that whould be intressting to test.havent seen any example code using only the SPI.Many Thanks
2011-05-17 04:58 AM
Due to the color depth and pixel volume you have a reasonably complex task.
To simplify - build confidence - have you considered a simpler, Text Lcd? You ''talk'' to these with either a 4 or 8 bit bus - 2/3 strobes - much faster/easier. The ILI controller you reference usually accept either SPI or parallel (8 or 16 bit) depending on maker. (they've ''brought out'' the selection pads - you need to study) If you must use the color Lcd review the older STM32 ''B'' ST produced Demo which included a 320x240 TFT with only SPI interface. (based upon ST's layout of the adapter pcb) In the User Manual you'll find schematics and in the software sections you'll find multiple code examples. Bon chance...2011-05-17 04:58 AM
We started from an ST example:
stm3210c-eval_fw\Utilities\STM3210C_EVAL\stm3210c_eval_lcd.c We have the SPI running at 18MHz. The update speed fine. BY the way, this ST example uses the SPI_BSY flag. The ST reference manual says ''do not use the SPI_BSY flag''.2011-05-17 04:58 AM
Hi,
I would advise plotting to the screen in different colours as your first application. Most graphics libraries have an abstraction layer for the display, which in it's most basic form consists of initialization code and i.e a plot(x, y, colour) routine. I suggest that's what you get working first. Then you have a set of ''drawing primitives'' on top, which include drawing lines, rectangles, drawing text etc which utilize the plot function, so changing displays in your application becomes more straightforward. I recommend to familiarize yourself with this architecture. Before you can draw any text you will need to include a (bitmap) font in your code. I have a conversion utility that converts from BDF to C, so you can store all the font's characters in an indexable C array. You then need a subroutine that can plot 1 character to the screen. You could then overide putc to handle printf output. What compiler are you using? Cheers, Martin.2011-05-17 04:58 AM
very nice to get this response =)
sprague.jj: I wanted to start with 16 bit and no special modes on the lcd, just a simple lcd routine that indicates that a have it working, I had not planned to use the SPI interface, my thought was that it was slow for this kind of application. i was more curious when this was mentioned, and wondered if there was someone who had experience, then this could be of use when I should have a system that is not dependent on a fast LCD update. I am fairly used to using graphic LCD, have used graphic monocrom in about 10 different projects, and written many graphical functions to those with, The problem is that I have used the AVR which I really understand and not have to think so much of MCU-specific programming. I am very new to STM32. Now both STM32 specific programming and new type of LCD makes me wonder how I should best start and at the same time create a basis for future projects that are sustainable.howes.richard: It sounds very interesting that you have it working so well. there is no chance that I could see a bit of code? This was not really what I was looking for, but it still sounds very interesting to create a test with this configuration.Martin Davey: This is what I was after. to get started and get feedback from the LCD. that was my starting point. I use CrossWorks. but I often look at other pieces of code from other compilers. But back to the original question. does anyone have any example that works with ili9320 or similar and std_lib 3.x? the examples that I have found, using FSMC and std_lib 2.x There is some migration problems to std_lib 3.x. I only want a test setup with working code, this is to really see that the HW setup is working, so i don´t try to start creating code for a hardware that dosen´t work properly, i have been there before and it´s not fun =) My biggest problem with this is that I do not really understand how the external link is set between the FSMC and LCD, have read the document on the FSMC, but it feels a bit unclear when I look at the examples.2011-05-17 04:58 AM
You should find ST's example code for an SPI driven ili9320 in this zip file:
http://www.st.com/stonline/products/support/micro/files/stm3210c-eval_fw.zip2011-05-17 04:58 AM
The Crossware Development Suite for ARM includes an example that drives the LCD on an STM3210B-EVAL board (SPI interface):