Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : Very weird LCD problem...

   Page 1 of 3    
Posted: 02:46am
18 Apr 2024
Copy link to clipboard
Grogster
Admin Group


THIS one has me totally confused.

I designed a PCB to use a 9341 SPI LCD coupled to a 170 MM2 chip, and that board worked fine - so did the LCD.

I then redesigned the board to allow for an extra button, BUT the layout to the LCD remained EXACTLY the same as the old board, but the LCD won't work in the new PCB.

All I get, is a bright-white LCD, but it never seems to initalize.

If I take the LCD and the MM2 chip, and plop them back in the OLD board, everything works just fine.

Now, I know what most of you are already thinking at this point - the PCB is bad or has a disconnection on one of the tracks between the LCD and the MM2 chip.

NO, IT DOES NOT!

I have traced out all lines between the LCD and the MM2 chip, DIRECTLY on top of the LCD, and on the top of the pins of the MM2, so that this also tests the connections in the sockets for the LCD, and also the IC socket for the MM2 chip - ALL signal lines are intact, and zero ohms.  None are a high resistance or anything like that, they are ALL there, where they should be.

I tried a couple of different LCD modules on the NEW board - they WON'T work, but they WILL work in the old board.

I'm out of ideas at this point, as it does not seem to be the LCD, the MM2 chip, the PCB tracks OR the connectors for the LCD and the socket for the MM2.

Electrically, it traces out as exactly the same as the one that DOES work, but it will NOT work on the new board.

I'm now left scratching my head, as I cannot work out what the hell is going on here.....

Here is an image of the relevant part of the PCB layout:





OPTION LCDPANEL ILI9341, RLANDSCAPE, 26, 24
MMBASIC ver 5.05.01

About the only thing I can now think of to test, is that we have one or more lines between the MM2 chip and the LCD, that are shorted to ground(or each other) or something, so I will test for that next.

There HAS to be a reason.....
Smoke makes things work. When the smoke gets out, it stops!
 
Posted: 02:57am
18 Apr 2024
Copy link to clipboard
OA47
Guru


Grogs, I have a similar problem with completely different hardware. I have an ILI9488 4inch display on one of my Pi-Pico backpacks where I have spent hours trying to fault find. Making things worse the problem is intermittent where the screen does not reset sometimes but down powering the board does sometimes get it to work. Other boards are ok. So I will be interested in what you find.

0A47
 
Posted: 03:17am
18 Apr 2024
Copy link to clipboard
Grogster
Admin Group


I've now checked the LCD sockets - just pulled up and off the plastic insulator thing, leaving just the pins soldered in the board.  No shorting going on in there, everything looks fine.  Put the plastic insulator thing-y's back on.

I then used my multimeter(on diode-test, which only allows a forward current of about 1mA or so) to test all the pins.  NOTHING is shorted out between pins, none of the SPI lines are shorted to ground or supply or each-other.

Everything is PERFECT.....but it won't work in this PCB, which as far as the LCD setup is concerned, is exactly the same as the old board.  Put the MM2 and the exact same LCD module back in the old board - the LCD works just fine.

I really don't understand this, and I was actually hoping to find a shorted pin(or pins) on either the LCD socket or the IC socket.

I also tested with both the LCD and the MM2 chip OUT of the board, so I could rule out any kind of parasitic thing perhaps spoiling the results - no error found.

If it WAS just a touchy LCD module, you'd expect another LCD to work then, woulden't you, but nope.  

ANd it's not like this is my first LCD - I've lost track of how many of the SPI LCD modules I have used in various things, so......brain overload....
 
Posted: 03:18am
18 Apr 2024
Copy link to clipboard
TassyJim
Guru


CRO on the control lines to see if they are toggling.

Jim
 
Posted: 03:39am
18 Apr 2024
Copy link to clipboard
Grogster
Admin Group


Yeah, I'm trying to find my logic analyzer, so I can connect to all the pins, and see what is going on.  I just can't remember where I put the bloody thing!  

EDIT: OK, I have found my logic analyzer, so I will capture what the hell is actually going on later tonight.  I have to go to a job right now, but I think I've had enough of this bloody board for right now anyway, and a break away from it before I come back and look with the LA, is probably a good thing!  

Job got cancelled at the last minute, so I hooked up the logic analyzer, and it appears to be doing the right thing at the MM2 end of things.

I attach a Saelae Logic 2 capture file - can anyone who also uses this software, please load this file and see if they can see anything wrong?

This capture taken by removing the LCD module, and connecting the logic analyzer directly to the LCD female header - so the signals seem to be there....


Session 4.zip


Please rename the zip file to .sal
Edited 2024-04-18 14:12 by Grogster
 
Posted: 06:01am
18 Apr 2024
Copy link to clipboard
Grogster
Admin Group


Is there any way to SLOW DOWN the clock speed of the SPI port used for the LCD?

The manual says that changing the CPU speed to a slower clock, will affect the SPI clock, but only until the next reset, when the SPI port speed would appear to compensate for the slower CPU clock, and it will bounce back up to full throttle again, so I need a way to slow the SPI port down to see if that helps.

Perhaps you can POKE a register?
 
Posted: 07:36am
18 Apr 2024
Copy link to clipboard
Mixtel90
Guru


Try a decoupling cap VCC-GND at the display pins. It may do nothing but it costs nothing to try. You could also try lengthening RESET with a small cap.
 
Posted: 07:37am
18 Apr 2024
Copy link to clipboard
Turbo46
Guru


Is the capacitor the correct value, not reversed, faulty?

Can you run a "hello world" program without the LCD plugged in?

