Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 14:16 20 Apr 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 : ILI9488 drivers: MM2 and MM+

     Page 3 of 3    
Author Message
Turbo46

Guru

Joined: 24/12/2017
Location: Australia
Posts: 1592
Posted: 11:02am 14 Jan 2022
Copy link to clipboard 
Print this post

Thank you Peter. Two things good to know.

Bill
Keep safe. Live long and prosper.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5705
Posted: 12:35pm 14 Jan 2022
Copy link to clipboard 
Print this post

That missing reg is something to keep an eye open for!
Mick

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

Joined: 17/05/2016
Location: United States
Posts: 3010
Posted: 02:05pm 14 Jan 2022
Copy link to clipboard 
Print this post

  matherp said  Can confirm both touch and SDcard working with a 680ohm resistor in the MISO line from the LCD. LCD then also works with BLIT, PIXEL() and transparent text.


Nice!
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1773
Posted: 07:58am 01 Sep 2022
Copy link to clipboard 
Print this post

"Can confirm both touch and SDcard working with a 680ohm resistor in the MISO line from the LCD. LCD then also works with BLIT, PIXEL() and transparent text."

On my ILI9488 / PicoMite SD access has been a bit hit and miss so I have replaced the 680R with this circuit - from earlier in this thread. The PNP transistor only switches LCD_SO on when LCD_CS is low, so there is no load on the SD card output.



Now every SD card works all the time along with pixel(x,y), BLIT and SAVE IMAGE as well as touch.

PS. It still works if you swap collector and emitter. The PN200 has enough gain in the reverse direction and 3.3V is way too low to cause B-E reverse breakdown.
Measured a PN200
Forward current gain = 430
Reverse current gain = 29
With 3.3V and 33k base resistor the reverse current is up to 2.4 mA so fast push-pull drive of MISO is no problem.
If using a different transistor a lower value base resistor may be needed. Perhaps also a pullup from MCU MISO to 3V3 with a value 5 to 10 times the base resistor.

Mounted it on the back of the display, along with the rest of the SPI wiring for touch and SD card. Pico SPI wires now only go to the touch pins.






Edit 3
To improve SD card reliability without adding a transistor it may be enough just to increase the 680R.
This test will allow you to see how high it can be before reading back from your display fails. Adjust the pot while watching the Blit stripes for colour changes.
If that still isn't enough you may be able to get it higher by putting a diode across the resistor as fast rising edges seem to be important.
The chip fault holds SDO low so the anode goes to SDO, cathode to MISO.
However the improvement still didn't allow all my SD cards to work all the time.

' RGB Graded colours + BLIT stripes test For an ILI9488
CLS
For x=1 To MM.HRes
 Line x,1,x,MM.VRes/6,,RGB(x*255/MM.HRes,0,0)
 Line x,MM.VRes/3,x,MM.VRes/2,,RGB(0,x*255/MM.HRes,0)
 Line x,2*MM.VRes/3,x,MM.VRes*5/6,,RGB(0,0,x*255/MM.HRes)
Next

Text 55,15,"Tap any key to exit"
Print "Tap any key to exit"

Do
 For y=1 To MM.VRes Step MM.VRes/3
   Blit 1, y, 1, y+MM.VRes/5, MM.HRes, MM.VRes/8
   If Inkey$ <> "" Then
     Text 55,15,"               Done "
     End
   EndIf
     Text 55, y+15+MM.VRes/5,"              Blit "
 Next
Loop




Edit 4

Another way to get everything working properly is with a diode switch.
This has been tested with resistor values from 1k8 to 10k.
Had intended to add a pullup from MCU MISO to 3V3 with a value 5 to 10 times the CS resistor, but found it wasn't needed. Replacing the right hand diode such a resistor might also work.

This was found when @DrifterNL tried a BC558 and it didn't work. He reduced the base resistor until it did at 2k2. With so much base current I figured the two junctions are simply acting as independent diodes. When reverse biased they are off, when forward biased the resistance is low enough to pass the SDO_MISO signal.
Edited 2022-10-29 21:43 by phil99
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1639
Posted: 11:34pm 21 Nov 2022
Copy link to clipboard 
Print this post

Is there resistor miso again please.I have an ili9488 that dislay works but touch calibrate tests 2 points then fails.Looks same wiring as ili9341 which works.





 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1773
Posted: 12:07am 22 Nov 2022
Copy link to clipboard 
Print this post

If you look back through the various ILI9488 threads you will see that the ILI9488 chip has a fault in the silicon that prevents the SDO-(MISO) pin switching off when CS is high. Instead it stays active low, preventing touch and SD cards from using MISO. To get touch working just put a 680R from SDO-(MISO) to your MCU MISO. This may also  allow SD cards to work, but not always. If you have SD issues try this:-



I have found it passes all tests.

Read this thread:- https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=15214#192349
.
Edited 2022-11-22 10:33 by phil99
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3649
Posted: 03:36pm 22 Nov 2022
Copy link to clipboard 
Print this post

I understand the ILI9488W is OK, so is there a (preferably simple) test for whether a board has the ILI9488 or ILI9488W?

I have the Waveshare 3.5" LCD (this one)  and it looks like the ILI chip is hidden between the LCD & the eval board.

John
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1639
Posted: 04:22pm 22 Nov 2022
Copy link to clipboard 
Print this post

Thanks phil99 for reply.
My ili9488 has one miso for display which goes to picomite gp16 and display works fine... have not tested read pixel colour though.
so I have sd card miso, touch T_DO. Do I join these as ili9341 OR connect each through diode and 10rK to gp16/miso?
There is a longer thread on this... much longer
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1639
Posted: 04:27pm 22 Nov 2022
Copy link to clipboard 
Print this post

  JohnS said  I understand the ILI9488W is OK, so is there a (preferably simple) test for whether a board has the ILI9488 or ILI9488W?

I have the Waveshare 3.5" LCD (this one)  and it looks like the ILI chip is hidden between the LCD & the eval board.

John

I am using ili9488 setup not W.
same gp pins and setup as ili9341.
display works. Other problems mentioned I am checking. Lot of bother.
Cheers
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8567
Posted: 05:30pm 22 Nov 2022
Copy link to clipboard 
Print this post

  Quote  so is there a (preferably simple) test for whether a board has the ILI9488 or ILI9488W?


The ILI9488W is specifically the Waveshare product. It uses the same controller (ILI9488) but it is configured as 16-bit parallel and then uses external shift registers (74HC40940) to create a serial interface to the Pico. It does not have a MISO line from the display so has no issues with respect to SDcard or touch. However, as it has no MISO it is impossible to read the framebuffer so BLIT and transparent text don't and can't work.
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3649
Posted: 05:50pm 22 Nov 2022
Copy link to clipboard 
Print this post

  matherp said  The ILI9488W is specifically the Waveshare product. It uses the same controller (ILI9488) but it is configured as 16-bit parallel and then uses external shift registers (74HC40940) to create a serial interface to the Pico. It does not have a MISO line from the display so has no issues with respect to SDcard or touch. However, as it has no MISO it is impossible to read the framebuffer so BLIT and transparent text don't and can't work.

Oh! Thanks.

That also explains why looking for a W datasheet was fruitless.

John
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1773
Posted: 09:20pm 22 Nov 2022
Copy link to clipboard 
Print this post

@stanleyella
Just connect it as per the diagram above. T_DO AND SD_DO go directly to the PicoMite MISO. Only the LCD_SDO has a problem.
You could first try a 680R between SDO and the PicoMite MISO, see if everything works properly (blit, touch & SD). If it does that is all you need to do. Touch should be ok but SD cards might not, in which case use the circuit above.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1773
Posted: 09:24pm 22 Nov 2022
Copy link to clipboard 
Print this post


' Screen Colours Counter Pixel Test
Dim a$(2)=(" Blues"," Greens"," Reds")
Dim integer b, c, n

For b = 0 To 16 Step 8
 n = 0
 For c = 0 To 255
  Pixel 9, 9, c << b
  If  Pixel(9,9) = c << b Then Inc n
 Next
 Print
 Print n; a$(b/8); " ="; Log(n)/Log(2); " bits"
Next
Print

Edited 2022-11-24 10:53 by phil99
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1639
Posted: 05:39pm 24 Nov 2022
Copy link to clipboard 
Print this post

  phil99 said  

' Screen Colours Counter Pixel Test
Dim a$(2)=(" Blues"," Greens"," Reds")
Dim integer b, c, n

For b = 0 To 16 Step 8
 n = 0
 For c = 0 To 255
  Pixel 9, 9, c << b
  If  Pixel(9,9) = c << b Then Inc n
 Next
 Print
 Print n; a$(b/8); " ="; Log(n)/Log(2); " bits"
Next
Print

what was that for?
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1639
Posted: 05:42pm 24 Nov 2022
Copy link to clipboard 
Print this post

  phil99 said  @stanleyella
Just connect it as per the diagram above. T_DO AND SD_DO go directly to the PicoMite MISO. Only the LCD_SDO has a problem.
You could first try a 680R between SDO and the PicoMite MISO, see if everything works properly (blit, touch & SD). If it does that is all you need to do. Touch should be ok but SD cards might not, in which case use the circuit above.

just lcd and touch connected but gui touch calibrates fails
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 1639
Posted: 06:18pm 24 Nov 2022
Copy link to clipboard 
Print this post

@phil99 good day. The ili9488 does graphics ok. like ili9341.
the rest is hassle, I'll put it away cos it is not as easy as ili9341 which just works.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1773
Posted: 03:19am 25 Nov 2022
Copy link to clipboard 
Print this post


' LCD Panel Tester
Print "Screen Colours Counter Pixel Test"
Dim a$(2)=(" Blues"," Greens"," Reds")
Dim integer b, c, n
CLS 127<<8
Text 30, MM.VRes *.8, "   Pixel Test    ",,, 2, RGB(white), RGB(0,0,127)
For b = 0 To 16 Step 8
 n = 0
 For c = 0 To 255
   Pixel c+30, b+25, c << b
   If  Pixel(c+30,b+25) = c << b Then Inc n
 Next
 Print
 Print n; a$(b/8); " ="; Log(n)/Log(2); " bits"
 Text MM.HRes/2,MM.VRes/2-b*4,Str$(n)+a$(b/8)+" = "+Str$(Log(n)/Log(2))+" bits",C,,2,255<<b
Next
Print
Pause 3000

Print "Blit test"
For v = 0.6 To 0.3 Step -.1
 Pause 500
 Blit 10, MM.VRes*.2, 10, MM.VRes*v, MM.HRes-20, MM.VRes*.3
 Box 10, MM.VRes*v, MM.HRes-20, MM.VRes*.3
Next
Text 30, MM.VRes *.8, "    Blit Test    ",,, 2, RGB(white), RGB(0,0,127)
Pause 3000

Print "SD Card test"
Text 30, MM.VRes *.8, "           SD Card Test          ",,, 2, RGB(white), RGB(0,0,127)
Save Image "SD Card Test.BMP", MM.HRes*.2, MM.VRes*.2, MM.HRes*.3, MM.VRes*.7
Pause 2000
For v=.1 To .4 Step .1
 Load Image "SD Card Test.BMP", MM.HRes*v, mm.2res*.2
 Pause 500
 Box  MM.HRes*v, mm.2res*.2, MM.HRes*.3, MM.VRes*.7
Next
Pause 3000

Print "Touch Test"
n=0
Box .8*MM.HRes, .8*MM.VRes, .2*MM.HRes, .2*MM.VRes, 5, RGB(white), RGB(red)
Text .9*MM.HRes, .9*MM.VRes, "EXIT", CM,, 2, RGB(white)
Text 30, MM.VRes *.8, "Touch Test - draw  now",,, 2, RGB(white), RGB(0,0,127)
Do
 Pixel Touch(x),Touch(y),RGB(white)
 If Touch(x)>.8*MM.HRes And Touch(y)>.8*MM.VRes Then n=1
Loop Until n

Edited 2022-11-25 21:04 by phil99
 
     Page 3 of 3    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024