Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:40 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

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

     Page 1 of 4    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 02:46am 18 Apr 2024
Copy link to clipboard 
Print this post

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!
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 926
Posted: 02:57am 18 Apr 2024
Copy link to clipboard 
Print this post

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
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 03:17am 18 Apr 2024
Copy link to clipboard 
Print this post

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....
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 03:18am 18 Apr 2024
Copy link to clipboard 
Print this post

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

Jim
VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 03:39am 18 Apr 2024
Copy link to clipboard 
Print this post

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
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 06:01am 18 Apr 2024
Copy link to clipboard 
Print this post

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?
Smoke makes things work. When the smoke gets out, it stops!
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6783
Posted: 07:36am 18 Apr 2024
Copy link to clipboard 
Print this post

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.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 07:37am 18 Apr 2024
Copy link to clipboard 
Print this post

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

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

Bill
Keep safe. Live long and prosper.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 07:47am 18 Apr 2024
Copy link to clipboard 
Print this post

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
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4223
Posted: 07:57am 18 Apr 2024
Copy link to clipboard 
Print this post

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
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 08:56am 18 Apr 2024
Copy link to clipboard 
Print this post

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.
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 857
Posted: 08:58am 18 Apr 2024
Copy link to clipboard 
Print this post

Support just doesn't get better than this  
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 10:32pm 18 Apr 2024
Copy link to clipboard 
Print this post

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.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 12:02am 19 Apr 2024
Copy link to clipboard 
Print this post

  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
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 12:41am 19 Apr 2024
Copy link to clipboard 
Print this post

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?
Smoke makes things work. When the smoke gets out, it stops!
 
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1611
Posted: 01:05am 19 Apr 2024
Copy link to clipboard 
Print this post

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
Keep safe. Live long and prosper.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 03:10am 19 Apr 2024
Copy link to clipboard 
Print this post

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
Smoke makes things work. When the smoke gets out, it stops!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 03:40am 19 Apr 2024
Copy link to clipboard 
Print this post

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.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 04:00am 19 Apr 2024
Copy link to clipboard 
Print this post

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

Jim
VK7JH
MMedit   MMBasic Help
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 05:20am 19 Apr 2024
Copy link to clipboard 
Print this post

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 4    
Print this page
© JAQ Software 2024