Graphic LCD support?


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    bioeng-mostafa's Avatar
    bioeng-mostafa Guest


    Did you find this post helpful? Yes | No

    Default I Want Help

    Hellow
    I Want The File By Whish I Can Write Progrsm With Pbp
    Or Beatsh
    Thank You

  2. #2
    Join Date
    May 2004
    Location
    New England
    Posts
    164


    Did you find this post helpful? Yes | No

    Default

    I'd guess the main reason for no graphic support is all the different types of graphic LCD's out there. If MELabs offered support for say the KS0108 type, people would want some other LCD variety supported too.

    The graphic LCD's are really fairly easy to use if you read the data sheets several times (the data sheets are typically pretty poor translations).

    There is also a web-site with some sample code:

    http://www.compsys1.com/workbench/

    Writing your own code allows you to tailor everything to your specific needs, without filling up a whole '876!

  3. #3
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Graphic LCD support?

    Dear All,

    i would like to use GLCD but i cannot do it as your discussion here.

    I only found on the net that PROTON and micro e are able to control very easy GLCD.

    The problem is that we are using now picbasic and i dont wont to change from that, i'm used to it.

    Is there any plan to see an update of the picbasic pro for supporting the GLCD?

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: Graphic LCD support?

    Did you search the forum for your particular model of GLCD?

    Did you start a thread asking for help on code or schematic?

    There's already several examples on these forums. Sometimes you can use techniques used for one model and customize it for another with just a few tweaks.

    There was one particular model that I had used that had no examples anywhere on the web. I started with the datasheet, found a "close model" and went on from there.

    Putting too much functionality into PICs is not necessarily a good idea, it takes up space. Imagine if all PICs now had DT's interrupt, barely enough room to LCDOUT "Hello" on most of them, if at all.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Graphic LCD support?

    yes i have searched for the GLCD 128x64 with Samsung KS0108.

    to be honest with Proton i did a grahpical model in less that 10 minutes.

    Is it so difficult to put a library for these GLCDs? I dont care for the PIC's space since there are 32x16 ones that can store an elephant in there.

    I just want my life to be easier and save time. I didnt ask for a code but for better features like proton and micro c

  6. #6
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Graphic LCD support...

    I'm currently working on a driver for the GLCD.
    Here you can see how far I got.
    Code:
    '****************************************************************
    '*  Name    : GLCD driver                                       *
    '*  Author  : Pedja089                                          *
    '****************************************************************
    ' LCD Commands are:
    '   Lcd_Init
    '   Lcd_SetX
    '   Lcd_SetY                                             
    '   Lcd_Clr
    '   Lcd_On
    
    '   @ PrintStr x,y, "string goes here"  ' will auto wrap to next line if needed
    '   @ PrintVar x,y, _anyvariablehere
    
    '   You can manually position x,y and print characters by the following:
    '   PosX = 0            ' move to position 0 of 83 (char best viewed at spacing of 6)
    '   PosY = 1            ' move to second line of 6
    '   Lcd_SetX
    '   Lcd_SetY 
    '   Lcd_Data = "H"      ' Note byte size single char.
    '   Gosub Lcd_SendChar
              
    
    
    symbol RW=portb.3
    symbol RS = portb.2
    symbol E = portb.4
    symbol CS1 = portb.0
    symbol CS2 = portb.1
    symbol RST = portb.5
    Symbol LCD_DATA=portd
    LCD_DATA=0
    TRISD=0
    output rst 
    Output RW
    Output RS
    Output E
    Output CS1
    Output CS2
    
    PosX            var Byte        ' Variable for Position X
    PosY            var Byte        ' Variable for Position Y
    GLCD_SX     var byte
    GLCD_X          var byte
    GLCD_FC              var Byte [5]    ' Variable 5 bytes = 1 character
    GLCD_CharNum         var byte        ' character number
    GLCD_VarData         var word        ' variable to print to lcd
    GLCD_n0              var byte        ' for next variable
    GLCD_n1              var byte
    GLCD_digits          var bit         ' number of digits in VarData
    GLCD_Addr  VAR WORD
    GLCD_Char  VAR byte ' lcdchardata[0]
    
    gosub Lcd_init
    
    goto OverLCD
    '_______________________________________________________________________________
    ' @ PrintVar macro function 
    ' format should look like this: @ PrintVar x,y, _anyvariable
    ASM
    PrintVar macro x, y, Variable   ; input values from: @PrintVar 0,1, _any_variable  
        local OverVar                
        goto OverVar                
    OverVar
        MOVE?CB  x, _GLCD_X
        MOVE?CB  x, _GLCD_SX
        MOVE?CB  y, _PosY          ; move y from above statement to PosY
        MOVE?WW  Variable, _GLCD_VarData ; move variable in statement to VarData
        L?CALL   _GLCD_VariableOut       ; call VariableOut function
        endm
    ENDASM
    
    GLCD_VariableOut:
        'for GLCD_n1 = 4 to 0 step -1        ' cycles through all possible digits of number
            Gosub Lcd_SetX
            Gosub Lcd_SetY         ' place character at position PosX and PosY
            GLCD_Char = (GLCD_VarData dig 2) + 48 ' digit number n to character str format
            gosub Lcd_SendChar        ' print char to screen
            PosX = PosX + 6           ' next x position for character
            Gosub Lcd_SetX
            Gosub Lcd_SetY         ' place character at position PosX and PosY
            GLCD_Char = (GLCD_VarData dig 1) + 48 ' digit number n to character str format
            gosub Lcd_SendChar        ' print char to screen
            PosX = PosX + 6           ' next x position for character
                    Gosub Lcd_SetX
            Gosub Lcd_SetY         ' place character at position PosX and PosY
            GLCD_Char = (GLCD_VarData dig 0) + 48 ' digit number n to character str format
            gosub Lcd_SendChar        ' print char to screen
            PosX = PosX + 6           ' next x position for character
    GLCD_SkipChar:        
        'next GLCD_n1
    return
    '_______________________________________________________________________________
    ASM
    PrintStr macro x, y, Str
        local TheString, OverStr
        goto OverStr
    TheString
        data  Str, 0
    OverStr
        MOVE?CB  x, _GLCD_X
        MOVE?CB  x, _GLCD_SX
        MOVE?CB  y, _PosY
        MOVE?CW  TheString, _GLCD_Addr
        L?CALL   _GLCD_StringOut
        endm
    ENDASM
    
    GLCD_StringOut:
        Readcode GLCD_Addr, GLCD_Char           ' Get a character
        if GLCD_Char = 0 then GLCD_StringDone   ' Look for Null char, Stop if found
           
        if glcd_x=> 123 then             ' If end of line, cycle to next line
            PosY = PosY + 1           
            glcd_x=GLCD_SX
        endif
        
        If glcd_x<64 then
         lcd_data=0
         cs1=0
         cs2=1
         posx=glcd_x
        else 
         lcd_data=0
         cs1=1
         cs2=0
         posx=glcd_x-64  
        endif   
        
        Gosub Lcd_SetX
        gosub Lcd_SetY 
        gosub Lcd_SendChar            ' puttext
        
        GLCD_Addr = GLCD_Addr + 1               ' Point to next character
        glcd_x=glcd_x + 1
        goto GLCD_StringOut                ' Continue with rest of the string
      GLCD_StringDone:
    return
    
    '_______________________________________________________________________________
    Lcd_SendChar:                                      
        lookdown GLCD_Char,_
        [" !\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],GLCD_CharNum
        GLCD_Char = GLCD_CharNum +32   
        sELECT CASE GLCD_Char                           
        Case 32                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$00:GLCD_FC(2)=$00:GLCD_FC(3)=$00:GLCD_FC(4)=$00 ' // sp
        Case 33                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$00:GLCD_FC(2)=$2f:GLCD_FC(3)=$00:GLCD_FC(4)=$00 ' // !
        Case 34                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$07:GLCD_FC(2)=$00:GLCD_FC(3)=$07:GLCD_FC(4)=$00 ' // " (shown as \ in Lookdown table)
        Case 35                   
            GLCD_FC(0)=$14:GLCD_FC(1)=$7f:GLCD_FC(2)=$14:GLCD_FC(3)=$7f:GLCD_FC(4)=$14 ' // #
        Case 36                   
            GLCD_FC(0)=$24:GLCD_FC(1)=$2a:GLCD_FC(2)=$7f:GLCD_FC(3)=$2a:GLCD_FC(4)=$12 ' // $
        Case 37                   
            GLCD_FC(0)=$c4:GLCD_FC(1)=$c8:GLCD_FC(2)=$10:GLCD_FC(3)=$26:GLCD_FC(4)=$46 ' // %
        Case 38                   
            GLCD_FC(0)=$36:GLCD_FC(1)=$49:GLCD_FC(2)=$55:GLCD_FC(3)=$22:GLCD_FC(4)=$50 ' // &
        Case 39                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$05:GLCD_FC(2)=$03:GLCD_FC(3)=$00:GLCD_FC(4)=$00 ' // '
        Case 40                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$1c:GLCD_FC(2)=$22:GLCD_FC(3)=$41:GLCD_FC(4)=$00 ' // (
        Case 41                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$41:GLCD_FC(2)=$22:GLCD_FC(3)=$1c:GLCD_FC(4)=$00 ' // )
        Case 42                   
            GLCD_FC(0)=$14:GLCD_FC(1)=$08:GLCD_FC(2)=$3E:GLCD_FC(3)=$08:GLCD_FC(4)=$14 ' // *
        Case 43                   
            GLCD_FC(0)=$08:GLCD_FC(1)=$08:GLCD_FC(2)=$3E:GLCD_FC(3)=$08:GLCD_FC(4)=$08 ' // +
        Case 44                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$00:GLCD_FC(2)=$50:GLCD_FC(3)=$30:GLCD_FC(4)=$00 ' // ,
        Case 45                   
            GLCD_FC(0)=$10:GLCD_FC(1)=$10:GLCD_FC(2)=$10:GLCD_FC(3)=$10:GLCD_FC(4)=$10 ' // -
        Case 46                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$60:GLCD_FC(2)=$60:GLCD_FC(3)=$00:GLCD_FC(4)=$00 ' // .
        Case 47                   
            GLCD_FC(0)=$20:GLCD_FC(1)=$10:GLCD_FC(2)=$08:GLCD_FC(3)=$04:GLCD_FC(4)=$02 ' // /
        Case 48                   
            GLCD_FC(0)=$3E:GLCD_FC(1)=$51:GLCD_FC(2)=$49:GLCD_FC(3)=$45:GLCD_FC(4)=$3E ' // 0
        Case 49                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$42:GLCD_FC(2)=$7F:GLCD_FC(3)=$40:GLCD_FC(4)=$00 ' // 1
        Case 50                   
            GLCD_FC(0)=$42:GLCD_FC(1)=$61:GLCD_FC(2)=$51:GLCD_FC(3)=$49:GLCD_FC(4)=$46 ' // 2
        Case 51                   
            GLCD_FC(0)=$21:GLCD_FC(1)=$41:GLCD_FC(2)=$45:GLCD_FC(3)=$4B:GLCD_FC(4)=$31 ' // 3
        Case 52                   
            GLCD_FC(0)=$18:GLCD_FC(1)=$14:GLCD_FC(2)=$12:GLCD_FC(3)=$7F:GLCD_FC(4)=$10 ' // 4
        Case 53                   
            GLCD_FC(0)=$27:GLCD_FC(1)=$45:GLCD_FC(2)=$45:GLCD_FC(3)=$45:GLCD_FC(4)=$39 ' // 5
        Case 54                   
            GLCD_FC(0)=$3C:GLCD_FC(1)=$4A:GLCD_FC(2)=$49:GLCD_FC(3)=$49:GLCD_FC(4)=$30 ' // 6
        Case 55                   
            GLCD_FC(0)=$01:GLCD_FC(1)=$71:GLCD_FC(2)=$09:GLCD_FC(3)=$05:GLCD_FC(4)=$03 ' // 7
        Case 56                   
            GLCD_FC(0)=$36:GLCD_FC(1)=$49:GLCD_FC(2)=$49:GLCD_FC(3)=$49:GLCD_FC(4)=$36 ' // 8
        Case 57                   
            GLCD_FC(0)=$06:GLCD_FC(1)=$49:GLCD_FC(2)=$49:GLCD_FC(3)=$29:GLCD_FC(4)=$1E ' // 9
        Case 58                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$36:GLCD_FC(2)=$36:GLCD_FC(3)=$00:GLCD_FC(4)=$00 ' // :
        Case 59                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$56:GLCD_FC(2)=$36:GLCD_FC(3)=$00:GLCD_FC(4)=$00 ' // ";"
        Case 60                   
            GLCD_FC(0)=$08:GLCD_FC(1)=$14:GLCD_FC(2)=$22:GLCD_FC(3)=$41:GLCD_FC(4)=$00 ' // <
        Case 61                   
            GLCD_FC(0)=$14:GLCD_FC(1)=$14:GLCD_FC(2)=$14:GLCD_FC(3)=$14:GLCD_FC(4)=$14 ' // =
        Case 62                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$41:GLCD_FC(2)=$22:GLCD_FC(3)=$14:GLCD_FC(4)=$08 ' // >
        Case 63                   
            GLCD_FC(0)=$02:GLCD_FC(1)=$01:GLCD_FC(2)=$51:GLCD_FC(3)=$09:GLCD_FC(4)=$06 ' // ?
        Case 64                   
            GLCD_FC(0)=$32:GLCD_FC(1)=$49:GLCD_FC(2)=$59:GLCD_FC(3)=$51:GLCD_FC(4)=$3E ' // @
        Case 65                   
            GLCD_FC(0)=$7E:GLCD_FC(1)=$11:GLCD_FC(2)=$11:GLCD_FC(3)=$11:GLCD_FC(4)=$7E ' // A
        Case 66                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$49:GLCD_FC(2)=$49:GLCD_FC(3)=$49:GLCD_FC(4)=$36 ' // B
        Case 67                   
            GLCD_FC(0)=$3E:GLCD_FC(1)=$41:GLCD_FC(2)=$41:GLCD_FC(3)=$41:GLCD_FC(4)=$22 ' // C
        Case 68                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$41:GLCD_FC(2)=$41:GLCD_FC(3)=$22:GLCD_FC(4)=$1C ' // D
        Case 69                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$49:GLCD_FC(2)=$49:GLCD_FC(3)=$49:GLCD_FC(4)=$41 ' // E
        Case 70                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$09:GLCD_FC(2)=$09:GLCD_FC(3)=$09:GLCD_FC(4)=$01 ' // F
        Case 71                   
            GLCD_FC(0)=$3E:GLCD_FC(1)=$41:GLCD_FC(2)=$49:GLCD_FC(3)=$49:GLCD_FC(4)=$7A ' // G
        Case 72                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$08:GLCD_FC(2)=$08:GLCD_FC(3)=$08:GLCD_FC(4)=$7F ' // H
        Case 73                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$41:GLCD_FC(2)=$7F:GLCD_FC(3)=$41:GLCD_FC(4)=$00 ' // I
        Case 74                   
            GLCD_FC(0)=$20:GLCD_FC(1)=$40:GLCD_FC(2)=$41:GLCD_FC(3)=$3F:GLCD_FC(4)=$01 ' // J
        Case 75                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$08:GLCD_FC(2)=$14:GLCD_FC(3)=$22:GLCD_FC(4)=$41 ' // K
        Case 76                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$40:GLCD_FC(2)=$40:GLCD_FC(3)=$40:GLCD_FC(4)=$40 ' // L
        Case 77                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$02:GLCD_FC(2)=$0C:GLCD_FC(3)=$02:GLCD_FC(4)=$7F ' // M
        Case 78                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$04:GLCD_FC(2)=$08:GLCD_FC(3)=$10:GLCD_FC(4)=$7F ' // N
        Case 79                   
            GLCD_FC(0)=$3E:GLCD_FC(1)=$41:GLCD_FC(2)=$41:GLCD_FC(3)=$41:GLCD_FC(4)=$3E ' // O
        Case 80                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$09:GLCD_FC(2)=$09:GLCD_FC(3)=$09:GLCD_FC(4)=$06 ' // P
        Case 81                   
            GLCD_FC(0)=$3E:GLCD_FC(1)=$41:GLCD_FC(2)=$51:GLCD_FC(3)=$21:GLCD_FC(4)=$5E ' // Q
        Case 82                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$09:GLCD_FC(2)=$19:GLCD_FC(3)=$29:GLCD_FC(4)=$46 ' // R
        Case 83                   
            GLCD_FC(0)=$46:GLCD_FC(1)=$49:GLCD_FC(2)=$49:GLCD_FC(3)=$49:GLCD_FC(4)=$31 ' // S
        Case 84                   
            GLCD_FC(0)=$01:GLCD_FC(1)=$01:GLCD_FC(2)=$7F:GLCD_FC(3)=$01:GLCD_FC(4)=$01 ' // T
        Case 85                   
            GLCD_FC(0)=$3F:GLCD_FC(1)=$40:GLCD_FC(2)=$40:GLCD_FC(3)=$40:GLCD_FC(4)=$3F ' // U
        Case 86                   
            GLCD_FC(0)=$1F:GLCD_FC(1)=$20:GLCD_FC(2)=$40:GLCD_FC(3)=$20:GLCD_FC(4)=$1F ' // V
        Case 87                   
            GLCD_FC(0)=$3F:GLCD_FC(1)=$40:GLCD_FC(2)=$38:GLCD_FC(3)=$40:GLCD_FC(4)=$3F ' // W
        Case 88                   
            GLCD_FC(0)=$63:GLCD_FC(1)=$14:GLCD_FC(2)=$08:GLCD_FC(3)=$14:GLCD_FC(4)=$63 ' // X
        Case 89                   
            GLCD_FC(0)=$07:GLCD_FC(1)=$08:GLCD_FC(2)=$70:GLCD_FC(3)=$08:GLCD_FC(4)=$07 ' // Y
        Case 90                   
            GLCD_FC(0)=$61:GLCD_FC(1)=$51:GLCD_FC(2)=$49:GLCD_FC(3)=$45:GLCD_FC(4)=$43 ' // Z
        Case 91                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$7F:GLCD_FC(2)=$41:GLCD_FC(3)=$41:GLCD_FC(4)=$00 ' // [
        Case 92                   
            GLCD_FC(0)=$02:GLCD_FC(1)=$04:GLCD_FC(2)=$08:GLCD_FC(3)=$10:GLCD_FC(4)=$20 ' // \  (we are using this for Case 34 " above)
        Case 93                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$41:GLCD_FC(2)=$41:GLCD_FC(3)=$7F:GLCD_FC(4)=$00 ' // ]
        Case 94                   
            GLCD_FC(0)=$04:GLCD_FC(1)=$02:GLCD_FC(2)=$01:GLCD_FC(3)=$02:GLCD_FC(4)=$04 ' // ^
        Case 95                   
            GLCD_FC(0)=$40:GLCD_FC(1)=$40:GLCD_FC(2)=$40:GLCD_FC(3)=$40:GLCD_FC(4)=$40 ' // _
        Case 96                   
    '        GLCD_FC(0)=$00:GLCD_FC(1)=$01:GLCD_FC(2)=$02:GLCD_FC(3)=$04:GLCD_FC(4)=$00 ' // ` 
            GLCD_FC(0)=$02:GLCD_FC(1)=$04:GLCD_FC(2)=$08:GLCD_FC(3)=$10:GLCD_FC(4)=$20 ' // \ (shown as ` in Lookdown table)
        Case 97                   
            GLCD_FC(0)=$20:GLCD_FC(1)=$54:GLCD_FC(2)=$54:GLCD_FC(3)=$54:GLCD_FC(4)=$78 ' // a
        Case 98                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$48:GLCD_FC(2)=$44:GLCD_FC(3)=$44:GLCD_FC(4)=$38 ' // b
        Case 99                   
            GLCD_FC(0)=$38:GLCD_FC(1)=$44:GLCD_FC(2)=$44:GLCD_FC(3)=$44:GLCD_FC(4)=$20 ' // c
        Case 100                   
            GLCD_FC(0)=$38:GLCD_FC(1)=$44:GLCD_FC(2)=$44:GLCD_FC(3)=$48:GLCD_FC(4)=$7F ' // d
        Case 101                   
            GLCD_FC(0)=$38:GLCD_FC(1)=$54:GLCD_FC(2)=$54:GLCD_FC(3)=$54:GLCD_FC(4)=$18 ' // e
        Case 102                   
            GLCD_FC(0)=$08:GLCD_FC(1)=$7E:GLCD_FC(2)=$09:GLCD_FC(3)=$01:GLCD_FC(4)=$02 ' // f
        Case 103                   
            GLCD_FC(0)=$0C:GLCD_FC(1)=$52:GLCD_FC(2)=$52:GLCD_FC(3)=$52:GLCD_FC(4)=$3E ' // g
        Case 104                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$08:GLCD_FC(2)=$04:GLCD_FC(3)=$04:GLCD_FC(4)=$78 ' // h
        Case 105                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$44:GLCD_FC(2)=$7D:GLCD_FC(3)=$40:GLCD_FC(4)=$00 ' // i
        Case 106                   
            GLCD_FC(0)=$20:GLCD_FC(1)=$40:GLCD_FC(2)=$44:GLCD_FC(3)=$3D:GLCD_FC(4)=$00 ' // j
        Case 107                   
            GLCD_FC(0)=$7F:GLCD_FC(1)=$10:GLCD_FC(2)=$28:GLCD_FC(3)=$44:GLCD_FC(4)=$00 ' // k
        Case 108                   
            GLCD_FC(0)=$00:GLCD_FC(1)=$41:GLCD_FC(2)=$7F:GLCD_FC(3)=$40:GLCD_FC(4)=$00 ' // l
        Case 109                   
            GLCD_FC(0)=$7C:GLCD_FC(1)=$04:GLCD_FC(2)=$18:GLCD_FC(3)=$04:GLCD_FC(4)=$78 ' // m
        Case 110                   
            GLCD_FC(0)=$7C:GLCD_FC(1)=$08:GLCD_FC(2)=$04:GLCD_FC(3)=$04:GLCD_FC(4)=$78 ' // n
        Case 111                   
            GLCD_FC(0)=$38:GLCD_FC(1)=$44:GLCD_FC(2)=$44:GLCD_FC(3)=$44:GLCD_FC(4)=$38 ' // o
        Case 112                   
            GLCD_FC(0)=$7C:GLCD_FC(1)=$14:GLCD_FC(2)=$14:GLCD_FC(3)=$14:GLCD_FC(4)=$08 ' // p
        Case 113                   
            GLCD_FC(0)=$08:GLCD_FC(1)=$14:GLCD_FC(2)=$14:GLCD_FC(3)=$18:GLCD_FC(4)=$7C ' // q
        Case 114                   
            GLCD_FC(0)=$7C:GLCD_FC(1)=$08:GLCD_FC(2)=$04:GLCD_FC(3)=$04:GLCD_FC(4)=$08 ' // r
        Case 115                   
            GLCD_FC(0)=$48:GLCD_FC(1)=$54:GLCD_FC(2)=$54:GLCD_FC(3)=$54:GLCD_FC(4)=$20 ' // s
        Case 116                   
            GLCD_FC(0)=$04:GLCD_FC(1)=$3F:GLCD_FC(2)=$44:GLCD_FC(3)=$40:GLCD_FC(4)=$20 ' // t
        Case 117                   
            GLCD_FC(0)=$3C:GLCD_FC(1)=$40:GLCD_FC(2)=$40:GLCD_FC(3)=$20:GLCD_FC(4)=$7C ' // u
        Case 118                   
            GLCD_FC(0)=$1C:GLCD_FC(1)=$20:GLCD_FC(2)=$40:GLCD_FC(3)=$20:GLCD_FC(4)=$1C ' // v
        Case 119                   
            GLCD_FC(0)=$3C:GLCD_FC(1)=$40:GLCD_FC(2)=$30:GLCD_FC(3)=$40:GLCD_FC(4)=$3C ' // w
        Case 120                    
            GLCD_FC(0)=$44:GLCD_FC(1)=$28:GLCD_FC(2)=$10:GLCD_FC(3)=$28:GLCD_FC(4)=$44 ' // x 
        Case 121                    
            GLCD_FC(0)=$0C:GLCD_FC(1)=$50:GLCD_FC(2)=$50:GLCD_FC(3)=$50:GLCD_FC(4)=$3C ' // y 
        Case 122                    
            GLCD_FC(0)=$44:GLCD_FC(1)=$64:GLCD_FC(2)=$54:GLCD_FC(3)=$4C:GLCD_FC(4)=$44 ' // z 
        case 123
    '        GLCD_FC(0)=$00:GLCD_FC(1)=$08:GLCD_FC(2)=$36:GLCD_FC(3)=$41:GLCD_FC(4)=$00'  // {
            GLCD_FC(0)=$10:GLCD_FC(1)=$24:GLCD_FC(2)=$20:GLCD_FC(3)=$24:GLCD_FC(4)=$10 ' // Smily face (shown as { in Lookdown table)
        case 124
    '        GLCD_FC(0)=$00:GLCD_FC(1)=$00:GLCD_FC(2)=$7F:GLCD_FC(3)=$00:GLCD_FC(4)=$00 ' // |
            GLCD_FC(0)=$20:GLCD_FC(1)=$40:GLCD_FC(2)=$20:GLCD_FC(3)=$10:GLCD_FC(4)=$08 ' // Tick (shown as | in Lookdown table)
        case 125
    '        GLCD_FC(0)=$00:GLCD_FC(1)=$41:GLCD_FC(2)=$36:GLCD_FC(3)=$08:GLCD_FC(4)=$00'  // }    
            GLCD_FC(0)=$20:GLCD_FC(1)=$14:GLCD_FC(2)=$10:GLCD_FC(3)=$14:GLCD_FC(4)=$20 ' // Frown face (shown as } in Lookdown table)
        case 126
            GLCD_FC(0)=$10:GLCD_FC(1)=$08:GLCD_FC(2)=$08:GLCD_FC(3)=$10:GLCD_FC(4)=$08'  // ~
    '    case 127
    '        GLCD_FC(0)=$10:GLCD_FC(1)=$08:GLCD_FC(2)=$08:GLCD_FC(3)=$10:GLCD_FC(4)=$08'  // DEL        
    '    Case 128
    '        GLCD_FC(0)=$55:GLCD_FC(1)=$2A:GLCD_FC(2)=$55:GLCD_FC(3)=$2A:GLCD_FC(4)=$55 ' // 55 (shaded)
        end SELECT
        for GLCD_n0 = 0 to 4
       
         If glcd_x=64 then
               lcd_data=0
               cs1=1
               cs2=0
               posx=0 
               gosub lcd_setx
               gosub lcd_sety
         endif
         glcd_x=glcd_x + 1
         lcd_data=GLCD_FC(GLCD_n0)
         GOSUB Lcd_Pod
        next GLCD_n0
        return
    '_______________________________________________________________________________
    
    Lcd_Init:
     posx=0
     posy=0
     rw=0
     cs1=0
     cs2=0
     e=1
     LCD_DATA=0
     rst=0
     pause 1
     rst=1
     cs1=1
     cs2=1
     gosub Lcd_On
     LCD_DATA=192
     gosub Lcd_Kom
     gosub Lcd_clr
    return
    
    
    Lcd_Pod:
        rs=1
        e=0
        pauseus 1
        e=1
        pauseus 1
    return
    Lcd_Kom:
        rs=0
        e=0
        pauseus 1
        e=1
        pauseus 1
    return
    
    Lcd_SetX:
        LCD_DATA=64+posx
        gosub Lcd_Kom
    return
    
    Lcd_SetY:
        LCD_DATA=184+posy
        gosub Lcd_Kom
    return
    
    Lcd_Clr:
     for GLCD_n0=0 to 7
      posy=GLCD_n0
      gosub Lcd_SetY
      posx=0 
      gosub Lcd_SetX
      LCD_DATA=0
      for GLCD_n1=0 to 63
       gosub Lcd_pod
      next GLCD_n1
     next GLCD_n0
    return
    
    Lcd_Off:
    LCD_DATA=62
    gosub Lcd_kom
    return
    
    Lcd_On:
    LCD_DATA=63
    gosub Lcd_Kom
    return
    
    OverLCD:
    Code:
    include "glcd.pbp"
    z var byte
    z=12
        pause 2000
    pocetak:
    @ PrintStr 1,0,"Some text and move to second line if first line isn't enought bla bla"
    PAUSE 2000
    @ PrintStr 7,4,"test"
    '@ PrintVar 3,6, _z ' I allways get random number
    pause 1000
    end
    Text works correctly, but the variable can not make it to work.
    Code is not mine, I downloaded it from the forum and make some changes.

  7. #7
    Join Date
    Oct 2010
    Posts
    413


    Did you find this post helpful? Yes | No

    Default Re: Graphic LCD support?

    that's very interesting, thank you a lot.

    But why they dont make one for all of us?

Similar Threads

  1. Is this code not initialising the LCD properly?
    By Platypus in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th January 2010, 19:14
  2. 16f688 LCD what have I done wrong
    By spitfiredriver in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 8th August 2009, 19:54
  3. Play with LCD on PICDEM
    By The IceMan in forum mel PIC BASIC
    Replies: 5
    Last Post: - 22nd August 2008, 16:56
  4. Need help with LCD number display.
    By Steve Matson in forum mel PIC BASIC
    Replies: 8
    Last Post: - 26th June 2007, 23:07
  5. LCD will not start
    By btaylor in forum mel PIC BASIC Pro
    Replies: 49
    Last Post: - 24th May 2007, 02:30

Members who have read this thread : 0

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