LCD does not start on STM32F4

Hey,

 

i soldered the PCB for the STM32F4 Core Module and tried now to get the LCD Module working…

I bought the Displaytech LCD 162a, and wired it like in the LCD-Module Tutorial.

After that, i loaded the LCD-Tutorial Code on the Core, where it should print out the systemtime while the LED is modulated by a PWM..the led modulation works, but all i see on the lcd are 16 black bars…

I have seen, that some other users had the same problem, but not with a 2x16 character display…

I double-checked the soldered pins, and they look fine

Anyone got some advices ?

 

 

thanks

…seems to be a standard-lcd-module. have you done the lcd-configuration in the bootloader-update-app ? if not you can even test the lcd-signals there…

 

best regards,

mOnO

Hi,

thanks for your reply :slight_smile:

do you mean something like this ?

lcd_type CLCD
 lcd_num_x 1 
 lcd_num_y 1 
 lcd_width 16 
 lcd_height 2 
 store

And if yes, where do i have to write it down ?

In the mios studio terminal after uploading the mios32_bootloader update application ?

yes, these are actually commands for the update-application. once you have stored these parameters you wont need the update-applciation anymore, because you have stored them on the discovery-board. your mios-applications can read them out and the functions will work accordingly… :shifty:

 

best regards,

mOnO

ok thanks,

i will try it out tomorrow :wink:

 

best regards,

sascha

The CLCD display should work by default without special re-configuration.

So - this hint is only important if you’ve changed the configuration in the past.

 

It could also be related to a HW connection issue, especially since the Displaytech 162a has no 1:1 pinning

Could you please take a photo which shows the core<->LCD connections and post it here?

 

Best Regards, Thorsten.

Hi,

 

i tried out the commands but the lcd is still not working..

 

I made some pics, i hope you can do something with it..

I tried not to solder the ribbon-cable directly on the lcd and used instead a header to place it.

 

http://www.directupload.net/file/d/3830/98tpj4p7_jpg.htm

http://www.directupload.net/file/d/3830/enyxgmhb_jpg.htm

 

The purple wire is docked on the 5V(B+) of the J15A and connected to the 15th Pin (BLA ) of the LCD-Module,

the wire next to the purple is docked on the B- Pin of the J15A and to the 16st Pin (BLK) of the LCD-Module

and so on, right ?

 

 

Hi,

 

i used the oscilloscope to see the waves which are supposed to come out of the sclk-pin, but i do not see anything or hardly anything

Neither when i test it while the stm32f4 is connected to the core module (just a small triangle wave) nor while using it standalone (connected to ground and pd6).. when the stm32f4 is not connected to the board i get sometimes a square wave when i touch the pd6 pin with the oscilloscope..but when i plug it, i don’t get any wave

 

any advices ?

Hm… it’s more difficult to check the connections with this picture than expected.

 

But since you’ve a scope: you should see some fast waveforms ca. 3 second after reset (after you’ve pushed the black reset button) for ca. 10..20 mS - thereafter communication will be stopped if no LCD has been detected.

 

Ensure that you are using a 74HC595 (and no 74HCT595)

 

If the signals don’t toggle for 10..20 mS at SCLK/RCLK, then the issue must be already somewhere between the core<->74HC595 connection

 

Best Regards, Thorsten.

Hi,

thanks for your reply :wink:

 

 

  • I checked the IC - and i use the 74HC595

 

 

  • Then i used the scope to check the waveforms… this is what i got:

 

http://www.directupload.net/file/d/3832/5f7h4fwa_jpg.htm

 

The upper waveform represents the sclk, the lower the oe

 

and here the upper one represents the sclk, the lower the rclk

 

http://www.directupload.net/file/d/3832/ienvetpr_jpg.htm

 

 

 

  • Then i used a potentiometer to check the resistance between the lcd-display and the 74hc595/stm32f4

   The result: ca 0.20Ohm on the datapins, which should be allright ?

 

 

