TM STM32F4xx Libraries  v1.0.0
Libraries for STM32F4xx devices from Tilen Majerle

HD44780 LCD driver library for STM32F4xx - http://stm32f4-discovery.com/2014/06/library-16-interfacing-hd44780-lcd-controller-with-stm32f4/. More...

Modules

 TM_HD44780_Macros
 Library defines.
 
 TM_HD44780_Functions
 Library Functions.
 

Detailed Description

HD44780 LCD driver library for STM32F4xx - http://stm32f4-discovery.com/2014/06/library-16-interfacing-hd44780-lcd-controller-with-stm32f4/.

It also supports all HD44780 compatible LCD drivers.

Default pinout
LCD     STM32F4XX       DESCRIPTION

GND     GND             Ground
VCC     +5V             Power supply for LCD
V0      Potentiometer   Contrast voltage. Connect to potentiometer
RS      PB2             Register select, can be overwritten in your project's defines.h file
RW      GND             Read/write
E       PB7             Enable pin, can be overwritten in your project's defines.h file
D0      -               Data 0 - doesn't care
D1      -               Data 1 - doesn't care
D2      -               Data 2 - doesn't care
D3      -               Data 3 - doesn't  care
D4      PC12            Data 4, can be overwritten in your project's defines.h file
D5      PC13            Data 5, can be overwritten in your project's defines.h file
D6      PB12            Data 6, can be overwritten in your project's defines.h file
D7      PB13            Data 7, can be overwritten in your project's defines.h file
A       +3V3            Back light positive power
K       GND             Ground for back light

If you want to change pinout, do this in your defines.h file with lines below and set your own settings:

//RS - Register select pin
#define HD44780_RS_PORT     GPIOB
#define HD44780_RS_PIN      GPIO_PIN_2
//E - Enable pin
#define HD44780_E_PORT      GPIOB
#define HD44780_E_PIN       GPIO_PIN_7
//D4 - Data 4 pin
#define HD44780_D4_PORT     GPIOC
#define HD44780_D4_PIN      GPIO_PIN_12
//D5 - Data 5 pin
#define HD44780_D5_PORT     GPIOC
#define HD44780_D5_PIN      GPIO_PIN_13
//D6 - Data 6 pin
#define HD44780_D6_PORT     GPIOB
#define HD44780_D6_PIN      GPIO_PIN_12
//D7 - Data 7 pin
#define HD44780_D7_PORT     GPIOB
#define HD44780_D7_PIN      GPIO_PIN_13
Changelog
 Version 1.2
  - March 11, 2015
  - Added support for my new GPIO library

 Version 1.1
  - November 08, 2014
  - D6 and D7 default pins changed from PC14,15 to PB12,13, because RTC crystal is on PC14,15
 
 Version 1.0
  - First release
Dependencies
 - STM32F4xx
 - STM32F4xx RCC
 - defines.h