Writing custom characters to LCD display


Closed Thread
Results 1 to 40 of 60

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Anthony,

    There are 8 Custom Character locations. The location is selected by sending a command with the following format.
    %01xxx000 where xxx is the location 0-7

    location 0 = %01000000 = $40 = 64
    location 1 = %01001000 = $48 = 72
    location 2 = %01010000 = $50 = 80
    location 3 = %01011000 = $58 = 88
    location 4 = %01100000 = $60 = 96
    location 5 = %01101000 = $68 = 104
    location 6 = %01110000 = $70 = 112
    location 7 = %01111000 = $78 = 120

    The location is followed by 8 bytes of character data. Each byte represents 1 row of 5 dots from left to right. The upper 3 bits are ignored. You need to send all 8 rows, even if the character doesn't use them all.
    The 8th row is normally reserved for the Cursor.

    Using the examples from Ingvar & badrad you get these characters


    Code:
    Speaker LCDOUT $FE,$60,$02,$06,$1a,$1a,$1a,$06,$02,$00
    
    $02=%00010     X 
    $06=%00110    XX 
    $1a=%11010  XX X 
    $1a=%11010  XX X 
    $1a=%11010  XX X 
    $06=%00110    XX 
    $02=%00010     X 
    $00=%00000
    
    battery LCDOUT $FE,$78,$06,$0f,$0f,$0f,$0f,$0f,$0f,$00
    
    $06=%00110   XX 
    $0f=%01111  XXXX
    $0f=%01111  XXXX
    $0f=%01111  XXXX
    $0f=%01111  XXXX
    $0f=%01111  XXXX
    $0f=%01111  XXXX
    $00=%00000
    
    smiley LCDOUT $FE,$60,$00,$0a,$0a,$00,$00,$11,$0e,$00
    
    $00=%00000 
    $0a=%01010   X X 
    $0a=%01010   X X 
    $00=%00000
    $00=%00000
    $11=%10001  X   X
    $0e=%01110   XXX 
    $00=%00000
    
    Sad LCDOUT $FE,$78,$00,$0a,$0a,$00,$00,$0e,$11,$00
    
    $00=%00000
    $0a=%01010   X X 
    $0a=%01010   X X 
    $00=%00000
    $00=%00000
    $0e=%01110   XXX 
    $11=%10001  X   X
    $00=%00000
    To use the values from the Custom Character Generator you mentioned. You can either use the values that it creates, or you can subtract 128 to get values that resemble the examples here. The upper 3 bits of each byte is ignored by the display, so it will work either way.

    HTH,
    Last edited by Darrel Taylor; - 21st August 2012 at 20:16.

Similar Threads

  1. LCD Display
    By lambert in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th January 2010, 22:18
  2. assembly in Pic
    By lerameur in forum Off Topic
    Replies: 11
    Last Post: - 1st May 2008, 20:06
  3. Replies: 14
    Last Post: - 26th September 2007, 05:41
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  5. LCD Display not working - PIC heating...
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 24th September 2006, 07:35

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