Graphical Displays with PBP3


Results 1 to 40 of 115

Threaded View

  1. #11
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Graphical Displays with PBP3

    The display layout still isn't quite right. Here is a simple program that displays a 16x16 image in all 4 corners the ones on the left side are good, but the right side locations are wrong.

    Code:
    'PIC18F26K22
    #CONFIG
      CONFIG  FOSC = INTIO67
      CONFIG  PLLCFG = ON
      CONFIG  PRICLKEN = ON
      CONFIG  FCMEN = OFF
      CONFIG  IESO = OFF
      CONFIG  PWRTEN = ON
      CONFIG  BOREN = SBORDIS
      CONFIG  BORV = 190
      CONFIG  WDTEN = ON
      CONFIG  WDTPS = 32768
      CONFIG  CCP2MX = PORTC1
      CONFIG  PBADEN = OFF
      CONFIG  CCP3MX = PORTB5                                
      CONFIG  T3CMX = PORTC0
      CONFIG  HFOFST = ON
      CONFIG  P2BMX = PORTB5
      CONFIG  MCLRE = EXTMCLR
      CONFIG  STVREN = ON
      CONFIG  LVP = OFF
      CONFIG  XINST = OFF
      CONFIG  DEBUG = OFF
      CONFIG  CP0 = OFF
      CONFIG  CP1 = OFF
      CONFIG  CP2 = OFF
      CONFIG  CP3 = OFF
      CONFIG  CPB = OFF
      CONFIG  CPD = OFF
      CONFIG  WRT0 = OFF
      CONFIG  WRT1 = OFF
      CONFIG  WRT2 = OFF
      CONFIG  WRT3 = OFF
      CONFIG  WRTC = OFF
      CONFIG  WRTB = OFF
      CONFIG  WRTD = OFF
      CONFIG  EBTR0 = OFF
      CONFIG  EBTR1 = OFF
      CONFIG  EBTR2 = OFF
      CONFIG  EBTR3 = OFF
      CONFIG  EBTRB = OFF
    #ENDCONFIG       
    DEFINE OSC 64
        clear
        ssd1306_addr con $78 
        #DEFINE colours 1   ;1 mono 2 rg or 3 rgb
        width  con 128      
        height con 64      
        h_offset con 0
        
        include "grx.pbpMOD" 
        include "SSD1306.pbpMOD"
        BUFF     VAR BYTE[32]
        ANSELB=0
        ANSELC=0
        ANSELA=0
        OSCCON=$70
        OSCTUNE.6=1
        gosub glcd_init
        gosub grf_clr
        gosub show 
    
    main:     ' Rotate icon clockwise around display corners
        DMDBMP 0,0,TestIcon       'top left 16x16 CORRECT PLACEMENT!
        gosub show
        pause 1000
        gosub grf_clr
        gosub show
        
        DMDBMP 111,0,TestIcon       'top right 16x16 WRONT PLACEMENT!
        gosub show
        pause 1000
        gosub grf_clr
        gosub show   
        
        DMDBMP 111,47,TestIcon       'bottom right 16x16 WRONG PLACEMENT!
        gosub show
        pause 1000
        gosub grf_clr
        gosub show   
    
        DMDBMP 0,47,TestIcon       'bottom left 16x16 CORRECT PLACEMENT!
        gosub show
        pause 1000
        gosub grf_clr
        gosub show   
    goto main 
     
    end
    
    TestIcon:
    @ db 0x10,0x10 ;16x16
    @ db 0xFF,0xFF;
    @ db 0xC0,0x03;
    @ db 0xA0,0x05;
    @ db 0x90,0x09;
    @ db 0x88,0x11;
    @ db 0x84,0x21;
    @ db 0x82,0x41;
    @ db 0x81,0x81;
    @ db 0x81,0x81;
    @ db 0x82,0x41;
    @ db 0x84,0x21;
    @ db 0x88,0x11;
    @ db 0x90,0x09;
    @ db 0xA0,0x05;
    @ db 0xC0,0x03;
    @ db 0xFF,0xFF;
    Name:  Untitled-1.jpg
Views: 46068
Size:  310.6 KB Name:  Untitled-2.jpg
Views: 45753
Size:  292.2 KB Name:  Untitled-3.jpg
Views: 46067
Size:  280.0 KB Name:  Untitled-4.jpg
Views: 45738
Size:  277.8 KB
    Last edited by spcw1234; - 24th February 2024 at 20:04. Reason: Added images
    Shawn

Similar Threads

  1. Replies: 3
    Last Post: - 1st January 2021, 22:28
  2. problem using Graphical LCD
    By Mostafa in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2007, 19:15
  3. Graphical LCDs
    By T.Jackson in forum General
    Replies: 5
    Last Post: - 14th May 2007, 07:29
  4. Vb 6.0 Graphical plug in
    By rocky79 in forum Serial
    Replies: 0
    Last Post: - 8th March 2006, 19:42
  5. Graphical user interface
    By rocky79 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 15th October 2005, 13:25

Members who have read this thread : 2

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