cancel
Showing results for 
Search instead for 
Did you mean: 

STM32vldiscovery and hd44780 display

joesoftware
Associate II
Posted on October 31, 2012 at 20:26

Hi, i tried to use IAR example about LCD for use my display hd44780.

I connected 6 pin (RS,E,DB4,DB5,DB6,DB7) for use it on 4bit configuration (i'm sure that the connection is good cause i used that on my old arduino board).

I only see first line of black simple, nothing else.

Can someone help me with that code or link some other library that work good on stm32vldiscovery.

Thx
23 REPLIES 23
orn
Associate II
Posted on October 31, 2012 at 23:21

I am writing the driver for the same LCD,

as soon as I finish them i will public them, in this topic you can find an example:

check it out

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/LCD on STM32F4 Discovery&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=233]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fLCD%20on%20STM32F4%20Discovery&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=233

joesoftware
Associate II
Posted on October 31, 2012 at 23:46

thx, while i wait ur release i do some try to modify other code, when u have done please update this topic.

Bye

Posted on November 01, 2012 at 14:31

Aren't these 16 x 2 displays prevalent on dozens of IAR / Olimex dev boards? There are surely examples within the IAR examples, or board files.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
joesoftware
Associate II
Posted on November 01, 2012 at 21:25

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6m1&d=%2Fa%2F0X0000000bv3%2F8bRt.RjLTFS7vukHvN.egDef6fMU3_ExAIw8uirxxQQ&asPdf=false
Posted on November 02, 2012 at 00:03

LCD_D_ALL does not appear to be consistent with your pin usage.

Things that will cause issues are the use of the wrong pins, or timing delays which are insufficient. Make sure your timing loops are adequate, use a scope if necessary.

Provide details of your pin usage, and the supplies to your panel.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
joesoftware
Associate II
Posted on November 02, 2012 at 08:53

I have not changed

LCD_ALL

because I use

a

4 bit

configuration

, and these

pins

should not be used,

as

RW

I

also

connected to ground

directly

on the board.

VSS 1 GND

VDD 2 +5V

VO 3 10k  Potentiometer

RS 4 Pin 15 PORTA B

RW 5 GND

Enable 6 Pin 14 PORTA B

D0 7 Not needed for 4-Bit

D1 8 Not needed for 4-Bit

D2 9 Not needed for 4-Bit

D3 10 Not needed for 4-Bit

D4 11 Pin 10 PORTA B

D5 12 Pin 11 PORTA B

D6 13 Pin 12 PORTA B

D7 14 Pin 13 PORTA B

I think it might

be a

timing problem

as you said.

joesoftware
Associate II
Posted on November 02, 2012 at 09:19

ok i understand the problem, my board is stm32vldiscovery at 24MHZ clock, but this code is for STM32F103RBT6 that is a 72Mhz, i need to optimize timer, but

I hope to be

good enough to do this.

Posted on November 02, 2012 at 09:58

I have not changed

LCD_ALL

because I use

a

4 bit

configuration

, and these

pins

should not be used

 

No, actually I think they're pretty critical to the operation of the code.

#define LCD_D_ALL  (LCD_D4 | LCD_D5 | LCD_D6 | LCD_D7)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
joesoftware
Associate II
Posted on November 02, 2012 at 10:25

From old code that i used as starter point there are in this configuration

/* Connections between LCD and STM32F103RB  */

#define LCD_RS          GPIO_Pin_12  // PC12

#define LCD_RW          GPIO_Pin_11  // PC11

#define LCD_EN          GPIO_Pin_10  // PC10

#define LCD_D4          GPIO_Pin_3   // PC3

#define LCD_D5          GPIO_Pin_2   // PC2

#define LCD_D6   GPIO_Pin_1   // PC1

#define LCD_D7          GPIO_Pin_0   // PC0

#define LCD_PORT        GPIOC        // Port that is connected the LCD (current port is PORT C)

#define LCD_D_ALL  (GPIO_Pin_3 | GPIO_Pin_2 | GPIO_Pin_1 | GPIO_Pin_0)

They are 4 more pin for use that display in full 8bit mode (DB0|DB1|DB2|DB3)

However, I

tried editing

you suggested

but

it does not work

.

I need i think a new rcc configuration and a new delay function, from 24MHZ and not from 72MHZ