2012-11-13 03:30 AM
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-display2012-11-14 05:44 AM
The problem is with my delay i guess. As per the datasheet it should be 20nano seconds which I am not doing.
This is a rather short delay. Controlling my HD44780 display with a STM32F0, such delays are realized intrinsically by setting the appropriate pins in sequence. With faster controllers, you might run into problems. And I guess there are other timings to observe, like inter-command settling times, usually in the range of at least 200 ... 500ns. As such display logic is mostly static, you can certainly go slower. The datasheet specifies the lower limits. A logic analyzer or scope could be helpful here.
2012-11-14 05:45 AM
<forum software crash ...>
2012-11-14 06:50 AM
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)2012-11-14 07:22 AM
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.
2012-11-14 07:48 AM
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...2012-11-14 10:17 AM
... 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 ...
2012-11-14 10:46 AM
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...
2012-11-15 09:24 PM
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?? Thanks2012-11-16 01:07 AM
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.2012-11-16 01:08 AM
When will it be possible to post something without permanently hitting Unhandled Exception ???
This forum software sucks !