Bill
 
Posted: 07:47am
18 Apr 2024
Copy link to clipboard
Volhout
Guru

Grogster,

Is thre touch controller causing this problem ?
It could be on a shared bus, and when it is not disabled (CS=high) it may load the bus.

Volhout
 
Posted: 07:57am
18 Apr 2024
Copy link to clipboard
Volhout
Guru

Grogster,

Looking at the default backpack schematics:

LCD   MicroMite     Your board
SDO------14-------------14
SCK------25-------------25
SDI------3--------------3
D/C------2--------------26
RESET----23-------------24
CS-------6--------------GND

Is this (D/C and RESET) correctly reflected in the OPTION LCDPANEL settings ?
Can you put CS low permanent ?

There is a not in Geoff's manual. The CPUSPEED must be set to 20MHz or greater.

What voltage regulator are you using. The 1117's do not have GND in the centre pin. Are you using a 1264 ?

Volhout
Edited 2024-04-18 18:02 by Volhout
 
Posted: 08:56am
18 Apr 2024
Copy link to clipboard
phil99
Guru


1) As the display doesn't seem to have touch and SD isn't used do you need a pullup on MISO?

2) Perhaps try some shielding between the PCB and LCD. S scrap of sheet metal or foil wrapped in plastic.
 
Posted: 08:58am
18 Apr 2024
Copy link to clipboard
PhenixRising
Guru

Support just doesn't get better than this  
 
Posted: 10:32pm
18 Apr 2024
Copy link to clipboard
phil99
Guru


The latest MM2 manual V5.05.05 doesn't show any use for MISO for the display, only for touch.
Perhaps disconnect SDO (snip the pin) from MISO and add a pullup to MISO.
 
Posted: 12:02am
19 Apr 2024
Copy link to clipboard
Grogster
Admin Group


  Turbo46 said  Is the capacitor the correct value, not reversed, faulty?

Can you run a "hello world" program without the LCD plugged in?

Bill


Yes, I have full access to the MM2 chip via the 1455 and USB just fine, but just the LCD that won't co-operate.  Thanks for the idea though.

@ Volhort - This is a 2.2" LCD.  There is no touch controller on it.

MM2 manual, page 18, says that you can use any free pins for D/C and RESET, and CS is permanently connected to ground, so the LCD is always enabled.

VR is old faithful MCP1703A-33.  I've used hundreds of those, and you can suck up to 200mA out of them, but this circuit is way below that, and the LED backlight is connected via it's resistor to 5v, so it is not a load on the VR.

@ phil99 - According to the SPI capture I posted above, the LCD is spitting data back on MISO, but you're right - there is no touch and I am not using the SD socket on the back of the LCD, so I will try your idea of pulling MISO high.  Prepared to try just about anything at this point!  

@ PheonixRising - yes, these forums are wonderful, full of people willing to help.  This place is my 2nd home.  
Edited 2024-04-19 10:10 by Grogster
 
Posted: 12:41am
19 Apr 2024
Copy link to clipboard
Grogster
Admin Group


Cut MISO track, added 10k pullup to pin 14, added 100uF across LCD.
No change in behaviour.
Backlight only, no LCD activity.

Anything else I can try?
 
Posted: 01:05am
19 Apr 2024
Copy link to clipboard
Turbo46
Guru


Maybe you have a crook connector for the LCD? Can you plug a header into it and buzz out the connections?

Sometimes a DMM is not the best thing to "buzz" out a circuit - something like a real buzzer or a battery/LED/resistor in series may be better. Something that draws a bit of current.

Bill
 
Posted: 03:10am
19 Apr 2024
Copy link to clipboard
Grogster
Admin Group


I'll give it a try.

I also put a virgin 170 chip in there, and programmed the latest MMBASIC into it in a vein attempt to see if that fixed it, but nope.

I really don't understand this one.    

EDIT: I've now put an LED bar-graph and resistors(1k) on all the pins, and wrote a very simple sequencer code to test each pin - 100% perfect.

I will make a very short video and post a link here later.
Edited 2024-04-19 13:37 by Grogster
 
Posted: 03:40am
19 Apr 2024
Copy link to clipboard
phil99
Guru


Setup an ILI9341 on a breadboard following your PCB tracks.
> Micromite MKII MMBasic Ver 5.05.05
Copyright 2011-2022 Geoff Graham

> GUI TEST LCDPANEL
> OPTION LIST
OPTION BAUDRATE 115200
OPTION LCDPANEL ILI9341, RLANDSCAPE, 26, 24, 0
>

And it works. Tried to make it fail by wiggling the jumpers. The only one that was touchy was Reset. Seems quite sensitive to noise so make sure you have 3.3V on the LCD panel Reset pin.
Maybe worth soldering a 10nF cap from Reset to Gnd. on top of the panel pins to ensure it has a clean 3.3V.
 
Posted: 04:00am
19 Apr 2024
Copy link to clipboard
TassyJim
Guru


What happens if you
GUI RESET LCDPANEL
once the mite has powered up and settled down.

Jim
 
Posted: 05:20am
19 Apr 2024
Copy link to clipboard
phil99
Guru


During my testing I moved LCD_RST from pin 24 to pin 1, the Pic reset pin and
GUI RESET LCDPANEL
works exactly as it did before, so a dedicated Reset pin for the LCD is a wasted pin.
Or at least could be made optional.

CPU RESTART also works normally and resets the panel.

Edit.
Simply connecting LCD_RST to 3.3V also works. A pin is not needed at all.
Edited 2024-04-19 15:29 by phil99
 
   Page 1 of 3    
© JAQ Software 2024