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 : New 4 inch LCD
Page 11 of 12 | |||||
Author | Message | ||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
there were problems before I found the resistor diode fix on the forum. you seem to have had more problems than I did |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Diode junction capacitance is what matters most. Tested a 1N4148 / 10kΩ that gives 7 7 7 on the colour counter test with various capacitors across the diode. 22pF was the lowest that gave 64 64 64. 270pF was the highest I tested, also 64 64 64. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
It may have been the capacitance of strip board parallel tracks. |
||||
Pluto Guru Joined: 09/06/2017 Location: FinlandPosts: 357 |
Stan, the diode you are using (1N5818) has a very high capacitance 110pF. Excellent selection! Stripboard probably negligible compared to that. pluto |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
Can I ask here or new thread? I tried an existing prog for ili9488... it's 480x320 so must be and blit write now gives syntax error using picomite usb. There was mention of sprite instead of blit working in betas but all too dynamic to keep up to date. The ili9488 did work with this on a final release. it's picomite rc3 usb Edited 2024-04-14 02:54 by stanleyella |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9112 |
blit write no longer takes a width and height parameter. This change was made ages ago. The command spec in the 5.08 manual is correct but the description needs updating by removing the italicized sentences. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
Thank you Peter sir, it compiled without height,width but just white squares not the sprites restore cls udg1 'draws sprite1 on screen at 10,10 BLIT READ 1,10,10,16,16 'reads sprite1 from screen to blit buffer1 udg1 'draws sprite2 on screen at 10,10 blit read 2,10,10,16,16 'reads sprite2 from screen to blit buffer2 cls blit read 3,10,10,16,16 'reads 16x16 background to blit buffer3 ' for temp=0 to 15 'set up start sprite positions and directions do dx(temp)=(int(rnd*4)+1)-(int(rnd*8)+1) loop until dx(temp)<>0 do dy(temp)=(int(rnd*4)+1)-(int(rnd*8)+1) loop until dy(temp)<>0 spx(temp)=104+((rnd*64)+1) spy(temp)=144+((rnd*64)+1) next temp ' do 'demo moving sprite for temp=0 to 15 ' if sprite_status(temp)=1 then 'is sprite active if spx(temp)> 460 then 'check right edge dx(temp)= 0-dx(temp) elseif spx(temp)<8 then 'check left edge dx(temp)= 0-dx(temp) end if if spy(temp)>300 then 'check bottom edge dy(temp)= 0-dy(temp) elseif spy(temp)<8 then 'check top edge dy(temp)= 0-dy(temp) end if ' oldspx(temp)=spx(temp):oldspy(temp)=spy(temp) 'get last position for erase spx(temp)=spx(temp)+dx(temp):spy(temp)=spy(temp)+dy(temp) 'get new position for draw ' if frame=0 then'which sprite to draw box oldspx(temp),oldspy(temp),16,16,0,bk,1 'erase sprite at last position 'BLIT WRITE 3,oldspx(temp),oldspy(temp), 16, 16 'erase sprite at last position BLIT WRITE 1,spx(temp),spy(temp),&B100'draw sprite1 at new position else box oldspx(temp),oldspy(temp),16,16,0,bk,1 'erase sprite at last position 'BLIT WRITE 3,oldspx(temp),oldspy(temp), 16, 16 'erase sprite at last position BLIT WRITE 2,spx(temp),spy(temp),&B100 'draw sprite2 at new position end if next temp ' frame_count=frame_count+1 'when to change sprite if frame_count=10 then frame=not frame frame_count=0 end if loop ' sub udg1 'draws 16x16 data for blit to copy for spht=0 to 15 for spw=0 to 15 read sp1 pixel spw+10,spht+10,sp1 next spw next spht end sub ' |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9112 |
That means the blit read isn't working. Can you run the 64 64 64 test program above? |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
No they don't work.. arrays my point is IT DID WORK on a final release but not on rc3 usb pixel 100,100,rgb(white) print pixel 100,100 gives big number |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9112 |
You need to get the 64 64 64 test working. It does work on RC3 if your H/W is correct. Are you using the IPS ILI9488? Here is a simple way to test GUI TEST LCDPANEL let it run for a few seconds then Ctrl-C. You should now have a colourful screen BLIT READ 1,0,0,100,100 BLIT WRITE 1,100,100 The data from 0,0 to 100,100 should now be replicated at 100,100 to 200,200 Until this works you have a H/W problem Edited 2024-04-14 04:21 by matherp |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
gui test lcdpanel > BLIT READ 1,0,0,100,100 Error : Buffer in use > BLIT WRITE 1,100,100 > |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
> blit close 1 > blit read 1,0,0,100,100 > blit write 1,100,100 > a white box :( If I found an older pico mmb to test and it worked again then why it don't work now? i Edited 2024-04-14 06:49 by stanleyella |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9112 |
White box means the code is reading zeroes. Because the IPS version has the colours inverted this will display as white. I guarantee this works fine on RC3 with a correctly wired ILI9488 IPS display |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
As Peter said it is a hardware issue with the 4" IPS panel. If the SD pins are connected to System SPI you must remove R8 (near the SD socket). Also make sure the panel voltage is 3.3V. Either by powering it from 3.3V or adding the 3.3V regulator and removing R0. This is fully described in the previous few pages. Footnote added 2024-04-17 09:17 by phil99 Now tested. All the SD cards I have are happy with this so I suggest leaving R8 in place and using 1.5kΩ or 1.8kΩ for the LCD_CS to MISO resistor and using any diode with a junction capacitance of more than 22pF. Eg 1N400x or 1N581x series. |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Revived the original 680Ω idea, but changed to 10kΩ in parallel with 100pF from LCD_DO to MISO. > for a=0to 2:b=0:for c=0to 255:d=c<<a*8:pixel 9,9,d:if d=pixel(9,9)then:inc b:endif:next:?b:next 64 64 64 > Stan's Blit test works too. (no diode or resistor to LCD_CS) Edited 2024-04-14 07:58 by phil99 |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
back to PicoMite MMBasic Version 5.08.00 OPTION SYSTEM SPI GP18,GP19,GP16 OPTION LCDPANEL ILI9488, LANDSCAPE,GP15,GP14,GP13 OPTION TOUCH GP12,GP11 GUI CALIBRATE 0, 3937, 3908, -1286, -848 OPTION SDCARD GP22 and my sprites are working again but using original ili9488 as ils needs invert and there's no invert option.so the rc3 is needed to use the ils 9488? this is strange that same prog works in picomite v 5.08 but not picomite rc3 usb, sprite write not working. as an observation, the sprite prog would be too fast to see on ili9341 but on ili9488 it's slow like using frame copy. ili9488 is big but crap... imho :) peace stan |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Mightn't it depend on what one wants to do with it? Like saying a butcher knife is crap because it won't do what a paring knife will do. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 2135 |
Once again SD cards are the fly in the ointment. It seems some read SDO (MISO) when first inserted and if it is low they go to sleep. As the ILI9488 LCD_DO is low when idle even 10kΩ is too low. Raising the value of the resistor high enough for all SD cards to work stops Blit etc working properly So it's back to a resistor from LCD_CS to MISO and a high capacitance diode from LCD_DO to MISO. . Edited 2024-04-14 14:13 by phil99 |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
I was ranting, sorry. Just finding out ils ili9488 blit not working and changing displays and firmware I was frustrated. it's like said ils version has the problem and not sure of removing resistor and what is 3.3V supply about? going to flash rc3 and test non ips 9488. |
||||
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2127 |
using rc3 usb again and non ips 9488 working as was. I got confused with ips 9488 which needs more soldering than non ips to work. nice display.. not |
||||
Page 11 of 12 |
Print this page |