Jump to content

LCD does not start on STM32F4


Saschaaa
 Share

Recommended Posts

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

Edited by Saschaaa
Link to comment
Share on other sites

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

Edited by mono
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ?

 

 

Link to comment
Share on other sites

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 ?

Edited by Saschaaa
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Hi,

thanks for your reply ;)

 

 

- 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

Edited by Saschaaa
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Edited by Saschaaa
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ;)

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

Best Regards, Sascha

Edited by Saschaaa
Link to comment
Share on other sites

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 ?

Edited by Saschaaa
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Hi,

 

got some strange result :)

I used a LogicAnalyzer to check the waveforms again. I connected the datapins(d0-d7), e, rw, rs and the sclk pin on the hc595. After starting the Analyzer i suddenly saw the systemtime... Then i disconnected every wire except the one connected to the sclk pin and the systemtime was still visible. After disconnecting the wire from the sclk pin, the system time disappeared..

So, the lcd is obviously working, but connecting the logicanalyzer all the time is no solution :D

Link to comment
Share on other sites

I've read the whole thread again - of course, you already answered this question...

Since the correct IC is used, the reason must be releated to the cabling between STM32F4Discovery board and the 74HC595, especially ground and SCLK.

Remote diagnosis is very difficult here - but the photo of your breadboard shows that you are using long and thick cables everywhere, this could lead to such a bad signal quality (and EMC issues, etc.) - I'm normally using thin wirewrap cables which reduce the risk for such issues...

Your scope pictures show very spiky signals as well, but I'm unsure if this is just because you've connected unshielded probes, or if these are the actual signals - in this case again an explanation for the issues.

The shift register is working properly when a probe is connected: the probe adds an impedance to ground, this filters spikes.

Again an indicator for a cabling issue

I would propose that you improve the ground connections between the 74hc595 and the discovery module first.

Here you are allowed to use a thick cable ;)

If this doesn't already help, try a short, thin cable between discovery and the SCLK pin

Best Regards, Thorsten.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...