Announcement

Collapse
No announcement yet.

Last column of pixels gone

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Last column of pixels gone

    Hi, I have a number of 0.96" microOled uOled-92-G2 modules, and on all of them the very last column of pixels is missing. For instance when text is displayed in the most right column, the characters lack right-sided pixels. What could be the possible cause?

  • #2
    Um, are you positioning your text correctly? eg, the leftmost pixel is 0.

    Can you show us a quick demonstration? (eg a few lines of code)
    Mark

    Comment


    • #3
      Enclosed the code we use (in Bascom AVR)
      In the main program, the following is used to display text

      Call Ol_text(1 , 10 , "white" , "black" , Str(xm) )
      Call Ol_text(2 , 10 , "white" , "black" , Str(ym) )
      Call Ol_text(3 , 10 , "white" , "black" , Str(ym) )

      Position 10 displays numbers where the last column of pixels is missing. Position 9 shows the full number.
      Attached Files
      Last edited by MadAl; 31st May 2015, 06:27 PM.

      Comment


      • #4
        Please note that also at the splash screen at start up, the last pixels on the right side of the screen fail. This is with all modules I have (6)
        Attached Files

        Comment


        • #5
          I did a test by drawing a red rectangle at the extreme borders of the screen (the first and last column and the top and bottom rows). Then I sent 20 characters in one row, which should fit on the screen. As you can see, they don't fit and the last character misses pixels on the right side. This shows that all pixels are working, but the 20 characters don't fit although according to the data they should.
          Attached Files

          Comment


          • #6
            Thanks, for the picture, that helps make sense of it.

            From the 'Serial environment Command set' it says in the character width and character height commands that the system font is 7x8. Since the display is 96 pixels wide this gives 13.7 characters across which is what you are seeing in your picture.

            If you really want to squeeze in that last character you can actually start at an x position of -1 since the leftmost and last character columns are only used by _ and 0x127
            Mark

            Comment


            • #7
              Thanks Mark.
              The characters are sent to the screen 'per character' and not 'per pixel'. How can I shift the text 1 pixel to the left?
              MadAl

              Comment


              • #8
                Hmm, it's done inside the bascom avr code you supplied.

                Try changing this line
                Code:
                 Print #buart_oled , Chr(hf_txt_movecursor) ; Chr(lf_txt_movecursor) ; Chr(0) ; Chr(b1) ; Chr(0) ; Chr(b2) ;
                to
                Code:
                 b2 = b2 *7 -1
                Print #buart_oled , Chr(hf_gfx_moveto) ; Chr(lf_gfx_moveto) ; Chr(High(b2)) ; Chr(Low(b2)) ; Chr(0) ; Chr(b1*8) ;
                inside the Ol_text subroutine.
                I've never used Bascom AVR so I am only guessing that the code will work
                Not that this will move all the test written by this routine one pixel to the left. If you intend using other fonts or using the routine for other purposes you might want to create another routine
                Mark

                Comment


                • #9
                  Thanks Mark, that did the trick!

                  Comment

                  Working...
                  X