Skip to main content
pranathi1091
Associate III
Nov 13, 2012 11:30 AM UTC
Question

ST7036 display interface with STM32

Posted on November 13, 2012 at 12:30

Hello All,

I am using ST7036 LCD controller. And i want to interface this with my STM32 board using 8 bit parallel interface.

My pin connection are as follows

E-PD9

RS-PD7

RW-PD8

And PortC0-C1 to data lines of LCD.

I have modified the available driver for ST7036 display.

But i could not find anything to be displayed.

i have attached the code.

Could anyone pls let me know where am i going wrong.

Thanks

#stm32 #interface-display
This topic has been closed for replies.

21 replies

frankmeyer9
Associate III
Nov 14, 2012 1:45 PM UTC
Posted on November 14, 2012 at 14:45

<forum software crash ...>

jj2
Associate
Nov 14, 2012 2:50 PM UTC
Posted on November 14, 2012 at 15:50

Delays are critical at two points w/44780/clone based displays:

a) during first (5 or so) display initialization instructions

   i.e. 0x38, 0x38, 0x0E, 0x06, 0x01

  suggest overkill delay between each (say 5mS)

b) after each/every 0x02 (home) or 0x01 (clear screen ''CLS'' and home)

   suggest 2-3mS after either

Less critical are the inter-character data transfers - 40uS are specified here.

Crucial - and remaining silent throughout - is the visibility of the display pixel field.  With pixels unseen - no confirmation can be achieved.  (earlier post greatly detailed)

frankmeyer9
Associate III
Nov 14, 2012 3:22 PM UTC
Posted on November 14, 2012 at 16:22

I hope I did not spread too many confusion with mentioning a HD44780.

The original poster uses a ST7036, which a little different from the HD44780. I sometimes cite from recent experience when getting this display running.

However, I leave it to the original poster to verify his code with the spec. requirements of his display controller.

Delays are critical at two points w/44780/clone based displays:

 

a) during first (5 or so) display initialization instructions...

 

Mine proved less critical. The datasheet says an explicit initialization is only necessary if Vdd rises not fast enough, which prevents a proper auto-init.

Accessing the (HD44780) display a few milliseconds after startup, I find it properly initialized, and in the state as advertised in the datasheet. So I just need to switch to 2-line mode, and turn it on.

jj2
Associate
Nov 14, 2012 3:48 PM UTC
Posted on November 14, 2012 at 16:48

Indeed you are correct - I seized upon 44780 when in fact ST7036 is prominent.  All of the timing considerations I listed are for 44780/clone based devices.

Initialization time delays (44780) are especially critical should one seek 4 data-line - rather than 8 data line mode.  And the displays always default into one char ROW mode - so the 0x38 command is required to bring 2nd line into observation.

Indeed you clearly advised full compliance with poster's display spec - having long been involved in the design & marketing of displays - my bet remains on mal-adjusted contrast voltage causing loss of pixel field...

frankmeyer9
Associate III
Nov 14, 2012 6:17 PM UTC
Posted on November 14, 2012 at 19:17

... having long been involved in the design & marketing of displays ...

 

 

I'm not - I just have some experience from getting some displays to work. But the techniques do not differ much from getting other non-trivial electronics to work.

 

- my bet remains on mal-adjusted contrast voltage causing loss of pixel field...

 

Possibly this, or the adjustment potentiometer is missing at all.

Which would result in a contrast voltage of zero volt ...

jj2
Associate
Nov 14, 2012 6:46 PM UTC
Posted on November 14, 2012 at 19:46

Which would result in a contrast voltage of zero volt ...

 

 

Or not!  Many displays return this Vo pin to Vdd thru relatively high impedance - which is why a low Z path to ground is so critical...

pranathi1091
Associate III
Nov 16, 2012 5:24 AM UTC
Posted on November 16, 2012 at 06:24

Thanks for all you replies.

I have solved all the delay and the initialization probelms.

And the other doubt i have is , how do i write a character to Display RAM?

Could anyone suggest me in this??

Thanks

frankmeyer9
Associate III
Nov 16, 2012 9:07 AM UTC
Posted on November 16, 2012 at 10:07

Isn't there any such code in the examples you based your code on?

I don't have a ST7036-based display, so I can't test anything.

But at first glance at the datasheet, I believe you just need to write to the display RAM.

The actual displayed character is pulled from the character map ROM.

frankmeyer9
Associate III
Nov 16, 2012 9:08 AM UTC
Posted on November 16, 2012 at 10:08

When will it be possible to post something without permanently hitting Unhandled Exception ???

 

 

This forum software sucks !

jj2
Associate
Nov 16, 2012 3:15 PM UTC
Posted on November 16, 2012 at 16:15

Thought that was my, ''time of composition.''  

Share your pain...