GLCD T6963c load and display picture


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Posts
    44

    Default GLCD T6963c load and display picture

    after deep scan i found how i can load and display any picture
    below in rar file are the programms and i the tutorial for the use.
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by santamaria View Post
    after deep scan i found how i can load and display any picture
    below in rar file are the programms and i the tutorial for the use.
    Wow, this is a useful tool! Thanks for posting.

    Best Regards,
    Paul

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Those are some wonderfull tools !!!

    Thanks

    One question:

    I've looked for graphic lcds and there are plenty of different controllers.

    Does anyone knows which ones are compatible with the T6963C mentioned here ?

    How can one know if one particular ldc controller it's compatible with this one?

    My best regards
    Rui

  4. #4
    Join Date
    Feb 2010
    Location
    USA, New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    I don't know much about controllers. The GLCD I'm using is the NHD-C12864WM-09-FSW-FBW-3V3-M from New Haven Displays. It uses SPLC501C controller, which would now be the only one I know *anything* about. I still had to take the output and modify it somewhat.

    For the little image pasted below, here's the code that the software generated:
    Code:
    'PIC BASIC PRO CODE FOR DISPLAY IMAGE ON T6963C LCD CONTROLLER
     
    '----------SUBROUTINES FOR IMAGE DATA--------------------
    'pict1:
    for gl_i=0 to 239
    lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$60,$60,$60,$30,$30,$38,$18,$18,$FC,$FC,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$C0,$F0,$30,_
    $18,$18,$0C,$0C,$0C,$0C,$0C,$18,$18,$30,$F0,$C0,$80,$00,$00,$00,_
    $00,$00,$00,$60,$70,$30,$18,$18,$1C,$0C,$0C,$0C,$0C,$0C,$0C,$18,_
    $38,$70,$E0,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$C0,$E0,$38,$1C,$FC,_
    $FC,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FC,$FC,$0C,$0C,_
    $0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$03,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$80,$C0,$70,$3F,$0F,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$C0,$C0,$C0,$C0,$C0,$E0,_
    ],gl_k
    val=gl_k
    I2Cwrite DPIN, CPIN, $A0, addr.highbyte,addr.lowbyte, [val]
    addr=addr+1
    pause 4
    NEXT
    
    'pict2:
    for gl_i=0 to 239
    lookup gl_i,[$70,$38,$1F,$0F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$80,$E0,$78,$1C,$07,$03,$00,$00,$00,$FF,_
    $FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$40,$60,_
    $60,$30,$30,$30,$30,$30,$30,$60,$60,$C0,$C0,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $80,$C0,$60,$30,$18,$0C,$06,$03,$01,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$01,_
    $03,$07,$0E,$FC,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$70,$7C,$6F,$63,$60,$60,$60,$60,$60,$60,$60,$60,$FF,_
    $FF,$60,$60,$60,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$FC,$00,$00,$00,_
    $00,$00,$00,$60,$60,$60,$60,$60,$60,$60,$60,$7F,$7F,$60,$60,$60,_
    $60,$60,$60,$60,$60,$00,$00,$00,$00,$00,$00,$70,$78,$6C,$66,$63,_
    $61,$60,$60,$60,$60,$60,$60,$60,$60,$60,$60,$78,$78,$00,$00,$00,_
    $00,$00,$0C,$1C,$18,$30,$30,$30,$60,$60,$60,$60,$60,$60,$70,$30,_
    $38,$1C,$0E,$07,$01,$00,$00,$00,$00,$3C,$7E,$7E,$7E,$7E,$3C,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$60,$60,$60,$60,$60,$7F,_
    $7F,$60,$60,$60,$00,$00,$00,$00,$00,$00,$06,$0E,$1C,$18,$30,$30,_
    $60,$60,$60,$60,$60,$60,$70,$30,$38,$1C,$0F,$07,$01,$00,$00,$00,_
    ],gl_k
    val=gl_k
    I2Cwrite DPIN, CPIN, $A0, addr.highbyte,addr.lowbyte, [val]
    addr=addr+1
    pause 4
    NEXT
    
    'pict3:
    for gl_i=0 to 239
    lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    ],gl_k
    val=gl_k
    I2Cwrite DPIN, CPIN, $A0, addr.highbyte,addr.lowbyte, [val]
    addr=addr+1
    pause 4
    NEXT
    
    'pict4:
    for gl_i=0 to 239
    lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    ],gl_k
    val=gl_k
    I2Cwrite DPIN, CPIN, $A0, addr.highbyte,addr.lowbyte, [val]
    addr=addr+1
    pause 4
    NEXT
    
    return
    Here's what I did to it to make it work with my GLCD:
    Code:
    'PIC BASIC PRO CODE FOR DISPLAY IMAGE ON T6963C LCD CONTROLLER
    
    INCLUDE "ALLDIGITAL.pbp"	'Search the PicBasic forum for this
    
    RESETB 	var PORTA.3
    RW		VAR PORTA.4
    CS2		VAR PORTA.5
    RS		var PORTB.2
    EOS		VAR PORTB.3
    C86		VAR PORTF.2
    D0		var PORTG.0
    D1		var PORTG.1
    D2		var PORTG.2
    D3		var PORTG.3
    D4		var PORTG.4
    D5		VAR PORTF.5
    D6		VAR PORTE.6
    D7		VAR PORTE.7
    
    PORTA = 0
    PORTB = 0
    PORTC = 0
    PORTD = 0
    PORTE = 0
    PORTF = 0
    PORTG = 0
    
    TRISA = 0
    TRISB = 0
    TRISC = 0
    TRISD = 0
    TRISE = 0
    TRISF = 0
    TRISG = 0
    
    
    
    gl_k var byte
    gl_i var byte
    
    'Initialize the GLCD
    gosub InitGLCD
    
    'jump over subroutines
    goto Start
     
    '----------SUBROUTINES FOR IMAGE DATA--------------------
    ShowScreen:
    	'Page0
    	gl_k = %10110000	'Go to start of page 0	
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    
    	'Page1
    	gl_k = %10110001	'Go to start of page 1
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$60,$60,$60,$30,$30,$38,$18,$18,$FC,$FC,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$C0,$F0,$30,_
    		$18,$18,$0C,$0C,$0C,$0C,$0C,$18,$18,$30,$F0,$C0,$80,$00,$00,$00,_
    		$00,$00,$00,$60,$70,$30,$18,$18,$1C,$0C,$0C,$0C,$0C,$0C,$0C,$18,_
    		$38,$70,$E0,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$C0,$E0,$38,$1C,$FC,_
    		$FC,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FC,$FC,$0C,$0C,_
    		$0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$0C,$00,$00,$00,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    
    	'Page2
    	gl_k = %10110010	'Go to start of page 2
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$03,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$80,$C0,$70,$3F,$0F,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$C0,$C0,$C0,$C0,$C0,$E0,_
    		$70,$38,$1F,$0F,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$80,$E0,$78,$1C,$07,$03,$00,$00,$00,$FF,_
    		$FF,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$40,$60,_
    		$60,$30,$30,$30,$30,$30,$30,$60,$60,$C0,$C0,$00,$00,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    	
    	'Page3
    	gl_k = %10110011	'Go to start of page 3
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$FF,$FF,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$80,$C0,$60,$30,$18,$0C,$06,$03,$01,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$01,$01,_
    		$03,$07,$0E,$FC,$F0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$70,$7C,$6F,$63,$60,$60,$60,$60,$60,$60,$60,$60,$FF,_
    		$FF,$60,$60,$60,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$03,$FF,$FC,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    	
    	'Page4
    	gl_k = %10110100	'Go to start of page 4
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$60,$60,$60,$60,$60,$60,$60,$60,$7F,$7F,$60,$60,$60,_
    		$60,$60,$60,$60,$60,$00,$00,$00,$00,$00,$00,$70,$78,$6C,$66,$63,_
    		$61,$60,$60,$60,$60,$60,$60,$60,$60,$60,$60,$78,$78,$00,$00,$00,_
    		$00,$00,$0C,$1C,$18,$30,$30,$30,$60,$60,$60,$60,$60,$60,$70,$30,_
    		$38,$1C,$0E,$07,$01,$00,$00,$00,$00,$3C,$7E,$7E,$7E,$7E,$3C,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$60,$60,$60,$60,$60,$7F,_
    		$7F,$60,$60,$60,$00,$00,$00,$00,$00,$00,$06,$0E,$1C,$18,$30,$30,_
    		$60,$60,$60,$60,$60,$60,$70,$30,$38,$1C,$0F,$07,$01,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    	
    	'Page5
    	gl_k = %10110101	'Go to start of page 5
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    	
    	'Page6
    	gl_k = %10110110	'Go to start of page 6
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    	
    	'Page7
    	gl_k = %10110111	'Go to start of page 7
    	GOSUB WriteCommand
    	gl_k = %00010000	'Set Column address upper nibble to zero	
    	GOSUB WriteCommand
    	gl_k = %00000000	'Set Column address lower nibble to zero
    	GOSUB WriteCommand
    	'write the entire page
    	for gl_i=0 to 127
    		lookup gl_i,[$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,_
    		$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00_
    		],gl_k
    		gosub WriteData
    	NEXT gl_i
    return
    
    WriteCommand:
    	RS = 0		'Set Register Select for Command
    	RW = 0		'Set Read/Write for Write
    	CS2 = 1		'Turn On Chip Select
    	EOS  = 1	'Bring Enable Operation Signal high
    	D0 = gl_k.0
    	D1 = gl_k.1
    	D2 = gl_k.2
    	D3 = gl_k.3
    	D4 = gl_k.4
    	D5 = gl_k.5
    	D6 = gl_k.6
    	D7 = gl_k.7
    	EOS = 0		'Falling edge of Enable Operation Signal sets the datum
    	CS2 = 0		'Unselect chip
    	RW = 0		'Set Read/Write for Write
    return
    
    WriteData:
    	RS = 1		'Set Register Select for Data
    	RW=0		'Set Read/Write for Write
    	CS2 = 1		'Turn On Chip Select
    	EOS  = 1	'Bring Enable Operation Signal high
    	D0 = gl_k.0
    	D1 = gl_k.1
    	D2 = gl_k.2
    	D3 = gl_k.3
    	D4 = gl_k.4
    	D5 = gl_k.5
    	D6 = gl_k.6
    	D7 = gl_k.7
    	EOS = 0		'Falling edge of Enable Operation Signal sets the datum
    	CS2 = 0		'Unselect chip
    	RW=0		'Set Read/Write for Write
    return
    
    InitGLCD:
    	RW=0		'Set Read/Write for Write
    	RS = 0		'Set Register Select for Command
    	RESETB = 1		'Bring out of Reset
    	EOS=0		'make sure Enable Operation Signal is low
    	Pause 22
    	gl_k = $A2	'1.  Set to 1/9 bias. A2=162= 1010 0010
    	GOSUB WriteCommand
    	gl_k = $A0	'2.  ADC Select, Normal. A0=160=1010 0000
    	GOSUB WriteCommand
    	gl_k = $C8	'3.  COM Output reverse. C8=200= 1100 1000
    	GOSUB WriteCommand
    	gl_k = $A4	'4.  Display all points Normal.  A4=164= 1010 0100
    	GOSUB WriteCommand
    	gl_k = $40	'5.  Display Start Line set to 0.  40=64=01 000000
    	GOSUB WriteCommand
    	gl_k = $25	'6.  Internal Resistor Ratio.  $25=37=0010 0101 [$20-$27]
    	GOSUB WriteCommand
    	gl_k = $81	'7.  Set Electronic Volume Mode.  $81=129=1000 0001
    	GOSUB WriteCommand
    	gl_k = $1A	'8.  Set Electronic Volume Value.  $10=16=00 01 0000
    	GOSUB WriteCommand
    	gl_k = $2F	'9.  Set Power Controller.  $2F=47=0010 1111
    	GOSUB WriteCommand
    	gl_k = $AF	'10.  Display On.  $AF=175=1010 1111
    	GOSUB WriteCommand
    return
    
    '----------MAIN PROGRAM----------------------------------
    Start:
    	goto ShowScreen
    	pause 5000
    	goto start
    end
    So it didn't write *all* my code for me, but it sure helped shorten the amount of time.

    I guess the moral to all this is that there is no substitute for reading (and reading and re-reading) the datasheet until it starts to make sense...

    Best Regards,
    Paul
    Attached Images Attached Images  

Similar Threads

  1. Hdsp 21xx display
    By Original in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th June 2012, 21:07
  2. 7 Segment Displays and MAX7219
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 31st October 2010, 19:30
  3. 12F629 LDR - Light Dependant Resistor
    By Dennis in forum Schematics
    Replies: 15
    Last Post: - 18th February 2010, 23:33
  4. need help in lookup
    By malwww in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 6th June 2009, 15:30
  5. Tach Project (binary counting)...
    By Netjammer in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 18th November 2004, 13:50

Members who have read this thread : 1

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