Writing custom characters to LCD display


Closed Thread
Results 1 to 40 of 60

Hybrid View

  1. #1
    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

  2. #2
    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.

  3. #3
    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

  4. #4
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    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 !

  5. #5
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    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   

  6. #6
    Join Date
    Dec 2008
    Location
    Ploiesti, ROMANIA
    Posts
    582


    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

  7. #7
    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?

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