Any other advices ?

 

 

edit: just downloaded the bootloader update package and installed it. after that, i uploaded the .hex of the lcd-tutorial again, the black bars disappeared, but the time, which should be printed, is not visible yet…
 

best regards, sascha

Hi Sacha,

 

two observations: does the lower waveform of the first picture really show the OE# line (Pin 13 of the 74HC595, resp. STM32F4 pin RC11, resp. J15:RW)?

 

The OE# state should never change while new data is shifted into the 74HC595.

If this is really J15:RW, then the problem is related to a connection error.

 

 

Please also check the signal slope, it should be ca. 100 nS

If a value transitions at the OE line takes more time (> 500 nS), then you are using the wrong pull-up resistors at R33, they should be 1k

 

Best Regards, Thorsten.

Hi,

 

 

sorry, the lower waveform represented the ser-pin.

 

I made some pics again today, maybe they show you a bit more.

1 picture for the clr,sclk,rclk,oe and ser pin

 

http://www.file-upload.net/gal-117466/yk8an9/1.html

 

 

best regards, sascha
 

 

btw: the black bars are visible again

Looks good!

 

So, it seems that the configuration isn’t the problem, MIOS32 tries to initialize the LCD

 

Best Regards, Thorsten.

Ok !

 

What would you suggest me to do next ?

 

Best refards,

Sascha

Did you ever connect the LCD wrongly, e.g. with some cables swapped?

This could damage the LCD, with the result that it can’t be initialized. Possible effects: sometimes you will only see a black bar at the upper line, or you won’t see any pixel at all.

 

If you are sure that the LCD was never connected the wrong way, then it makes sense to doublecheck the connections between microcontroller, the 74HC595 SR and the LCD by comparing the signals at the source/destination with the two probes of your scope.

 

If this still doesn’t help, then I can only recommend to try another LCD

(I’m not writing a different LCD type, Displaytech 162A works fine at my side)

 

Best Regards, Thorsten.

I just remember that some applications (such as the bootloader update application) have an inbuilt LCD interconnection test.

After upload, just enter the “testlcdpin” command in MIOS terminal to get a list of available options.

By setting the pin to logic-0/1 you will be able to measure if all connection are working properly.

 

Best Regards, Thorsten.

Hi Thorsten,

i think it might be possible that I connected the LCD wrong or that some cable caused a short circuit, as this is my first project where i had to solder on my own..

Nevertheless i will check the connections between the microcontroller, the 74HC595 and the LCD once again and I will try the “testlcdpin” command :wink:

thanks for your tips, i will test it out on Monday

Best Regards, Sascha

I tried the testlcdpin command after uploading the bootloader update application..

And i dont get any result..

I set the pin to 0 or 1, but the scope doesnt show any wave

After uploading the lcd-tutorial app again, i was able to see the waves again..

Any suggestions ?

I just doublechecked this at my side, with V1.018 I can control all pins on a STM32F4 core.

 

You are writing “set the pin to 0 or 1”

 

Which pins did you try exactly?

 

There are some pins which are controlled by the core directly, such as RW, RS, E1, E2

And some others which are controlled via a shift register (D0..D7)

 

If even RW/RS/E1/E2 are not working, then it’s more likely a measurement error, check your scope settings, it should show the current waveform (and not a captured waveform)

Alternatively use a multimeter.

 

Usage hint: in MIOS Terminal, you can use the cursor-up/down keys to browse through the command history. This simplifies the command entry, no need to enter “testlcdpin” again and again, just get it back from the history and modify the parameters which should be tested.

 

Best Regards, Thorsten.

Update: another reason for this behaviour could be, that the wrong pins are measured. E.g. because some connections are swapped.

Therefore another hint: after entering (for example) “testlcdpin rs 1”, check that J15:RS got the high-level, and check that RW, E, D0-D7 are at 0V.

 

If RS is 0V, and another pin is at high level instead, you found a wrong connection!

 

Best Regards, Thorsten.