HD44780 How to wire?

Locked
trunet
Posts: 54
Joined: Fri Apr 06, 2012 7:18 pm

HD44780 How to wire?

Post by trunet »

Hi,

How can I wire a simple HD44780 LCD with my STM32F4Discovery board? I saw PORT_DATA and PORT_CTRL on definition file, however which pins? I want to use PB12-PB15 with 4-bits mode on my stm32f103 board. Will I need a level converter to control it using 3.3v?

Thanks,

Wagner Sartori Junior
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: HD44780 How to wire?

Post by Tectu »

Hello trunet,

I never used a HD44780 on a discovery myself, but this is shouldn't be a big issue.
You have to start by copying the tdisp_lld_board_example.h board file and give it a proper name. You could also just modify the existing discovery board file to keep things simple. In this file, you just have to fill in the four function to match your hardware configuration. The existing examples should be enough to tell you what's to do in which routine.
However, the current examples suppose that the data pins are connected through the bits 0 to 3 in 4-bit or 0 to 7 in 8-bit mode. In your case you simply shift the calls in palWritePort(). You can also use other PAL routines provided by ChibiOS/RT which allow to use a mask instead.

You don't need a level converter. The HD44870 or to it compatible display controllers are totally fine with 3.3V logic.

Please note that the current state of the TDISP module has never been finished. There might be the need to apply a few small fixes. I'd be thankful if you could contribute them afterwards.


~ Tectu
Locked