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>
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
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
writes your character to "0" position. or character 0Code:lcdout $fe,$40,$08,$04,$02,$01,$01,$02,$04,$08
To display that character on the first line, first space
second spaceCode:LCDOUT $FE,1,0
If you have a character in the second memory locationCode:LCDOUT $FE,$81,0
lcdout $fe,$48,$08,$04,$02,$01,$01,$02,$04,$08
To display that character on the first line, first space
second spaceCode:LCDOUT $FE,1,1
Code:LCDOUT $FE,$81,1
Last edited by mackrackit; - 5th October 2008 at 13:00.
Dave
Always wear safety glasses while programming.
Sorry Dave, wasn't refering to you.
But your new explanation might help someone.
<br>
DT
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?
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.
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?
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
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
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?
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
yes, i need too many character and just 8 available so there is no way unfortunately.
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
Maybe try
Code:LCDOUT $FE,1,4
Dave
Always wear safety glasses while programming.
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
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
But I have on display just char # 1 ; do not change in # 2 to 5 ...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
What I do wrong ? Thanks !
Custom characters...
and results (no changes).
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
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?
Dave
Always wear safety glasses while programming.
Bookmarks