ok to post here I hope, not frequently asked this.
The GCB GLCD includes are excellent. Capability for maybe some retro games?.
Anobium has posted a read pixel routine for ssd1306. I posted a game that would not be possible without that pixel read function.
The ili9341 can read a pixel but I can't get it to work with the extra miso line.
I'm using arduino code for ideas not the data sheet route. (rocket science...look :) )
If any supported glcds have pixel read will anyone sort a method for everyone to use. Makes game writing much easier.
This has done my head on ili9341, unsuccessfully converting arduino c++.
The ssd1306 at first seems more complex with the buffer but the ili9341 is electricly harder to understand.
If you shoot a missile in space invaders you'd check if there was a lit pixel in front before checking it's co-ord with every active alien on screen...maybe.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You port support for the GLCD_OLED_FONT with the ili9341 in the RC6 release, and, I will look at this enhancement when we have completed the release. Getting the release out is the priority for a few of us at the moment.
So, simply take the the library ..GreatCowBasic\Include\glcd.h and examine GLCDDrawChar. Thejn look the device specific library - as the ILI3941 has a device specifc GLCDDrawChar you will need to port the one from glcd.h to glcd_ILI9341.h. Should not be too hard as has been done in the past.
Give this a go. Start with the support for the existing GCB Font - write a test program to test all aspects of the GCB command set for GCB Fonts. Only whe you have all this working, then, try the same tests for OLED Fonts.
If you are unable to get the port of existing GCB Fonts working after 60 mins - give up.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Er... GLCD_OLED_FONT with the ili9341 ?? Ok I'll look at it out of interest and why.
I'm happy with text use. It's pixels and screen use that I'm playing with that's why I got these displays.. for graphics.
Experimenting with this, converted from c++ but I'm no good at c++ and not sure hi-lo byte order.
I added the miso line portb.4 but not changed logic level. It's 3.3V logic in but not sure if it's 3.3V logic out on miso.
happy days.
ps I didn't want to distract anyone from new release priorities. soz
~~~
dim px,py as Word
dim pred,pgreen,pblue as byte
;
GLCDCLS
pset (0,0,ILI9341_WHITE)
read_pixel(0,0)
GLCDPrint(10,10,str(pred))
GLCDPrint(10,30,str(pgreen))
GLCDPrint(10,50,str(pblue))
do
loop
sub read_pixel (px,py)
set GLCD_CS off
SendCommand_ILI9341(ILI9341_CASET); // Column addr
;SendWord_ILI9341(px)
SendData_ILI9341(fnlsr(px,8))
SendData_ILI9341(px and 255)
;
SendCommand_ILI9341(ILI9341_PASET); // Row addr
;SendWord_ILI9341(py)
SendData_ILI9341(fnlsr(py,8))
SendData_ILI9341(py and 255)
;
SendCommand_ILI9341(ILI9341_RAMRD); // read GRAM
SPITransfer 0, pred ;dummy read
SPITransfer 0, pred
SPITransfer 0, pgreen
SPITransfer 0, pblue
set GLCD_CS on
end sub
~~~.
Last edit: stan cartwright 2017-09-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok to post here I hope, not frequently asked this.
The GCB GLCD includes are excellent. Capability for maybe some retro games?.
Anobium has posted a read pixel routine for ssd1306. I posted a game that would not be possible without that pixel read function.
The ili9341 can read a pixel but I can't get it to work with the extra miso line.
I'm using arduino code for ideas not the data sheet route. (rocket science...look :) )
If any supported glcds have pixel read will anyone sort a method for everyone to use. Makes game writing much easier.
This has done my head on ili9341, unsuccessfully converting arduino c++.
The ssd1306 at first seems more complex with the buffer but the ili9341 is electricly harder to understand.
If you shoot a missile in space invaders you'd check if there was a lit pixel in front before checking it's co-ord with every active alien on screen...maybe.
Here is a deal for you.
You port support for the GLCD_OLED_FONT with the ili9341 in the RC6 release, and, I will look at this enhancement when we have completed the release. Getting the release out is the priority for a few of us at the moment.
So, simply take the the library ..GreatCowBasic\Include\glcd.h and examine GLCDDrawChar. Thejn look the device specific library - as the ILI3941 has a device specifc GLCDDrawChar you will need to port the one from glcd.h to glcd_ILI9341.h. Should not be too hard as has been done in the past.
Give this a go. Start with the support for the existing GCB Font - write a test program to test all aspects of the GCB command set for GCB Fonts. Only whe you have all this working, then, try the same tests for OLED Fonts.
If you are unable to get the port of existing GCB Fonts working after 60 mins - give up.
Er... GLCD_OLED_FONT with the ili9341 ?? Ok I'll look at it out of interest and why.
I'm happy with text use. It's pixels and screen use that I'm playing with that's why I got these displays.. for graphics.
Experimenting with this, converted from c++ but I'm no good at c++ and not sure hi-lo byte order.
I added the miso line portb.4 but not changed logic level. It's 3.3V logic in but not sure if it's 3.3V logic out on miso.
happy days.
ps I didn't want to distract anyone from new release priorities. soz
~~~
dim px,py as Word
dim pred,pgreen,pblue as byte
;
GLCDCLS
pset (0,0,ILI9341_WHITE)
read_pixel(0,0)
GLCDPrint(10,10,str(pred))
GLCDPrint(10,30,str(pgreen))
GLCDPrint(10,50,str(pblue))
do
loop
sub read_pixel (px,py)
set GLCD_CS off
SendCommand_ILI9341(ILI9341_CASET); // Column addr
;SendWord_ILI9341(px)
SendData_ILI9341(fnlsr(px,8))
SendData_ILI9341(px and 255)
;
SendCommand_ILI9341(ILI9341_PASET); // Row addr
;SendWord_ILI9341(py)
SendData_ILI9341(fnlsr(py,8))
SendData_ILI9341(py and 255)
;
SendCommand_ILI9341(ILI9341_RAMRD); // read GRAM
SPITransfer 0, pred ;dummy read
SPITransfer 0, pred
SPITransfer 0, pgreen
SPITransfer 0, pblue
set GLCD_CS on
end sub
~~~.
Last edit: stan cartwright 2017-09-25
Er... GLCD_OLED_FONT with the ili9341 ?? Ok I'll look at it out of interest and why.
To help Stan to help.