Big characters on HD44780 4x20


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    There's some DT's... wich are some DT's tricks... by DT itself

    Oh sure there's still other ways... Some DT's could be changed with DA but must develop a different approach. Internal EEPROM.. sir'84 64 Bytes, F877... DOH! seems i missed it 256 Bytes ... OK! OK!

    The challenge is with the complicated 16F84A,Not sure if it turns me on..

    BUT... Oh Darrel... This is a perfect situation to know if those you have on hand works
    Last edited by mister_e; - 4th January 2007 at 04:42.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    OK, a bit better, but there's still place for improvement
    486 words
    Code:
    DEFINE LOADER_USED 1
    Define OSC 4
    DEFINE LCD_DREG PORTD     ' LCD data port 
    DEFINE LCD_DBIT 4         ' LCD data starting bit 0 or 4 
    DEFINE LCD_RSREG PORTD    ' LCD register select port 
    DEFINE LCD_RSBIT 2        ' LCD register select bit 
    DEFINE LCD_EREG PORTD     ' LCD enable port 
    DEFINE LCD_EBIT 3         ' LCD enable bit 
    DEFINE LCD_BITS 4         ' LCD bus size 4 or 8 
    DEFINE LCD_LINES 4        ' Number lines on LCD 
    DEFINE LCD_COMMANDUS 2000 ' Command delay time in us 
    DEFINE LCD_DATAUS 50      ' Data delay time in us 
    
        Clr     CON 1
        Comm    con $FE
        EOL     con $FC
        Dx      con $14
        Line    var byte[4]
            line[0]=$80
            line[1]=$C0
            line[2]=$94
            line[3]=$D4
    
        Zero    data 5,0,0,4,EOL
                data $FF,Comm,Dx,Comm,Dx,$FF,EOL
                data $FF,Comm,Dx,Comm,Dx,$FF,EOL
                data 2,1,1,3,EOL
                data 5
        
        One     data Comm,Dx,5,$ff,EOL
                data Comm,Dx,Comm,Dx,$ff,EOL
                data Comm,Dx,Comm,Dx,$ff,EOL
                data Comm,Dx,Comm,Dx,$ff,EOL
                data 5;3
        
        Two     data 0,0,0,4,EOL
                data Comm,Dx,Comm,Dx,Comm,Dx,$ff,EOL
                data 5,0,0,0,EOL
                data $ff,1,1,1,EOL
                data 5
              
        Three   data 0,0,0,4,EOL
                data Comm,Dx,Comm,Dx,Comm,Dx,$ff,EOL
                data Comm,Dx,0,0,$ff,EOL
                data 1,1,1,3,EOL
                data 5    
        
        Four    data $ff,Comm,Dx,Comm,Dx,$FF,EOL
                data $ff,Comm,Dx,Comm,Dx,$ff,EOL
                data 0,0,0,$ff,EOL
                data Comm,Dx,Comm,Dx,Comm,Dx,$ff,EOL
                data 5    
        
        Five    data $FF,0,0,0,EOL
                data $ff,EOL
                data 0,0,0,4,EOL
                data 1,1,1,3,EOL
                data 5    
        
        Six     data 5,0,0,EOL
                data $ff,EOL
                data $ff,0,0,4,EOL
                data 2,1,1,3,EOL
                data 5    
        
        Seven   data 0,0,0,4,EOL
                data Comm,Dx,Comm,Dx,comm,dx,$ff,EOL
                data Comm,Dx,Comm,Dx,comm,dx,$ff,EOL
                data Comm,Dx,Comm,Dx,Comm,Dx,$ff,EOL
                data 5    
                
        Eight   data 5,0,0,4,EOL
                data 2,1,1,3,EOL
                data 5,0,0,4,EOL
                data 2,1,1,3,EOL
                data 5
        
        Nine    data 5,0,0,4,EOL
                data 2,1,1,$ff,EOL
                data Comm,Dx, Comm,Dx,Comm,Dx,$ff,EOL
                data Comm,Dx,1,1,3,EOL
                data 5
                        
        Punto   data EOL
                data EOL
                data EOL
                data 7,EOL
                data 2
    
        offset      var byte 
        index       var byte 
        Char        var byte 
        ActualLine  var byte 
        CounterA    var word 
        CounterB    var byte 
        Number      var byte 
        Pattern     var word[11]
            pattern[0]=zero
            pattern[1]=one
            Pattern[2]=two
            pattern[3]=three
            pattern[4]=four
            Pattern[5]=Five
            Pattern[6]=Six
            Pattern[7]=Seven
            pattern[8]=eight
            pattern[9]=Nine
            pattern[10]=Punto
            
        pause 500
    DumpCustChar:
        index=0
        repeat
            lookup index,[Comm,64,31,31,31,31,0,0,0,0,_      ; Cust Char #0  
                          Comm,72,0,0,0,0,31,31,31,31,_      ; Cust Char #1  
                          Comm,80,31,31,31,15,7,3,1,0,_      ; Cust Char #2  
                          Comm,88,31,31,31,30,28,24,16,0,_   ; Cust Char #3  
                          Comm,96,0,16,24,28,30,31,31,31,_   ; Cust Char #4  
                          Comm,104,0,1,3,7,15,31,31,31,_     ; Cust Char #5  
                          Comm,112,31,31,31,31,31,31,31,31,_ ; Cust Char #6  
                          Comm,120,0,0,0,14,31,31,31,14],char; Cust Char #7  
            lcdout char
            index=index+1
            until index=80
    
    Main:  
        countera=0
        repeat
            offset=0
            lcdout comm,clr
            counterb=3
            repeat
                number=countera dig counterb
                gosub displaynumber
                counterb=counterb-1
                until counterb=255
            pause 10
            countera=countera+1
            until countera=10000
            goto main
    
    DisplayNumber:
        actualline=0
        index=0
        lcdout comm,line[0]+offset
        Loop:
            read pattern[number]+index,char
            if char!=eol then 
                if actualline<4 then
                    lcdout char
                    else
                        offset=offset+char
                        Goto GetOut
                    endif
                else
                    actualline=actualline+1
                    if actualline<4 then lcdout comm,line[actualline]+offset
                endif
            index=index+1
            goto loop
        GetOut:
            RETURN
    No more asm lines... still nice... but as i said, still place for improvement.
    Last edited by mister_e; - 4th January 2007 at 05:51.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Only the first 8 characters.
    By timseven in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd September 2009, 01:43
  2. Big big big memory or tiny SDs!
    By Ron Marcus in forum Off Topic
    Replies: 9
    Last Post: - 25th May 2007, 18:02
  3. Led scrolling display: How to mirror characters?
    By mahia2005 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th May 2007, 03:25
  4. LCD 16 characters inline: only first 8 work
    By Mugel in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 20th October 2006, 22:07
  5. LCD 4x20 HD44780
    By inteco in forum mel PIC BASIC
    Replies: 13
    Last Post: - 27th June 2006, 16:52

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