element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
STM32F4DISCOVERY Expansion Boards
  • Products
  • Dev Tools
  • STM32F4DISCOVERY Expansion Boards
  • More
  • Cancel
STM32F4DISCOVERY Expansion Boards
Forum Problem with "official" LCD software example on STM32F4 Discovery Expansion Board
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join STM32F4DISCOVERY Expansion Boards to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 15 replies
  • Subscribers 8 subscribers
  • Views 3724 views
  • Users 0 members are here
  • discovery
  • stm32f4-lcd
  • stm32
  • stm32f4dis-bb
  • stm32f4dis_software_examples
  • stm32f4discovery
Related

Problem with "official" LCD software example on STM32F4 Discovery Expansion Board

Former Member
Former Member over 12 years ago

Hi,

 

I've just started to use my STM32F4 discovery expansion board (discovery board, base board, LCD and camera) and as a first shot I want to try out the software examples found here:

 

http://www.element14.com/community/docs/DOC-51670/l/stm32f4dis-bb-discover-more-software-examples

 

I've tried to run the LCD example called "LCD_35T" located in the folder "STM32F4xx_LCD_Example" but ran into some problems...

 

I'm using IAR Embedded Workbench for ARM as my IDE and have performed the following steps:

 

  • Open the project file located in "LCD_35T/EWARM" folder
  • Rebuild all --> Results in a successful build without errors/warnings
  • Download and debug --> Code is flashed and debugger started (using ST-LINK)
  • Running program (Go) --> Expecting LCD to show color bars according to the example but the screen is just white...


Does anyone have an idea what I'm doing wrong?

 

Thanks in advance for all response!

  • Sign in to reply
  • Cancel

Top Replies

  • Kilohercas
    Kilohercas over 12 years ago +1
    do you have LCD with same controller/pinout ? Right code with wrong init ( set registers for refresh rate, color type, bus type and so on) will produce white screen Check if RESET is high. Disable opt…
  • Kilohercas
    Kilohercas over 12 years ago in reply to Former Member +1
    IF LCD reset Line is LOW, you never get LCD working. some one mentioned bad contacts, also make RESET High after power up at if not by default code, than yourself. #define LCD_RST_PIN (GPIO_Pin_3) #define…
  • ChuckMcM
    ChuckMcM over 12 years ago +1
    So I too was having issues with the code provided by Embest so I wrote some of my own. You can pull a copy from Github here: https://github.com/ChuckM/bb-lcd This puts up a simple display on the LCD with…
Parents
  • ChuckMcM
    0 ChuckMcM over 12 years ago

    So I too was having issues with the code provided by Embest so I wrote some of my own. You can pull a copy from Github here:

    https://github.com/ChuckM/bb-lcd This puts up a simple display on the LCD with a running timer (counting up seconds and milliseconds)

    A screenshot of what it looks like when it is running is here: https://github.com/ChuckM/bb-lcd/blob/master/screen-shot.png

     

    I've noticed a couple of things, first that the viewing angle on this display is quite poor, the second is that since the LCD isn't actually memory

    mapped it would be really really hard to get it to update without flickering. If you run the demo it animates moving the RED/GREEN/BLUE/MULTI

    blocks around every 10 seconds.

     

    Also a shout out to the AdaFruit folks for their GFX library, it let me get something up and running quickly where it was more than just draw a

    line or draw a box. Originally the demo drew a clock face and animated the hands but that was really hard to watch with the flickering.

     

    --Chuck

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Kilohercas
    0 Kilohercas over 12 years ago in reply to ChuckMcM

    if you want fast updates, you must use write to internal ram function. Idea is simple, you send special commands to define area , and start send raw data. It's like paint bmp function. i can get up to ~400fps with this modification on SSD1963 480*272 lcd.

     

    void LCD_WriteBMP(uint16_t Xpos, uint16_t Ypos, uint16_t Height, uint16_t Width, uint8_t *bitmap)

    {

      u32 index;

      u32 size = Height * Width;

      u16 *bitmap_ptr = (u16 *)bitmap;

      bitmap_ptr+=Height * Width-1;

      LCD_WriteCom(0x0036);

      LCD_WriteRAM(0x0040);

     

      LCD_StartPixelLineAddress(Xpos,Ypos,Xpos+Height-1,Ypos+Width);

      for(index=0;index<(size);index++)

      {

        LCD_RAM = *bitmap_ptr--;

      }

      LCD_WriteCom(0x0036);

      LCD_WriteRAM(0x0000);

    }

     

    Problem is, you need to have frame buffer in sram if you want to refresh all screen.But you can optimize all paint functions by adding write directly to internal ram function.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ChuckMcM
    0 ChuckMcM over 11 years ago in reply to Kilohercas

    Sorry about being late to reply, in this particular case the Embest board uses the SSD2119 (not the 1963) however there is a similar sort of mode where you can set up the address counter internally and then repeatedly write to the 'Data' address and have it autoincrement. However, in this particular case the board is implemented poorly, it does not take full advantage of the STM32F4 FSMC controller, and doesn't wire up either the WAIT line or explicit RD/WR lines, (in part because the chip used doesn't have all FSMC pins due to the low pin count). Bottom line is that writing the frame cannot recognize a 'slow' write (as you get durring a DRAM refresh in the controller chip) so the software sets up delays in the DATA hold to insure that all the writes "work" (but even then you can over run the chip if you aren't careful.) The display works more reliably if you wire it up to the SPI port. That has its own limitations of course but at least you can then wire up the 'sync' pin to know when it is displaying and trying to do beam following (well display following as there is no "beam" :-).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • ChuckMcM
    0 ChuckMcM over 11 years ago in reply to Kilohercas

    Sorry about being late to reply, in this particular case the Embest board uses the SSD2119 (not the 1963) however there is a similar sort of mode where you can set up the address counter internally and then repeatedly write to the 'Data' address and have it autoincrement. However, in this particular case the board is implemented poorly, it does not take full advantage of the STM32F4 FSMC controller, and doesn't wire up either the WAIT line or explicit RD/WR lines, (in part because the chip used doesn't have all FSMC pins due to the low pin count). Bottom line is that writing the frame cannot recognize a 'slow' write (as you get durring a DRAM refresh in the controller chip) so the software sets up delays in the DATA hold to insure that all the writes "work" (but even then you can over run the chip if you aren't careful.) The display works more reliably if you wire it up to the SPI port. That has its own limitations of course but at least you can then wire up the 'sync' pin to know when it is displaying and trying to do beam following (well display following as there is no "beam" :-).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube