ILI9488 drivers: MM2 and MM+


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2281
Posted: 07:58am 01 Sep 2022      

"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