SSD1306 start display problem


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Location
    France
    Posts
    50

    Default SSD1306 start display problem

    Hi,
    I'm trying to use an adafruit 0.96" 128x64 OLED. using SPI
    I want to draw some graphics (BIG numbers in this case 30x48 pixels each)
    I don't want to draw the entire display (1024 bytes) to place my number at the center (by example) of the screen.
    I would like to just send 180 bytes of my little graphic
    So I try this code: (part)

    Code:
    zero:
    
    low dc : PAUSEUS 10            'mode command
    val = $20                      'set mem addr mode
    gosub send
    val = 1                        'mode vertical  (with $20 above)
    gosub send
    val = $22                      'setup page start & end addr
    gosub send
    val = 1                        'start page 1 (page 0 not used) High caract = 6 bytes ... 8 possible
    gosub send
    val = 6                        'end page 6 (page 7 not used)
    gosub send
    
    val = $21                      'set colonne start & end
    gosub send
    val = 49                       'would like to place at the center so at row 49  (start)
    gosub send
    val = 78                       ' end
    gosub send
    
    high dc : PAUSEUS 10           'mode display
    
    
    for tab = 0 to 179
    lookup tab,[$00,$00,$FF,$FF,$00,$00,$00,$F8,$FF,$FF,$0F,$00,$00,$FF,$FF,$FF,$7F,$00,_
    $C0,$FF,$FF,$FF,$FF,$01,$E0,$FF,$FF,$FF,$FF,$03,$F0,$FF,$FF,$FF,$FF,$07,_
    $F8,$FF,$FF,$FF,$FF,$0F,$FC,$FF,$FF,$FF,$FF,$1F,$FE,$FF,$FF,$FF,$FF,$3F,_
    $FE,$7F,$00,$00,$FE,$3F,$FE,$07,$00,$00,$F0,$3F,$FF,$01,$00,$00,$C0,$7F,_
    $FF,$01,$00,$00,$C0,$7F,$FF,$00,$00,$00,$80,$7F,$FF,$00,$00,$00,$80,$7F,_
    $FF,$00,$00,$00,$80,$7F,$FF,$00,$00,$00,$80,$7F,$FF,$01,$00,$00,$C0,$7F,_
    $FF,$01,$00,$00,$C0,$7F,$FE,$07,$00,$00,$F0,$3F,$FE,$3F,$00,$00,$FF,$3F,_
    $FE,$FF,$FF,$FF,$FF,$3F,$FC,$FF,$FF,$FF,$FF,$1F,$F8,$FF,$FF,$FF,$FF,$0F,_
    $F0,$FF,$FF,$FF,$FF,$07,$E0,$FF,$FF,$FF,$FF,$03,$C0,$FF,$FF,$FF,$FF,$01,_
    $00,$FF,$FF,$FF,$7F,$00,$00,$F8,$FF,$FF,$0F,$00,$00,$00,$FF,$7F,$00,$00],val  ' Code for char 0
    
    gosub send                  ' send data
        
    pause 10                    ' to see it slowly
    next tab
    return
    but it doesn't start at row 49... Always at ROW 0 !

    Name:  Capture2.JPG
Views: 6717
Size:  83.5 KB

    I tried to see code from others (arduino too but they use libraries so... just crazy) but I can't see what's wrong.
    Any help ?
    Regards

  2. #2
    Join Date
    Sep 2005
    Location
    France
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Re: SSD1306 start display problem

    OK... I know what's wrong. This is not my code ! It's because of the bad simulation of the SSD1306 with proteus software :-( I took a real 0.96" OLED display and it works fine without any change of my code.

Similar Threads

  1. SSD1306 Include example
    By timc in forum Code Examples
    Replies: 11
    Last Post: - 28th November 2017, 08:53
  2. Help With OLED Display / 128X64 SSD1306
    By Denner in forum General
    Replies: 6
    Last Post: - 25th May 2013, 15:40
  3. Problem getting switch info into FOR..NEXT Start
    By Roddy Wayne in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 25th October 2010, 23:02
  4. need help on display problem
    By sixty9sandals in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 30th March 2007, 03:57
  5. Problem with LCD and Start Up
    By savnik in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 21st October 2006, 20:22

Members who have read this thread : 3

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts