cancel
Showing results for 
Search instead for 
Did you mean: 

8-bit LCD interfacing

M0nty
Associate II

Hi everyone I'm rather new with programming with STM32 controllers and I am currently using NUCLEO-L432KC. Currently I'm facing a problem with HAL_GPIO_WritePin() function. I am interfacing with a 16x2 LCD and I am trying to write to the RS pin via the function I have mentioned, however I am facing a problem where the RS isn't being set to the desired value I am providing. I have provided the value like so: HAL_GPIO_WritePin(RS_GPIO_Port, RS_Pin, rs);

Where I have given rs = 0 but the function is setting the value as 1. I have also provided the photo of the RS pin configuration from the IOC file.

 

 

24 REPLIES 24

With data lines, they will be bidirectional as he's using W\ pin. So he will change the configuration of the data line pins each time he switches from read to write.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Hi SofLit,

i think he is happy if he has a "Hello World" on his Display.

Reading Data from the Display is  the next level ;) in the programming game.

padawan 


@padawan wrote:

Reading Data from the Display is  the next level ;) in the programming game.

 

 Indeed but my comment was to warn him if he will intend to use read/write. To start he needs to start with Write operation (writing to the LCD).

PS: I remember long time ago when I was a student (21 years ago), I programmed this kind of LCD just by using switches for learning purposes ;) . Times have changed ...

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

 



PS: I remember long time ago when I was a student (21 years ago), I programmed this kind of LCD just by using switches ;). Times have changed ...



Yes, the good old days, ;) 
My first contact with these displays was in the last millennium with a PIC controller and in assembler.

padawn


@padawan wrote:
My first contact with these displays was in the last millennium with a PIC controller and in assembler

They used to be a staple of 8051 forums ...