2012-10-31 12:26 PM
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. Thx2012-10-31 03:21 PM
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¤tviews=233]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fLCD%20on%20STM32F4%20Discovery&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=2332012-10-31 03:46 PM
2012-11-01 06:31 AM
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.
2012-11-01 01:25 PM
2012-11-01 04:03 PM
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.2012-11-02 12:53 AM
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.
2012-11-02 01:19 AM
I hope to be
good enough to do this.
2012-11-02 01:58 AM
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)
2012-11-02 02:25 AM
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