Hi,
I wanted to try out some gcb codes to drive some types of displays.
I started with the ssd1306 and soon discovered that it doesn't contain a lot of symbols I use frequently.
Some of them are ...
I wanted to try out some gcb codes to drive some types of displays.
I started with the ssd1306 and soon discovered that it doesn't contain a lot of symbols I use frequently.
Some of them are ...
Does the Extended Character set have these characters ?
Is there any way to add or change the existing set of symbols by a user in gcb and even eliminate unused to save memory?
Yes, there is. There are demos to show how to redefine a character within a character set.
Regarding memory. This is specific to the GCLD. The SSD1306 can be really optimised down to a very small character buffer. Have you use GCLD Transactions?
Not all GLCDs use RAM so optmisation is specific to the GLCD.
You could replace the whole of the GLCD routines that draw fonts. It is really down to how much effort you want to put in.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Anobium,
So fonts are defined in gcb and not on the on-board chip of the ssd1306.
Does the Extended Character set have these characters ?
Most of the Math symbols are in the Extended Character set !(https://www.webopedia.com/wp-content/uploads/2020/10/extended-ascii_5f85365bb4f84-2.gif)
There are demos to show how to redefine a character within a character set.
Like the "Demo_custom_character.gcb"?
he SSD1306 can be really optimised down to a very small character buffer.
Does gcb optimize the code automatic or should I do it manually?
Have you use GCLD Transactions?
Not used but tried with several codes in the example directory.
It works nice .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Fonts are generally specified within the GCB fonts tables. There are some GLCD ICs that have fontsets and the library will use them. SSD1306 is GCB fonts tables.
Yes, re the Transactions. I wrote them. I had the idea when I was on a campsite in France! I took the concept from Microsoft Groove Replication Architecture (I was responsible for the development of Microsoft Groove Solutions for a few years). And, the Transactions do slow down the screen refresh ( overall time ) but you can optimize this will Transaction Page Control. It just takes a bit of mental exercise to implement a GLCD solution.
Re the fonts. You can redefine them all by replacing the Table but I would recommend replacing the Extented Font Table leaving the standard fonts in place.
I have thought the font generation could be rewritten to leverage the C style font definition - it can be down. It now just needs someone to be motivated to do it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Those GLCD ICs are I2C?
And is there a specific one that has GCB support?
France does have that affect on people to relaxe and come up with great ideas.
It certainly struck me with how much knowledge and expertise the GCB videos, manuals and GCB software have been put together. My respect for that. The forum obviously is the place for refinement. I must confess that I often need time to research and understand what is being answered. Normally that means I'm getting older I guess :)
And, the Transactions do slow down the screen refresh ( overall time )
I display all the static text first and only some dynamic text characters are frequently updated. This speeds up the display response.
You can redefine them all by replacing the Table but I would recommend replacing the Extented Font Table leaving the standard fonts in place.
I can't seem to display the ° degree sign, tried...
There seems to be nothing in 0-33 and 130-255, empty places!
The Extented Font Table 128-255 have lots of not commonly used chars.
Couldn't we compile our own GCB "Standard Font Table" with chars all users really need in projects?
I have thought the font generation could be rewritten to leverage the C style font definition - it can be down.
Those GLCD ICs are I2C?
And is there a specific one that has GCB support?
Which GLCD? As I do not know the type of GLCD model - I recommend you look at the help. The Help as a list of all the GLCD and the communication protocol.
If a GLCD does not support I2C is can be added with ease.
France does have that affect on people to relaxe and come up with great ideas.
Agree. I take my vacation near Uzes, France ever year. 5 weeks in France regenerates the body of many months. This year I have been there of an extended period. :-)
It certainly struck me with how much knowledge and expertise the GCB videos, manuals and GCB software have been put together. My respect for that. The forum obviously is the place for refinement. I must confess that I often need time to research and understand what is being answered. Normally that means I'm getting older I guess
This is great insight. Thanks to all that help to keep GCB going.
The age thing is getting to me also!
And, the Transactions do slow down the screen refresh ( overall time )
I display all the static text first and only some dynamic text characters are frequently updated. This speeds up the display response.
Transactions answer the question you raised with respect to using less memory. Transaction use a 128 byte buffer to manage and update a 1024 byte GLCD. Think of Transactions as a 'page' or piece of the GLCD incrementally moving across the GLCD. It is the additional 'page' management that make the GLCD updates a little slower.
** can't seem to display the ° degree sign, tried...
GLCDPrint (0, 0, chr(248))
GLCDPrint (0, 0, "°")
This code I used to display all GCB chars:
For Teller=0 To 255
GLCDPrint (0, 16, Teller)
GLCDPrint (35, 16, chr(Teller))
GLCDdrawCHAR (50, 16, Teller)
Pause 100
Next
There seems to be nothing in 0-33 and 130-255, empty places!
The Extented Font Table 128-255 have lots of not commonly used chars.
**
Your testing shows the character set. The GLCD font set IS characters 32 to 129 as this is the standard ASCII set.
And, there is NO character definition for characters beyond that range. Which means if you tried to extend the GLCD font set then things would fall over in a heap. And, therefore character replacement within this range is an option. Hance, the demo on how to change a character in the GLCD character set.
Couldn't we compile our own GCB "Standard Font Table" with chars all users really need in projects?
Yes. You could replace the TABLEs. This is really the same as replacing one character but replacing the whole table.
I have thought the font generation could be rewritten to leverage the C style font definition - it can be down.
What does that mean in plain english?
This is a development idea of mine. The current GCB methd uses a set of tables and these tables are specific to Great Cow BASIC.
C style definition would leverage all the Open Source Character sets on the internet.
But, this is rewrite of the GLCD code for font generation. This is doable but this would take someone months to compete. (It took me years to do what is there today but I was building on what was there and to add C style defintions for characters is a totall rewrite).
I'm now strugling with this "Create your own OLED characters on your GLCD".
What is the issue?
You can redefine them all by replacing the Table but I would recommend replacing the Extented Font Table leaving the standard fonts in place.
Yes, there is an Extended Font Table. I was hoping someone else would help answer the question to change this Extended Font Table. I will have to answer in a subsequent post.
Last edit: Anobium 2022-12-14
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This will show you all the fonts in the OLED font set from 32 to 255. This is a larger character set but it shows some of the chars you are looking for!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This will show that there are characters define from 32 to 255 but characters 128 to 192 are not defined.
So, you can take the tables that are used with GLCD_EXTENDEDFONTSET1 and add 50 characters you need into the table space.
Characters are define in matrix of 5 columns by 8 rows. Each column of the character is defined in one of the five tables. They are called GLCDCharCol3Extended1 to GLCDCharCol7Extended1 (why Col3... ask Hugh).
So, ir should now be possible to change these unused characters to meet you need.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh, vous vouliez dire les circuits intégrés GLCD intégrés et non les puces I2C séparées externes :)
Transactions as a 'page' or piece of the GLCD incrementally moving across the GLCD.
I've seen examples and video's about it that I will definitely try.
I found several other GCB video's for all kind of display use that I will have to try too.
If I understand correctly there are 3 font-tables:
Standard, #define GLCD_OLED_FONT
Extended, #DEFINE GLCD_EXTENDEDFONTSET1
GLCD-IC, #DEFINE OLEDFont2 OLEDExtendedFont2
Where can I find a table.jpg with these GCB Standard Font Table and the GCB Extended Font table?
I'm now playing around with the SSD1306 (32, 64), is there a SSD1306 font-table.jpg?
All these overview info which chars are now available in GCB will determine if it is usefull to compile our own GCB "Standard Font Table" with chars all users really need in projects.
For a helping hand(s):
Maybe you could do a Font-table video serie how you did it to compile the current GCB font-set as basis to the next video what should be done, what you intended, for the C style definition.
An automated process, if possible, would reduce the time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh, vous vouliez dire les circuits intégrés GLCD intégrés et non les puces I2C séparées externes :)
oui.
GCB Font sets - got this info by looking at the libraries.
Standard GCB - this is font set created by Hugh. It is a fixed width font. Data is held in tables GLCDCharCol3..7
OLED Fonts - small font set - this is font set created by Evan (me). It is variable width font. Data is in tables OLEDFont1Index and Table OLEDFont1Data. Controlled by GLCDfntDefaultSize = 1
OLED Fonts - large font set - this is font set created by Evan (me). It is fixed width font. Data is in tables OLEDFont2. Controlled by GLCDfntDefaultSize = 2
Extended Fonts - this an extension of Stardard GCB. Uses GLCDCharCol3..7Extended1
Large Characters - this is specific large character set held in table BigFontxx_xx
This information is what I have to hand. Ask more questions and I will complete by digging deeper.
Help Hand. I have already created for you a Excel spreadsheet. It shows how the data relates to the characters. I will video.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh, 1 to 5...
I have collected only code for 3 of them now.
Maybe for a quick learning curve for other users we could summarise these 5 methods and integrate it into the GCB demos, eventually a intro video.
Here is what I have, please correct me if I'm wrong:
There are NO control constants in this demo - therefore no OLED, no OLED character extension or use of extended fonts.
This is mutually exclusive to the GLCD_OLED fonts.
Range of characters is 15 t0 129
GLCDfntDefaultSize = 1 to n with multiple the character size to make a larger character
Characters are a basic mono sized font
This is the original font set of Great Cow BASIC
GLCDFontWidth = 5 is the default value - this DOES control the intercharacter spacing.
You can use the method GLCDPrintLargeFont as in
GLCDPrintLargeFont 0,0, "HELLO"
Note the range is different and the font select (OLED fonts do not scale).
This demo still may not be complete. Please revise.
Evan
There is the GLCD_OLED_FONT constants in this demo - therefore no BASELINE fonts, no OLED character extension or use of extended fonts.
This is mutually exclusive to the GLCD_STANDARD fonts.
Range of characters is 32 to 127
GLCDfntDefaultSize = 1 or 2 only with different fonts being used to show the characters
GLCDfntDefaultSize = 1: Are variable width characters by 8 pixels high characters. ! is one pixel width , and " is two pixels etc.
GLCDfntDefaultSize = 2: Are 10 width by 16 pixels high characters. Therefore, a fixed font.
GLCDFontWidth = 5 is the default value.
You can use the method GLCDPrintLargeFont as in with the values of 1 or 2
GLCDPrintLargeFont 0,0, "HELLO"
Thecontrollingconstantis`#DEFINE GLCD_DISABLE_OLED_FONT2`.ThisisaGLCD_OLED_FONTdemowithnoFONTSET2-thereforenoBASELINEfonts,noOLEDcharacterextensionoruseofextendedfonts.But,mostimportantlynotOLED_FONT2-byusingtheconstantGLCD_DISABLE_OLED_FONT2.Thissavememory.OLEDfontsaremutuallyexclusivetotheGLCD_STANDARDfonts.WithoutOLED_FONT2support-saves1008words!ProgramMemory:2721/16384words(16.61%)WithOLED_FONT2supportProgramMemory:3729/16384words(22.76%)Rangeofcharactersis32to127GLCDfntDefaultSize=1or2onlywithdifferentfontsbeingusedtoshowthecharactersGLCDfntDefaultSize=1:Arevariablewidthcharactersby8pixelshighcharacters.!isonepixelwidth,and" is two pixels etc.GLCDfntDefaultSize=2:Are10widthby16pixelshighcharacters.Therefore,afixedfont.GLCDFontWidth=5isthedefaultvalue.YoucanusethemethodGLCDPrintLargeFontasinwiththevaluesof1or2GLCDPrintLargeFont0,0,"HELLO"Also,GLCDPrintWithSizeoperatedasexpectedGLCDPrintWithSize0,0,"H",2GLCDPrintWithSize20,0,"ello",1Constantsavailableare:GLCD_TYPEGLCD_TYPE_SSD1306GLCD_OLED_FONTGLCD_DISABLE_OLED_FONT2GLCD_PROTECTOVERRUNLANDSCAPE1PORTRAIT_REV2LANDSCAPE_REV3PORTRAIT4sameasprevious.....
I think will find bugs as we create these demos! Be prepared
Next, and BASELINE fonts with GLCD_EXTENDEDFONTSET1 version - this extends the baseline fonts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried the "#define PSet_SSD1306 xorPSet_SSD1306" in the demo "GLCD simple oscilloscope".
But how to switch back to "normal" so "NOT xor" display?
For the idea of these set of examples I have run several codes to observe the displayed characters and found it easy to program with ASCII tables to quickly find a character number as I mentioned earlier..
Where can I find a table.jpg with these GCB Standard Font Table and the GCB Extended Font table?
I'm now playing around with the SSD1306 (32, 64), is there a SSD1306 font-table.jpg?
Therefore I've made these two table jpg's. I've yet to do the others.
OLED Standard ASCII characters.jpg
OLED Extended ASCII characters.jpg
Is there any way to implement these tables into GCB software and in these examples?
Where in the forum can I ask questions related to GCB software use and remarks as first time user?
I tried the "#define PSet_SSD1306 xorPSet_SSD1306" in the demo "GLCD simple oscilloscope".
But how to switch back to "normal" so "NOT xor" display?
Stan can answer.
For the idea of these set of examples I have run several codes to observe the displayed characters and found it easy to program with ASCII tables to quickly find a character number as I mentioned earlier..
Good news!
Where can I find a table.jpg with these GCB Standard Font Table and the GCB Extended Font table?
I dont believe this is JPG of the fonts. If you create we can add to the Help.
I'm now playing around with the SSD1306 (32, 64), is there a SSD1306 font-table.jpg?
So, same fonts as any GLCD. So, there is no SSD1306 font-table.jpg. Same as above - create and we can add the Help.
Therefore I've made these two table jpg's. I've yet to do the others.
OLED Standard ASCII characters.jpg
OLED Extended ASCII characters.jpg
Wonderful. Great work!
Is there any way to implement these tables into GCB software and in these examples?
When you are ready. We can add to the Help.
Where in the forum can I ask questions related to GCB software use and remarks as first time user?
The glcd lib is interesting when I can follow it.
The character print seems to be plotting the dots that make them.. not sure though.
xor seems to be set at program start but not switchable in program afaik.
xor seems to be the plot command so affects all ssd1306 graphics.. dunno.
The idea is that the graphics erase the background and redrawing erases the graphics and restores the background.
Anobium implemented the read pixel function, which can be a "blit" function for small screen areas to store and restore... maybe. ram?
I tried to understand how the buffer worked so it could be read and a composite video signal could be generated.
I will try defining graphics but prefer using ili9341 displays.
Cheers for the work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
xor seems to be set at program start but not switchable in program
Is there any workaround to add text to or before a graph oscilloscope?
CODE TESTING RESULTS
Code: BASELINE USAGE
I made some changes in github
Hello starts in the middle?
Should start left aligned according to...
GLCDPrintWithSize 0,0, "H",2
Code: OLED FONTS USAGE - BASIC USE
Hello starts in the middle?
With "GLCDfntDefaultSize = 2" both small and large tittles "Standard set" are merged unreadable.
ASCII counter (Teller) is cut off on the left.
Code: OLED FONTS USAGE - EXTENDED CHARACTERS
Hello starts in the middle as above mentioned?
With "GLCDfntDefaultSize = 2" both small and large tittles "Standard set" are merged
Code: OLED FONTS USAGE - NO OLEDFONT2
Saving near 2kb of program memory is really nice with smaller chips or big program.
Hello starts in the middle as above mentioned?
Yes correct: the "H" from Hello and all text on the second line is a filled rectangle as you mentioned in the code: "Note this character fails as OLEDFONT2 is not there and a ZERO value is returned".
Code: BASELINE FONTS USAGE - EXTENDED CHARACTERS
Hello starts in the middle as above mentioned?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I wanted to try out some gcb codes to drive some types of displays.
I started with the ssd1306 and soon discovered that it doesn't contain a lot of symbols I use frequently.
Some of them are ...
Math: µ ° ±√ ≈ ≠ π • ∅ Ω ∆ ≤ ≥ ⁿ ‰ % ∞
Superscript: ¹²³⁴⁵⁶⁷⁸⁹⁰
Arrows: ←↑↓→
Fractions: ½⅓¼⅕⅙⅐⅛⅑⅒⅖⅔⅗¾⅜⅘⅝⅚⅞
Is there any way to add or change the existing set of symbols by a user in gcb and even eliminate unused to save memory?
Does the Extended Character set have these characters ?
Yes, there is. There are demos to show how to redefine a character within a character set.
Regarding memory. This is specific to the GCLD. The SSD1306 can be really optimised down to a very small character buffer. Have you use GCLD Transactions?
Not all GLCDs use RAM so optmisation is specific to the GLCD.
You could replace the whole of the GLCD routines that draw fonts. It is really down to how much effort you want to put in.
Thanks Anobium,
So fonts are defined in gcb and not on the on-board chip of the ssd1306.
Have you use GCLD Transactions?
Not used but tried with several codes in the example directory.
It works nice .
Fonts are generally specified within the GCB fonts tables. There are some GLCD ICs that have fontsets and the library will use them. SSD1306 is GCB fonts tables.
Yes, re the Transactions. I wrote them. I had the idea when I was on a campsite in France! I took the concept from Microsoft Groove Replication Architecture (I was responsible for the development of Microsoft Groove Solutions for a few years). And, the Transactions do slow down the screen refresh ( overall time ) but you can optimize this will Transaction Page Control. It just takes a bit of mental exercise to implement a GLCD solution.
Re the fonts. You can redefine them all by replacing the Table but I would recommend replacing the Extented Font Table leaving the standard fonts in place.
I have thought the font generation could be rewritten to leverage the C style font definition - it can be down. It now just needs someone to be motivated to do it.
Those GLCD ICs are I2C?
And is there a specific one that has GCB support?
France does have that affect on people to relaxe and come up with great ideas.
It certainly struck me with how much knowledge and expertise the GCB videos, manuals and GCB software have been put together. My respect for that. The forum obviously is the place for refinement. I must confess that I often need time to research and understand what is being answered. Normally that means I'm getting older I guess :)
I display all the static text first and only some dynamic text characters are frequently updated. This speeds up the display response.
I can't seem to display the ° degree sign, tried...
This code I used to display all GCB chars:
There seems to be nothing in 0-33 and 130-255, empty places!
The Extented Font Table 128-255 have lots of not commonly used chars.
Couldn't we compile our own GCB "Standard Font Table" with chars all users really need in projects?
What does that mean in plain english?
I'm now strugling with this "Create your own OLED characters on your GLCD".
Last edit: Haroen 2022-12-14
Those GLCD ICs are I2C?
And is there a specific one that has GCB support?
Which GLCD? As I do not know the type of GLCD model - I recommend you look at the help. The Help as a list of all the GLCD and the communication protocol.
If a GLCD does not support I2C is can be added with ease.
France does have that affect on people to relaxe and come up with great ideas.
Agree. I take my vacation near Uzes, France ever year. 5 weeks in France regenerates the body of many months. This year I have been there of an extended period. :-)
It certainly struck me with how much knowledge and expertise the GCB videos, manuals and GCB software have been put together. My respect for that. The forum obviously is the place for refinement. I must confess that I often need time to research and understand what is being answered. Normally that means I'm getting older I guess
This is great insight. Thanks to all that help to keep GCB going.
The age thing is getting to me also!
And, the Transactions do slow down the screen refresh ( overall time )
I display all the static text first and only some dynamic text characters are frequently updated. This speeds up the display response.
Transactions answer the question you raised with respect to using less memory. Transaction use a 128 byte buffer to manage and update a 1024 byte GLCD. Think of Transactions as a 'page' or piece of the GLCD incrementally moving across the GLCD. It is the additional 'page' management that make the GLCD updates a little slower.
** can't seem to display the ° degree sign, tried...
GLCDPrint (0, 0, chr(248))
GLCDPrint (0, 0, "°")
This code I used to display all GCB chars:
For Teller=0 To 255
GLCDPrint (0, 16, Teller)
GLCDPrint (35, 16, chr(Teller))
GLCDdrawCHAR (50, 16, Teller)
Pause 100
Next
There seems to be nothing in 0-33 and 130-255, empty places!
The Extented Font Table 128-255 have lots of not commonly used chars.
**
Your testing shows the character set. The GLCD font set IS characters 32 to 129 as this is the standard ASCII set.
And, there is NO character definition for characters beyond that range. Which means if you tried to extend the GLCD font set then things would fall over in a heap. And, therefore character replacement within this range is an option. Hance, the demo on how to change a character in the GLCD character set.
Couldn't we compile our own GCB "Standard Font Table" with chars all users really need in projects?
Yes. You could replace the TABLEs. This is really the same as replacing one character but replacing the whole table.
I have thought the font generation could be rewritten to leverage the C style font definition - it can be down.
What does that mean in plain english?
This is a development idea of mine. The current GCB methd uses a set of tables and these tables are specific to Great Cow BASIC.
C style definition would leverage all the Open Source Character sets on the internet.
But, this is rewrite of the GLCD code for font generation. This is doable but this would take someone months to compete. (It took me years to do what is there today but I was building on what was there and to add C style defintions for characters is a totall rewrite).
I'm now strugling with this "Create your own OLED characters on your GLCD".
What is the issue?
You can redefine them all by replacing the Table but I would recommend replacing the Extented Font Table leaving the standard fonts in place.
Yes, there is an Extended Font Table. I was hoping someone else would help answer the question to change this Extended Font Table. I will have to answer in a subsequent post.
Last edit: Anobium 2022-12-14
With respect to the C Style definitions. This site shows how to generate C Style font tables.
https://oleddisplay.squix.ch/#/home
This generates a set of code that is used in other compilers.
FACT: I used one set of tables to create the OLED fonts for GCB but I had to convert these tables.
The vision would be to use these tables directly. It is possible. It just takes time.
Please try this.
This will show you all the fonts in the OLED font set from 32 to 255. This is a larger character set but it shows some of the chars you are looking for!
The try this.
This will show that there are characters define from 32 to 255 but characters 128 to 192 are not defined.
So, you can take the tables that are used with GLCD_EXTENDEDFONTSET1 and add 50 characters you need into the table space.
Characters are define in matrix of 5 columns by 8 rows. Each column of the character is defined in one of the five tables. They are called GLCDCharCol3Extended1 to GLCDCharCol7Extended1 (why Col3... ask Hugh).
So, ir should now be possible to change these unused characters to meet you need.
Oh, vous vouliez dire les circuits intégrés GLCD intégrés et non les puces I2C séparées externes :)
I've seen examples and video's about it that I will definitely try.
I found several other GCB video's for all kind of display use that I will have to try too.
If I understand correctly there are 3 font-tables:
Standard, #define GLCD_OLED_FONT
Extended, #DEFINE GLCD_EXTENDEDFONTSET1
GLCD-IC, #DEFINE OLEDFont2 OLEDExtendedFont2
Where can I find a table.jpg with these GCB Standard Font Table and the GCB Extended Font table?
I'm now playing around with the SSD1306 (32, 64), is there a SSD1306 font-table.jpg?
All these overview info which chars are now available in GCB will determine if it is usefull to compile our own GCB "Standard Font Table" with chars all users really need in projects.
For a helping hand(s):
Maybe you could do a Font-table video serie how you did it to compile the current GCB font-set as basis to the next video what should be done, what you intended, for the C style definition.
An automated process, if possible, would reduce the time.
oui.
GCB Font sets - got this info by looking at the libraries.
This information is what I have to hand. Ask more questions and I will complete by digging deeper.
Help Hand. I have already created for you a Excel spreadsheet. It shows how the data relates to the characters. I will video.
Oh, 1 to 5...
I have collected only code for 3 of them now.
Maybe for a quick learning curve for other users we could summarise these 5 methods and integrate it into the GCB demos, eventually a intro video.
Here is what I have, please correct me if I'm wrong:
@Haroen I like the idea of a set of examples.
BASELINE USAGE
I have taken your program. And, created some examples with documentation. Something that (as you say is needed!).
This is the baseline demo. https://github.com/GreatCowBASIC/Demonstration_Sources/blob/main/GLCD_Solutions/GLCD_Methods/glcd_methods_baseline.gcb
This may not be complete. Please revise.
Evan
There are NO control constants in this demo - therefore no OLED, no OLED character extension or use of extended fonts.
This is mutually exclusive to the GLCD_OLED fonts.
Range of characters is 15 t0 129
GLCDfntDefaultSize = 1 to n with multiple the character size to make a larger character
Characters are a basic mono sized font
This is the original font set of Great Cow BASIC
GLCDFontWidth = 5 is the default value - this DOES control the intercharacter spacing.
You can use the method GLCDPrintLargeFont as in
GLCDPrintLargeFont 0,0, "HELLO"
Also, GLCDPrintWithSize operated as expected
GLCDPrintWithSize 0,0, "H",2
GLCDPrintWithSize 20,0, "ello",1
Constants available are:
~~~
I think will find bugs as we create these demos! Be prepared
Next, and OLED version.
Last edit: Anobium 2022-12-20
@Haroen Continuing the idea of a set of examples.
OLED FONTS USAGE - BASIC USE
This is the baseline OLED demo. https://github.com/GreatCowBASIC/Demonstration_Sources/blob/main/GLCD_Solutions/GLCD_Methods/glcd_methods_oledfonts.gcb
Note the range is different and the font select (OLED fonts do not scale).
This demo still may not be complete. Please revise.
Evan
There is the GLCD_OLED_FONT constants in this demo - therefore no BASELINE fonts, no OLED character extension or use of extended fonts.
This is mutually exclusive to the GLCD_STANDARD fonts.
Range of characters is 32 to 127
GLCDfntDefaultSize = 1 or 2 only with different fonts being used to show the characters
GLCDfntDefaultSize = 1: Are variable width characters by 8 pixels high characters. ! is one pixel width , and " is two pixels etc.
GLCDfntDefaultSize = 2: Are 10 width by 16 pixels high characters. Therefore, a fixed font.
GLCDFontWidth = 5 is the default value.
You can use the method GLCDPrintLargeFont as in with the values of 1 or 2
GLCDPrintLargeFont 0,0, "HELLO"
Also, GLCDPrintWithSize operated as expected
GLCDPrintWithSize 0,0, "H",2
GLCDPrintWithSize 20,0, "ello",1
Constants available are:
~~~
I think will find bugs as we create these demos! Be prepared
Next, and OLED EXTENDED version.
Last edit: Anobium 2022-12-20
@Haroen Continuing the idea of a set of examples.
OLED FONTS USAGE - EXTENDED CHARACTERS
This is the baseline OLED EXTENDED CHARACTERS demo.
https://github.com/GreatCowBASIC/Demonstration_Sources/blob/main/GLCD_Solutions/GLCD_Methods/glcd_methods_extendedfontset1.gcb
Note the range is different from the BASIC OLED fonts.
Evan
I think will find bugs as we create these demos! Be prepared
Next, and OLED with NO
GLCDfntDefaultSize=2
version - this reduces the size of the memory used.Last edit: Anobium 2022-12-20
Does any of this let one use the xor function by anobium ... which can be useful for b/w display. ie not erase background?
Yes, you could always use the XOR functions.
At this point we are documenting what is the fontset and characters set are.
Evan
@Haroen Continuing the idea of a set of examples.
OLED FONTS USAGE - NO OLEDFONT2
This is a demo without access to the OLED FONT Set 2. This saves near 2kb of program memory.
https://github.com/GreatCowBASIC/Demonstration_Sources/blob/main/GLCD_Solutions/GLCD_Methods/glcd_methods_oledfonts_noFontSet2.gcb
Note the memory usage.
Evan
I think will find bugs as we create these demos! Be prepared
Next, and BASELINE fonts with
GLCD_EXTENDEDFONTSET1
version - this extends the baseline fonts.hi Stan en Evan,
I tried the "#define PSet_SSD1306 xorPSet_SSD1306" in the demo "GLCD simple oscilloscope".
But how to switch back to "normal" so "NOT xor" display?
For the idea of these set of examples I have run several codes to observe the displayed characters and found it easy to program with ASCII tables to quickly find a character number as I mentioned earlier..
Therefore I've made these two table jpg's. I've yet to do the others.
OLED Standard ASCII characters.jpg
OLED Extended ASCII characters.jpg
Is there any way to implement these tables into GCB software and in these examples?
Nice work Evan!
Last edit: Haroen 2022-12-20
@Haroen Continuing the idea of a set of examples.
BASELINE FONTS USAGE - EXTENDED CHARACTERS
This is the base font set with extended chars demo.
https://github.com/GreatCowBASIC/Demonstration_Sources/blob/main/GLCD_Solutions/GLCD_Methods/glcd_methods_extendedfontset1.gcb
Note the range of characters is different from the baseline fontset.
Evan
These are the demos for fontset management.
Last edit: Anobium 2022-12-20
@Haroen
Stan can answer.
Good news!
I dont believe this is JPG of the fonts. If you create we can add to the Help.
So, same fonts as any GLCD. So, there is no SSD1306 font-table.jpg. Same as above - create and we can add the Help.
Wonderful. Great work!
When you are ready. We can add to the Help.
You have a few options.
1) Update the Help - this is easy. Maybe update this? https://gcbasic.sourceforge.net/help/_pic_users_and_beginners_start_here.html
We do not update the HTML. There is a real simple process to update any portion of the Help. The actual source for the page above is here: https://github.com/GreatCowBASIC/Help/blob/main/source/newtoGreatCowBASIC.adoc You can create a GitHub account and edit online.
If you want to edit any other page, in the GLCD section for instance, the full list of pages is here: https://github.com/GreatCowBASIC/Help/blob/main/source/gcbasic.adoc The actual source files are in the order of Help creation.
2) Create a post and someone else (me!) edits for you. This is far ideal but not everyone wants to write the Help pages.
It is not just me. There is a growing band of folks involved! Thanks to them GCBASIC grows.
Last edit: Anobium 2022-12-20
The glcd lib is interesting when I can follow it.
The character print seems to be plotting the dots that make them.. not sure though.
xor seems to be set at program start but not switchable in program afaik.
xor seems to be the plot command so affects all ssd1306 graphics.. dunno.
The idea is that the graphics erase the background and redrawing erases the graphics and restores the background.
Anobium implemented the read pixel function, which can be a "blit" function for small screen areas to store and restore... maybe. ram?
I tried to understand how the buffer worked so it could be read and a composite video signal could be generated.
I will try defining graphics but prefer using ili9341 displays.
Cheers for the work.
Is there any workaround to add text to or before a graph oscilloscope?
CODE TESTING RESULTS
Code: BASELINE USAGE
Should start left aligned according to...
GLCDPrintWithSize 0,0, "H",2
Code: OLED FONTS USAGE - BASIC USE
Code: OLED FONTS USAGE - EXTENDED CHARACTERS
Code: OLED FONTS USAGE - NO OLEDFONT2
Code: BASELINE FONTS USAGE - EXTENDED CHARACTERS
Please retest with BUILD 1208. I updated the GLCD.H
This changed revised GLCDPrintLoc to correct Xpos value @ 1208 which was the miss positioning of the "Hello"
Last edit: Anobium 2022-12-21
Also, I do not see any changes in GitHub. Did you commit back to the master Git?