Writing custom characters to LCD display


Closed Thread
Results 1 to 40 of 60

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Smile thanks!!!

    Darren,
    Thanks, I got it now. Keep up the good work!
    Padawan-78

  2. #2
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Talking my small contribution

    Hey everyone,
    I thought I would try contribute instead of just take from this great forum.
    Here are 2 symbols I came up with for the Holidays using Darren's Character generator.
    Both require 4x20 LCD of space.
    I also figured out that you can redefine 8 custom characters as many times as you want...in loops only. You just have to be careful about how you go back and forth between the loops.
    enjoy

    halloween:
    LCDOUT 254,64,8,17,3,7,15,15,29,29 ' Cust Char #0 PUMPKIN
    LCDOUT 254,72,12,31,31,14,31,31,27,27 ' Cust Char #1
    LCDOUT 254,80,2,17,24,28,30,30,23,23 ' Cust Char #2
    LCDOUT 254,88,29,30,14,7,7,19,8,0 ' Cust Char #3
    LCDOUT 254,96,31,21,21,0,10,31,31,0 ' Cust Char #4
    LCDOUT 254,104,23,15,14,28,28,25,2,0 ' Cust Char #5
    LCDOUT 254,112,8,16,10,6,1,1,6,8 ' Cust Char #6 PUMPKIN VINE

    lcdout 254, 1
    lcdout $FE,Row1+3, 6
    LCDOUT $FE,Row2+2, 0
    LCDOUT $FE,Row2+3, 1
    LCDOUT $FE,Row2+4, 2," Happy "
    LCDOUT $FE,Row3+2, 3
    LCDOUT $FE,Row3+3, 4
    LCDOUT $FE,Row3+4, 5," Halloween "
    pause 5000
    goto halloween

    christmas:
    LCDOUT 254,64,4,8,7,31,3,8,4,0 ' Cust Char #0 Christmas Star
    LCDOUT 254,72,14,27,17,0,17,27,14,14 ' Cust Char #1
    LCDOUT 254,80,4,2,28,31,24,2,4,0 ' Cust Char #2
    LCDOUT 254,88,4,4,4,21,21,4,14,14 ' Cust Char #3
    LCDOUT 254,96,14,14,14,4,4,4,21,21 ' Cust Char #4
    LCDOUT 254,104,21,4,4,4,4,4,0,0 ' Cust Char #5
    lcdout 254, 1
    lcdout $FE,Row1+3, 3
    LCDOUT $FE,Row2+2, 0
    LCDOUT $FE,Row2+3, 1
    LCDOUT $FE,Row2+4, 2," MERRY "
    LCDOUT $FE,Row3+3, 4," CHRISTMAS"
    LCDOUT $FE,Row4+3, 5
    pause 5000
    goto christmas
    Padawan-78

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


    Did you find this post helpful? Yes | No

    Default

    nice job earltyso!
    Steve

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

  4. #4
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    Hi, i have written this program to make custom character on 2*16 LCD but LCD shows nothing.i use picbasic pro and PIC16F877A. what's the problem?

    define OSC 4
    ' Set LCD Data port
    DEFINE LCD_DREG PORTC
    ' Set starting Data bit (0 or 4) if 4-bit bus
    DEFINE LCD_DBIT 4
    ' Set LCD Register Select port
    DEFINE LCD_RSREG PORTC
    ' Set LCD Register Select bit
    DEFINE LCD_RSBIT 1
    ' Set LCD Enable port
    DEFINE LCD_EREG PORTC
    ' Set LCD Enable bit
    DEFINE LCD_EBIT 0
    ' Set LCD bus size (4 or 8 bits)
    DEFINE LCD_BITS 4
    ' Set number of lines on LCD
    DEFINE LCD_LINES 2
    'Making lcd ready
    pause 100
    lcdout $fe,1

    m var byte
    n var byte
    m=25
    n=98


    lcdout $fe,$40,$08,$04,$02,$01,$01,$02,$04,$08
    lcdout $fe,$14
    lcdout $fe,$00,$00,$07,$07,$1F,$00,$00,$00
    lcdout $fe,$14
    lcdout $fe,$04,$04,$04,$04,$07,$00,$00,$00
    lcdout $fe,$14
    lcdout ":",#m,".",#n
    end

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by amindzo View Post
    Hi, i have written this program to make custom character on 2*16 LCD but LCD shows nothing.i use picbasic pro and PIC16F877A. what's the problem?
    If you study post #2 of this thread, you'll find your problem...

  6. #6
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    i have studied that post but i still have problem. post 2 just specify the 8 location but LCD is 2*16.what about other locations?

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by amindzo View Post
    i have studied that post but i still have problem. post 2 just specify the 8 location but LCD is 2*16.what about other locations?
    The 8 locations are memory locations in the LCD.

    Take a look at post #32
    Copy that code.
    Dave
    Always wear safety glasses while programming.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by amindzo View Post
    i have studied that post but i still have problem. post 2 just specify the 8 location but LCD is 2*16.what about other locations?
    If you had studied post #2 (and the rest of the posts), you'd notice that you can only program the first 8 locations in the LCD's ram.
    You may be setting up the first few custom characters in the LCD ram, but you surely aren't trying to display them...

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