Writing custom characters to LCD display - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 60 of 60
  1. #41
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    These answers are so easy.

    Why do they always turn into personal attacks.

    If they don't get it. Explain it again.
    Maybe your version will make more sense.
    <br>
    DT

  2. #42
    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 Darrel Taylor View Post
    These answers are so easy.

    Why do they always turn into personal attacks.

    If they don't get it. Explain it again.
    Maybe your version will make more sense.
    <br>
    No personal attack intended. I thought post #32 explained it...

    There are 8 memory locations on most LCDs, starting at $40 and ending at $78. Each custom character will be at one of these locations.
    character 0 = $40
    character 1= $48
    character 2 = $50
    character 3= $58
    character 4 = $60
    character 5= $68
    character 6 = $70
    character 7= $78

    In your code
    Code:
    lcdout $fe,$40,$08,$04,$02,$01,$01,$02,$04,$08
    writes your character to "0" position. or character 0

    To display that character on the first line, first space
    Code:
    LCDOUT $FE,1,0
    second space
    Code:
    LCDOUT $FE,$81,0
    If you have a character in the second memory location
    lcdout $fe,$48,$08,$04,$02,$01,$01,$02,$04,$08


    To display that character on the first line, first space
    Code:
    LCDOUT $FE,1,1
    second space
    Code:
    LCDOUT $FE,$81,1
    Last edited by mackrackit; - 5th October 2008 at 13:00.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    Sorry Dave, wasn't refering to you.

    But your new explanation might help someone.
    <br>
    DT

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


    Did you find this post helpful? Yes | No

    Default

    thanks for your help,i wrote my character on LCD but what should i do if i want to write all 16 character on LCD in both line 1 and 2? we just have 8 location for RAM.should i overwrite on location 0 to 7 again? is my character in first 8 space deleted or it continue writing automatically on next 8 space?

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


    Did you find this post helpful? Yes | No

    Default

    Not sure I understand.

    The LCD can store 8 custom characters. You can display any of them as many times as you want. You can use one and fill all of the display places on the LCD.

    Back up on post #32 shows how.
    Dave
    Always wear safety glasses while programming.

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


    Did you find this post helpful? Yes | No

    Default

    i want to write a sentence with 32 character in another language (not English) on LCD.(so i have to make new fonts) how can i show these 32 character on a 2*16 LCD?

  7. #47
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    The custom character is just stored at the custom character location. On screen appears a 'copy' of that, not the character itself, if you understand what I mean.

    So, you can creat up to 8 characters, store them at their place, and then display that character to the location you want, as many times you want. The LCD just copies the custom character to the location on-screen you specify. Isn't this the same when you display e.g. "AAAAA"?

    But remember, when you power off, all are gone. You have to reload the characters on power up.

    Ioannis

  8. #48
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    It seems that you posted the same time as I did!

    Now I understand what you want. No, you cannot do that the simple way of "blah blah blah".

    You have to fetch each character on its own. Unless, the magician Darrel has another macro available to do the job!

    Ioannis

  9. #49
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Ioannis View Post
    You have to fetch each character on its own. Unless, the magician Darrel has another macro available to do the job!
    I don't think even Darrel has the magical mystical powers to pull this one off...at least not with a standard parallel LCD.

  10. #50
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    i want to write this sentence on LCD(this sentence is in Farsi language):
    دما و رطوبت را وارد کنید
    i have made the new fonts but i have a problem to show all of the sentence on LCD.how can i show all these custom fonts on LCD in 2 lines (the first 14 on first line and the next on second line).
    i put دما in location 0,1 and 2 of RAM and show it on lcd and then make one space with lcdout" " and put the رطوبت in location 0,1,2,3,4 of RAM and when i wan to show it. it doesn't shows those 2 words, it's just shows the second word.( not completed),what's the problem?

  11. #51
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    When you put the second group of characters at locations 0,1,2,3 don't you overwrite the previous characters?

    The problem as I understand is that you need many characters and you have only 8 available.

    One solution would be to constantly reload the custom characters with the ones you want to display. But you cannot display them at the same time...

    Ioannis

  12. #52
    Join Date
    Aug 2006
    Location
    Iran
    Posts
    94


    Did you find this post helpful? Yes | No

    Default

    yes, i need too many character and just 8 available so there is no way unfortunately.

  13. #53
    Join Date
    Oct 2009
    Location
    MEXICO
    Posts
    2


    Did you find this post helpful? Yes | No

    Unhappy Trying to make an example !!!

    HI DEAR ELECTRONIC HOBBYST:

    I'M FROM MEXICO AND I REALLY WANT TO LEARN ABOUT THIS TOPIC HOW TO CREATE MY OWN CHARACTER, BUT I DON'T REALLY KNOW HWAT HAPPENED I HAVE TROUBLES ON THE SIMULATION WITH PROTEUS ALL OF YOUR EXAMPLES AND ONLY ONE WORKS THE EXAMPLE THAT IS POSTED ON THE NUMBER 8, BATT LEVEL BUT ALL OF THE OTHER ONES DOESN'T WORKS I HAVE TRIED IN MANY WAYS, I USE PIC BASIC PRO TRYING TO CHARGE MY OWN PROGRAM ON A PIC16F877A CHEK IT OUT !

    COULD SOMEBODY TELL ME WHAT'S GOING WRONG ??

    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 1
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 3
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 2
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 140

    DEFINE ADC_BITS 8
    DEFINE ADC_CLOCK 4
    DEFINE ADC_SAMPLEUS 50

    ADCON1=%00001110
    TRISA=%111111
    TRISB=%00000000
    TRISC=%00000000
    TRISD=%00000000
    TRISE=%000
    PORTA=0
    PORTB=0
    PORTC=0
    PORTD=0
    PORTE=0
    LoopCount VAR BYTE
    Clear

    LCDOut $FE,$60,$00,$0a,$0a,$00,$00,$11,$0e,$00 ; #4 Smiley Face


    Pause 1000

    MAIN

    For LoopCount = 1 TO 80
    LCDOut 4
    Next LoopCount

    GoTo MAIN


    THANKS FOR YOUR ATTENTION AND IF SOMEBODY COULD TELL ME HOW TO PUT IN ON WORKING, THAT COULD BE GREATE !! SEE YOU SOON HAVE A NICE DAY

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


    Did you find this post helpful? Yes | No

    Default

    Maybe try
    Code:
    LCDOUT $FE,1,4
    Dave
    Always wear safety glasses while programming.

  15. #55
    Join Date
    Oct 2009
    Location
    MEXICO
    Posts
    2


    Did you find this post helpful? Yes | No

    Talking Thanks man !!

    HEY DAVE, THANKS A LOT MAN I REALLY APRECIATE THAT HELP BY YOURSELF.
    YEAH, I KNOW I SHOULD WEAR SAFETY GLASSES WHEN I'M PROGRAMMING jajaja WILL NOT BE DE DEVIL IF I KILL MYSELF PROGRAMMING WITHOUT IT !! jaja WELL LET ME TRY ANOTHER EXAMPLES MAN

    THANKS A LOT AGAIN

  16. #56
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    579


    Did you find this post helpful? Yes | No

    Default

    I try to display some characters, using this code :
    Code:
    ; http://www.darreltaylor.com/files/CustChar.htm
    
      LCDOUT  $FE,$40,$04,$0A,$04,$00,$00,$00,$00,$00  ' Cust Char #0      degree Celsius
      LCDOUT  $FE,$48,$0A,$1F,$11,$11,$11,$11,$11,$1F  ' Cust Char #1      empty batt
      LCDOUT  $FE,$50,$0A,$1F,$11,$11,$11,$11,$1F,$1F  ' Cust Char #2      1/5 batt
      LCDOUT  $FE,$58,$0A,$1F,$11,$11,$11,$1F,$1F,$1F  ' Cust Char #3      2/5 batt
      LCDOUT  $FE,$60,$0A,$1F,$11,$11,$1F,$1F,$1F,$1F  ' Cust Char #4      3/5 batt
      LCDOUT  $FE,$68,$0A,$1F,$11,$1F,$1F,$1F,$1F,$1F  ' Cust Char #5      4/5 batt
      LCDOUT  $FE,$70,$0A,$1F,$1F,$1F,$1F,$1F,$1F,$1F  ' Cust Char #6      full batt
    .....
    Code:
    char_batt:
    batt = TmpW / 100        ; (TmpW is war word ; reading ADC)
    select case batt
    case batt < 105
    char = 1
    case batt => 105 and batt =< 115 
    char = 2
    case batt => 116 and batt =< 125
    char = 3
    case batt => 126 and batt =< 130
    char = 4
    case batt => 131 and batt < 144
    char = 5
    case batt => 144
    char = 6
    end select
    return
    ...
    Code:
    if (temperature2/100) =>10 then
    LcdOut $FE, $c0, "O:", Sign2, DEC (Temperature2 / 100), ".", DEC Temperature2 dig 1, 0 , " " , char ," ", dec TmpW dig 4,dec TmpW dig 3,",",dec TmpW dig 2
    else
    LcdOut $FE, $C0, "O:", Sign2, $14, DEC (Temperature2 / 100), ".", DEC Temperature2 dig 1, 0 , " ", char , " ", dec TmpW dig 4,dec TmpW dig 3,",",dec TmpW dig 2
    endif
    But I have on display just char # 1 ; do not change in # 2 to 5 ...
    What I do wrong ? Thanks !

  17. #57
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    579


    Did you find this post helpful? Yes | No

    Default Re: Writing custom characters to LCD display

    Custom characters...
    and results (no changes).
    Attached Images Attached Images   

  18. #58
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    579


    Did you find this post helpful? Yes | No

    Default Re: Writing custom characters to LCD display

    I found another way :
    Code:
    char_batt:
    if TmpW dig 3=0 then symb = 1
    if TmpW dig 3=1 then symb = 2
    if TmpW dig 3=2 then symb = 3
    if TmpW dig 3=3 then symb = 4
    if TmpW dig 3=4 then symb = 5
    return

  19. #59
    Join Date
    Jan 2011
    Location
    Skopje,Macedonia
    Posts
    71


    Did you find this post helpful? Yes | No

    Default Re: Writing custom characters to LCD display

    How many costum characters can I make to show on LCD display and If I write a text,and I want to show a character,will be the character stored in the memory of the LCD,or the text will be stored?

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


    Did you find this post helpful? Yes | No

    Default Re: Writing custom characters to LCD display

    Dave
    Always wear safety glasses while programming.

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