btrd72

[solved] LCD Problem

27 posts in this topic

Hi folks,

I'm building my seq V4 and am facing a major problem: my LCD displays only show a row of black squares...

I'm building a wilba frontpanel. The MBHP bootloader is in my STM32F4 board: MIOS Studio tells:

Operating System : MIOS32

Board : MBHP_CORE_STM32F4

Core Family : STM32F4xx

Chip ID: 0x10076413

Serial: #320041000D51353235363632

Flash Memory Size: 1048576 bytes

RAM Size: 196608 bytes

MIDIbox SEQ V4.092

MIOS Studio proposes 4 Midi Ins and outs for the Midibox (named MIDIbox SEQ V4, MIDIIN2 (MIDIBox Seq V4), MIDIIN3 (MIDIBox Seq V4) and MIDIIN4 (MIDIBox Seq V4). MIOS Studio is also able to see what's on my SD card, but it seems like the core board can't read neither the wilba MBSEQ_HW.V4 nor the standard MBSEQ_HW.V4 files which are located at the root of my SD card (when I try to edit the MBSEQ_HW.V4 with the MIOS File browser, I get an "Invalid response from MIOS32 core during read operation" after about 14% of the file has been downloaded)

I must add that my frontpanel isn't completely finished yet, so nothing else than the LCD displays are plugged on the MBHP_core_PCB (bought on smashTV shop).

This is the LCD I bought and its datasheet. It seems like the LCD for the seq V4 must use a HD44780 controller. The ones I got uses a ST7066U
 controller but are said to be compatible with HD44780...

I tweeked the contrast and luminance pots but none of my tries gave any effect on displaying good things... I verified the connections and everything is at its own place (Seq ground to LCD ground, seq Vd to LCD Vd, etc. )

Any idea of what could be wrong ?

Cheers,

Tom.

 

Edited by btrd72

Share this post


Link to post
Share on other sites

Is your jumper on the core set to 5 volts? If there is no jumper or it is set to 3.3 volts it will not work.

Share this post


Link to post
Share on other sites

Hi !

The J15_s jumper is set to 5V.

In fact, the LCD light up fine, but they just display a first row of black squares....

Share this post


Link to post
Share on other sites

If you don't find another problem, and although it is not highly likely, it might indeed be the controller, that is not 100% compatible, especially in 4-bit mode.I just did a quick google check and have found a few issues with compatibility of the ST7066U here and there. You should be able to source a cheap real HD44780 (it does not even need to be 40x2) from ebay for a few dollars to test...

Regarding the interrupted SD card transfers, i bet you are using windows, this is a common problem with the MIDI USB drivers under windows - for the moment, pull out the card, change the configuration file on your computer and plug it back in.

Good luck and many greets,
Peter

Share this post


Link to post
Share on other sites

You might try some of the other LCD configs, though I couldn't say what one would be better.

For the SD card, one way is to edit the file with a text editor on your computer and upload it using the file browser. Normally uploads go okay, but downloads hardly ever work for me.

 

Share this post


Link to post
Share on other sites

Hi !

It really kind to have taken the time to answer me, but I'm kind of lost with your answers now !!

12 hours ago, Hawkeye said:

If you don't find another problem, and although it is not highly likely, it might indeed be the controller, that is not 100% compatible, especially in 4-bit mode.I just did a quick google check and have found a few issues with compatibility of the ST7066U here and there.

Do you mean that the problem is most likely anywhere else than the LCD controller ?

 

12 hours ago, latigid on said:

You might try some of the other LCD configs, though I couldn't say what one would be better.

 

latigid, what do you mean by trying other LCD configs ? Byuing a new one that fits HD44780 standards ? Changing something in the config file ?

Looking at this post on the wiki I found:

" Additional hints: So long as the operating system (MIOS) hasn't been uploaded via MIDI, the LCD won't be initialized and shows black bars at the upper line. If you don't see these bars, adjust the contrast pot. The highest contrast can be achieved with V0=0V (you can adjust this voltage with the trimpot P2). "

This is exactly what I see (black bars at upper line)...But I don't get the "[...] So long as the operating system (MIOS) hasn't been uploaded via MIDI[...]". I have the MIOS bootloader installed on my STM32F4, I have an accessible and readable SD card (from MIOS Studio) on which I've put the MQSEQ_HW.V4 at the root of the file system... Did I miss something during installation ?

Cheers,

Tom.

Share this post


Link to post
Share on other sites

The firmware is up and running, if you can see the MIDIbox in MIOS studio, so MIOS is running... While i am not certain, that the display controller is incompatible, I say, there is a fair chance. It might be something else though, e.g. some bad solder spots on the core.

To "debug" this, I'd therefore highly recommend to obtain a real HD44780 for testing purposes (e.g. a cheap 16x2 for ~ 3$/EUR from ebay) - it will also serve you well for other MIDIboxes, that you build later on :-). If that testing display works, you will have to replace the (more expensive) 40x2 panels.

Many greets,
Peter

 

Share this post


Link to post
Share on other sites

The 2x16 with the right controller would be a great tool idea for testing. I would triple check your wiring as well. It is odd that you are getting only one row of dark characters. Normally they should both be lit with the same amount of contrast. The darkness of the both rows should be adjustable by the contrast pot equally at the same time. If it is too dark you will not be able to see the characters. The same if it is too light. the contrast should work in this way regardless if the controller is compatible or not. If the controller is not compatible or there is a soldering or component issue you will have the additional issue you mention of lack of characters or possible gibberish on the screen. If you are using header connectors it would be possible to get one backwards or reversed. If this were the case you might possibly have a data line connecting to the contrast connector. That may be cycling the contrast at a rate where only one line is being lit full contrast. If the wiring is good and contrast is working properly on the single line it is most likely you have a bad LCD.

 

Good luck!

Gerald 

Share this post


Link to post
Share on other sites

^^ these are very nice troubleshooting tips @gerald.wert!

A bit of info can be gleaned from the following MIOS code:

http://svnmios.midibox.org/filedetails.php?repname=svn.mios32&path=%2Ftrunk%2Finclude%2Fmios32%2Fmios32_lcd.h

a "stab in the dark" test could be to load the bootloader hex (through MIOS Studio, not using the boothold mode) and change for one of the following LCD types:

  MIOS32_LCD_TYPE_CLCD     = 0x00,
  MIOS32_LCD_TYPE_CLCD_DOG = 0x01,
  MIOS32_LCD_TYPE_CLCD_PP  = 0x02,

only the 0x00, 0x01 or 0x02 are needed.

Quote

LCD Type: applications which are compiled with the "universal" LCD driver can handle various character/graphical LCD types and display dimensions.
It's recommended to store these parameters of your MIDIbox in the bootloader info range.
Following commands are available:


     lcd_types           lists all available LCD types and their appr. number
     set lcd_type        the LCD type number (enter "lcd_types" to get a list of available types)
     set lcd_num_x       number of LCDs in X direction
     set lcd_num_y       number of LCDs in Y direction
     set lcd_width       width of a single LCD (*)
     set lcd_height      height of a single LCD (*)
     store

(*) CLCDs: number of characters, GLCD: number of pixels
Example: a single HD44780 based 2x20 character LCD is connected to your MIDIbox (default)
Enter:

 


     lcd_type CLCD
     lcd_num_x 1
     lcd_num_y 1
     lcd_width 20
     lcd_height 2
     store
Example2: two HD44780 based 2x40 character LCDs are connected to your MIDIbox
Enter:

 


     lcd_type CLCD
     lcd_num_x 2
     lcd_num_y 1
     lcd_width 40
     lcd_height 2
     store
Example3: five SSD1306 based 128x64 OLEDs are connected to your MIDIbox in vertical direction
Enter:

 


     lcd_type GLCD_SSD1306
     lcd_num_x 1
     lcd_num_y 5
     lcd_width 128
     lcd_height 64
     store

Please note: some applications (like MIDIbox SEQ V4) could overrule the predefined parameters if they can't handle smaller (or larger) LCD sizes.
Please note also: some applications could have been released with a different LCD driver (MIOS32_LCD != "universal") which don't consider these parameters. It's up to the developer to document this limitation.

 

 

Share this post


Link to post
Share on other sites
19 hours ago, gerald.wert said:

It is odd that you are getting only one row of dark characters. Normally they should both be lit with the same amount of contrast. The darkness of the both rows should be adjustable by the contrast pot equally at the same time. If it is too dark you will not be able to see the characters. The same if it is too light. the contrast should work in this way regardless if the controller is compatible or not. 

I've not been clear enough in my first post I think. Both LCD display a first row of black squares. Contrast and rightness are adjusted equally when I turn the pots !

I rechecked all the solders, they look fine. And the wiring is fine too !

@latigid on : Thanks for the link, I'll check that too...

...And I'll buy a 2x16 HD44780 LCD too

Thanks men !

 

Share this post


Link to post
Share on other sites

All right....I'm definitevely lost...

I just received a 2x16 HD44780 LCD, wired it (checked twice) to the MBHP_Core J15A jumper and what I get is.....a bright blue background....

What surprises me is that when I turn the contrast P2 pot, I can see 2 rows of 16 black squares (The 8 rigthmost squares on row 1 and 2) appear and almost immediately disappear...I need to constantly tweak the Contrast pot to see these squares....So I rechecked the solders of the trim pots and they seem fine. This "flickering when tweeking" thing isn't visible when I use my original LCD : only the upper row is constantly filled with black squares.

All connections from the STM32F4 to the IC2 (74HC595) are good...

If everything was working, what should I see on this 2x16 LCD display ? Squares ? characters ? Could this come from a faulty BC337 .

Many thanks !

Tom.

Share this post


Link to post
Share on other sites
  • Is the voltage set to the proper value (probably +5V)?
  • Is the chip 74HC595 or 74HCT595?
  • Did you try swapping the chip?
  • Is it a real Discovery board or a cheap clone?

Decent pictures would help in troubleshooting

Share this post


Link to post
Share on other sites

Hello !

12 hours ago, latigid on said:
  • Is the voltage set to the proper value (probably +5V)

Yes !! The jumper is set on 5V and the voltage feeding my LCD Displays is 5V

12 hours ago, latigid on said:
  • Is the chip 74HC595 or 74HCT595?

The IC2 is a 74HC595, as listed there....No T in the reference...

12 hours ago, latigid on said:
  • Did you try swapping the chip?

Not yet....I'll try this when I comme back home tonight !

12 hours ago, latigid on said:
  • Is it a real Discovery board or a cheap clone?

I bought the board at Mouser, here is the link....

Is that the good board ?

I'll send decent pictures or videos when I come back home too !

Cheers,

Tom.

Share this post


Link to post
Share on other sites
3 hours ago, btrd72 said:
16 hours ago, latigid on said:
  • Is it a real Discovery board or a cheap clone?

I bought the board at Mouser, here is the link....

Is that the good board ?

I'll send decent pictures or videos when I come back home too !

Cheers,

Tom.

Hello Tom

Yep, good board

Best

zam

Share this post


Link to post
Share on other sites

I'm wondering if the transistor is correctly installed or has a non-standard pinout.

Share this post


Link to post
Share on other sites

OK...

I'v replaced the 74HC595, checked that the transistor had a "traditional" pinout and that the solders were good (to ground, R12 and R13).

I rewired my test screen (2x16 HD44780 LCD) and now all I get is a filled with black squares upper row. No matter of the amount of contrast and luminosity, no character appear...(yesterday's flickering problem might have come from a bad wiring...thanks tireness)

I read that a row of black squares could mean that the LCD failed initialization and stays in "setup" mode. This is sometimes due to bad timing (delays) during the initialization procedure. Is there a way to modify this ?

My MBHP_Midi_IO module is not plugged in when I do my testing....could that have an influence ?

Could I have done something wrong during the bootloader procedure ? Is there a way to check the MIOS is correctly installed (apart from seeing that MIOS studio recognizes the midibox and that it accesses to the SD card ?)

Cheers,

Tom.

Share this post


Link to post
Share on other sites

Normally if you can get communication going over USB, the LCD should boot up with either "READY" or a start screen from the application.

  • Is your resistor network soldered the right way around?
  • How long is the cable for the LCD?
  • photos
  • photos

Share this post


Link to post
Share on other sites

I was going to suggest the 4x1K resistor array. I bought the wrong part once, and it was a "series" array and not a parallel that is the correct. 

Share this post


Link to post
Share on other sites
11 hours ago, eptheca said:

I was going to suggest the 4x1K resistor array. I bought the wrong part once, and it was a "series" array and not a parallel that is the correct. 

Damned !! Wrong resistor network...I made a mistake when I bought the parts...This is a 4x10K resistor array....and of course, no 4x1K resistor network in stock at home....Would it be a problem if I put a 4x 220 Ohms resistor network instead ( this one for example ) or if there is no resistor network ?

Cheers,

Tom.

Edited by btrd72

Share this post


Link to post
Share on other sites

Easy mistake, I did the same.

You need 4x 1K resistors where one side of them is connected to the same point, and they go to each point.

It will not look as neat, but it will do the job.

Here is the part I got in the end

Mouser part http://no.mouser.com/ProductDetail/Bourns/4605X-101-102LF/?qs=%2fha2pyFaduhn5NAjYhVLSTmfu7034ffGo3c%2f4pGM9XJP044ExaYaWg%3d%3d

 

Share this post


Link to post
Share on other sites

You can jury rig a 4x 1k network pretty easily

1060_resistor_bend_1.jpg

 

It might go better on the rear side of the Core?

 

Share this post


Link to post
Share on other sites

Ok guys.....

I'm really sorry I kind of wasted your time....The faulty resistor network was the problem....

I built a homemade 1KOhm RN, and the displays work like a charm !!

Thanks again !

Tom.

Share this post


Link to post
Share on other sites

You're welcome :)

It's a nice opportunity for me to contribute.

Enjoy your LCDs 

Share this post


Link to post
Share on other sites

Can anybody tell me if I can modify the title of the thread to add a [solved] ?

Share this post


Link to post
Share on other sites

Yes you can - simply click "edit" in your first post and then add [solved] to the title.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now