Menu

SSD1306 ASCII character symbols

Haroen
2022-12-07
2023-01-18
<< < 1 2 3 4 > >> (Page 2 of 4)
  • Anobium

    Anobium - 2022-12-21

    Here is a video for you. This using build 1208 - https://1drv.ms/u/s!Ase-PX_n_4cvhLoe8bS6uInqQyjsuw?e=gMRzWG

     
  • Haroen

    Haroen - 2022-12-21

    I have just seen your video, looking good and I understand.
    I think we can expand the same video with the look up ASCII tables that I will supply.
    Maybe this video could then be uploaded on your YouTube?

    By the way, I noticed that many of the characters in my first post are now visible in these loops on the display.

    Please retest with BUILD 1208. I updated the GLCD.H

    Where can I download that file?

    Also, I do not see any changes in GitHub. Did you commit back to the master Git?

    Is that the Github green button "Create Pull Request"?

    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?

     

    Last edit: Haroen 2022-12-21
  • Anobium

    Anobium - 2022-12-21

    I can expand the video to make it 'great'.

    BUILD 1208 - Get via a GCStudio update. Are you using GCStudio?

    Your Github request worked! All merged on one file.

    Re XOR. Post the code. I will look.

     
  • stan cartwright

    stan cartwright - 2022-12-21
    #define PSet_SSD1306 xorPSet_SSD1306
    

    sets it up and I dunno how to turn xor off.
    "Is there any workaround to add text to or before a graph oscilloscope?"
    Print the text after cls when the cursor is drawn and it is like normal but I guess if you print the same text in the same position it will erase the text.
    There is a read pixel function so it could be xored or anded back to the display.

     
  • Haroen

    Haroen - 2022-12-25

    Ok, took me some time to research and to compose the character tables based on this online example.
    Then I noticed the "#define OLEDFont2 OLEDExtendedFont2 = OLE DExtended Font-Set ASCII 32 To 255" form earlier in this topic :(
    Next time! Here is the merged table what I've got so far.

    I was thinking if these merged tables also will work for other displays that I've seen in glcd.h?

    BUILD 1208 - Get via a GCStudio update. Are you using GCStudio?

    I've extracted the glcd.h file from GCStudio copied it into the Includes directory and it works getting the "Hello" text aligned to the left. The new IDE looks promising R&D for later.

    Your Github request worked! All merged on one file.

    Thanks.

    @Stan

    Print the text after cls when the cursor is drawn and it is like normal but I guess if you print the same text in the same position it will erase the text.

    I tried and sometimes it worked and most of the time it didn't. For now it's code bits and pieces of trials to understand GCB.

     

    Last edit: Haroen 2022-12-25
  • Anobium

    Anobium - 2022-12-25

    @Haroen

    Table looks good. So, I should wait until you complete before we move into the Help?

     
  • Haroen

    Haroen - 2022-12-25

    Yes, please wait because there is something strange.
    I've tested the "#define OLEDFont2 OLEDExtendedFont2" before on the SSD1306 display for °C with a DS18B20 in the GCB examples with "Chr(248)" instead of the LCD print chr(223)+"C ".
    In my tables experiment with the SSD1306 display a have seen a "ω" character on the 248 position.
    Did I do something wrong?

    (Merry Christmas Everyone)

     

    Last edit: Haroen 2022-12-25
    • Anobium

      Anobium - 2022-12-27

      :-) Waiting.

       
  • Haroen

    Haroen - 2022-12-28

    I couldn't seem to reproduce the situation for extra characters but I've found it in my previous post.
    I have purged it to this example code:

    'DECLARATION
    #chip mega328p, 16
    #option explicit
    #include <glcd.h>
    
    ; ----- Define GLCD Hardware settings
    #define GLCD_TYPE GLCD_TYPE_SSD1306_32
    #define GLCD_I2C_Address 0x78
    #define GLCD_PROTECTOVERRUN
    
    ; ----- Define Hardware settings
    #define hi2c_BAUD_RATE 400
    #define hi2c_DATA
    HI2CMode Master
    
    ; ----- Define GLCD Font settings
    Dim OLDDSDATA, EIGHTBYTES, CLOCKS as Byte
    #define GLCD_OLED_FONT
    #DEFINE OLEDFont2 OLEDExtendedFont2
    GLCDfntDefaultSize = 2
    
    'Variables
    Dim Teller as Integer
    
    
    'MAIN
    GLCDCLS
    For Teller=32 To 255
        GLCDPrint (0, 16, Teller)
        GLCDPrint (35, 16, chr(Teller))
        GLCDdrawCHAR (50, 16, Teller)
        GLCDPrint (107, 16, "E")
        Pause 700
    Next
    

    Seems that we don't have this in the idea of a set of examples.
    See the jpg for newest character-table for all examples. (Please check for errors)

     
  • Anobium

    Anobium - 2022-12-28

    re

    I like this layout. Do you want me to compare to the actual display ?

     
  • Haroen

    Haroen - 2022-12-28

    Thanks Evan for adding the new example demo on github, looks good.

    I like this layout.

    Is the Hex value of any use to gcb?
    I can remove the columns or expand the hex range from 128 to 255.

    Do you want me to compare to the actual display ?

    You could or maybe Stan would like to try if he has some time left ;-)

     
  • Anobium

    Anobium - 2022-12-28

    Hex is good for those that like HEX.

    I would expand the columns to make it clear how folks get that specific character.

     
  • Haroen

    Haroen - 2022-12-29

    I will add the missing Hex.

    A specific character is selected by:
    1) Declaration #Define... See example
    All the codes up to Dec=127 results all in the same char.
    Dec=128 to 191 and the chars on the right in the colums from 192 to 255 are with the last example code.
    2) One of these two code .

    GLCDprint (35, 16, chr(Dec))
    GLCDdrawCHAR (50, 16, Dec)
    

    3) The corresponding Dec number.

    Did you mean point 1) what to declare?

     

    Last edit: Haroen 2022-12-29
    • Anobium

      Anobium - 2022-12-29

      Is the a better definition ?

      A specific character is selected by:
      1) The declaration of #Define to determine font style ( GCB or OLED fontset)
      All codes between Dec = 32 to 127 results all in the same character; codes 15-32 are only supported with extended fontset.
      Dec=128 to 191 and the chars on the right in the colums from 192 to 255 are with the last example code.
      2) One of these two code .

      GLCDPrint (35, 16, chr(Dec))
      GLCDdrawCHAR (50, 16, Dec)

       
  • Haroen

    Haroen - 2022-12-30

    Is there a better definition ?

    Can't seem to find one than the table in combination with the code examples.

     
    • Anobium

      Anobium - 2022-12-30

      ok. No Problem.

       
  • Haroen

    Haroen - 2022-12-30

    I tried the GCB demo file "GLCD_Simple_Oscilloscope_MEGA328p_for_SSD1306@16" and changed the line to #define GLCD_TYPE GLCD_TYPE_SSD1306_32 for a smaller display.
    The display then stays black (off).
    Is this a "#define PSet_SSD1306 xorPSet_SSD1306" problem?
    If I add tekst to the program it also only works without the "SSD1306_32" otherwise it stays black.
    Should I try another Font-set?

    I tried #define PSet_SSD1306_32 xorPSet_SSD1306_32 that would program and showed just one line but no oscilloscope.

     
    • Anobium

      Anobium - 2022-12-30

      I am not ( yet) the expert on the oscilloscope program. But, does the program show anything with #define GLCD_TYPE GLCD_TYPE_SSD1306 on your 32pixel display?

      I think you say this - but, I want to confirm.

       

      Last edit: Anobium 2022-12-30
  • Anobium

    Anobium - 2022-12-30

    I just looked at the source program.

    Remove line 88 and 124 - they constrain the code to one specific GLCD type.

     
  • Haroen

    Haroen - 2023-01-01

    Happy NewYear to you all,

    The program also works without the #include <uno_mega328p.h>.
    I use a Arduino micro just for testing.

    does the program show anything with #define GLCD_TYPE GLCD_TYPE_SSD1306 on your 32pixel display?

    Yes it does and it clears all pixels correctly after displaying.

    Remove line 88 and 124 - they constrain the code to one specific GLCD type.

    With the line to #define GLCD_TYPE GLCD_TYPE_SSD1306_32 the display is not black (off) anymore and works.
    But now not all pixels are cleared after displaying and so the display eventually fills with (blue) dots or after some wave signals display the program freezes with scatered dots.

     
  • Haroen

    Haroen - 2023-01-01

    I will now complete the ascii table with hex numbers.

     
  • Haroen

    Haroen - 2023-01-02

    I have added the new Ascii table with hex.

    The new Oscilloscope demo works, thanks.
    While I was tinkering with the code to try your changes I am learning more and more how GCB works. Sometimes text was even up-side-down and mirrored :)
    How to change the Xscale (µs) in code easily?

     

    Last edit: Haroen 2023-01-02
    • Anobium

      Anobium - 2023-01-02

      Thank-you for the ASCII table. l will add your good work to the Help [readb in the voice of the Borg].

      Re Xaxis. I had the same question 🙋. Stan please help.

       
<< < 1 2 3 4 > >> (Page 2 of 4)

Log in to post a comment.