PDA

View Full Version : Writing custom characters to LCD display



badrad
- 17th February 2004, 18:17
Hi all. New to this forum. Tried a search but did not find any answer to my current design task.

My current application is using the pic 16f876a displaying user data onto an Optrex 2x16 display. I would like to display a couple of custom characters, which in the Optrex manual seems to allow, by using the CG RAM area.

I have not been able to find any command in the LCDOUT command that allows me to send data to this RAM area.

Has anyone here tried this before and if so, some code example?

Thanks!

Ingvar
- 18th February 2004, 10:21
Hi badrad,

LCDOUT $FE,$60,$02,$06,$1a,$1a,$1a,$06,$02,$00
LCDOUT $FE,$78,$06,$0f,$0f,$0f,$0f,$0f,$0f,$00

The first line writes a "speaker" character to CGRAM address 4 and the last writes a "battery" to CGRAM addess 7.

To use the character you just write......
LCDOUT $04 'will write the "speaker" symbol.

The addresses(characternumber) are the numbers located right after the $FE.

character 0 = $40
character 1= $48
character 2 = $50
character 3= $58
character 4 = $60
character 5= $68
character 6 = $70
character 7= $78

The character itself is made up by the rest of the numbers following the address. Can't remeber if the bits are arranged horizontally or vertically. Draw it on a paper and have a look.

/Ingvar

badrad
- 18th February 2004, 17:48
Ingvar,
thanks ever so much, that worked out well. that has really save me so much time from having work it all out.

I wanted to display some smiley faces and sad faces on the unit that I have built for kindergarten and primary school kids so that they can learn about energy, without having to deal with large numbers and such.

thanks again.

badrad

Ingvar
- 18th February 2004, 19:52
No worries,

The image of happy kids in my mind makes it worth the effort, all three minutes of it ;-)

Cheers
/Ingvar

badrad
- 18th February 2004, 21:05
BTW, here is smiley and sad face symbol that i am trying out.

LCDOUT $FE,$60,$00,$0a,$0a,$00,$00,$11,$0e,$00 'smiley symbol
LCDOUT $FE,$78,$00,$0a,$0a,$00,$00,$0e,$11,$00 'sad symbol

many thanks again!

ps: the only problem with image of the happy kids was there were 60+ in each classroom, as we had to double up classes for the labs! there was so much energy in that small classroom and they were all so enthusiatic!


badrad

ants
- 8th May 2004, 00:47
Hi,

I have used the character calculator at http://www.geocities.com/dinceraydin/lcd/charcalc.htm to draw some symbols, but cant understand how to implement the in picbasic pro. How did you arrive at those values for the battery symbol?

Sorry if its a stupid question!

Thanks,
Anthony

Darrel Taylor
- 9th May 2004, 02:21
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
http://www.pbpgroup.com/files/CustomChars.GIF


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,

Darrel Taylor
- 9th May 2004, 07:06
I was just playing around with Ingvar's battery icon, and thought this was pretty neat.
It allows you to show the battery level with the same icon.
The demo just runs thru a loop counting backwards from 10, and changes the Custom Character accordingly.

It also demonstrates how you can animate the characters by simply updating the CGRAM.
Any characters that are already on the screen will automatically be updated as well.
http://www.pbpgroup.com/files/Battery.gif
BattLevel var byte ' 0 - 10, 0=Empty 10=Full
Char var byte
y var byte

LCDout $FE,1," ",1," ",1," ",1," ",1 ' Show 4 batteries

Loop: ' Test loop showing all the possible Battery Levels
for BattLevel = 10 to 0 step -1
gosub ShowBattery
pause 500
next BattLevel
goto Loop


ShowBattery: ' Show Battery Level 0 - 10, 0=Empty 10=Full
lcdout $FE,$48,$06
for y = 5 to 1 step -1
if BattLevel >= (y * 2 - 1) then
if BattLevel >= (y * 2) then
Char = $0F
else
Char = $0B
endif
else
Char = $09
endif
lcdout Char
next y
lcdout $0F,$00
return

Darrel

ants
- 10th May 2004, 23:50
Thanks for the really clear explanation, got it working straight away!

Many thanks..

Anthony

swordman
- 19th May 2004, 10:50
I use
OPTREX hd4470A0 LCD
16f877A (4mhz)
pbp2.45


I can't display this string , whats wrong ?

LCDOUT $FE,$60,$00,$0a,$0a,$00,$00,$11,$0e,$00 'smiley symbol

Darrel Taylor
- 19th May 2004, 18:53
Hi swordman,

Sending that string will define the Custom Character at location number 4. Then to actually display the character use this.

LCDOUT 4

HTH,
Darrel

swordman
- 19th May 2004, 23:09
Thanks Darrel !

Working fine

swordman
- 24th August 2004, 15:27
Hi,
How can I display 2 custom char like this:


Lcdout $FE,$85,4
LCDOUT $FE,$60,$1F,$11,$11,$11,$11,$11,$11,$0


Lcdout $FE,$C2,4
LCDOUT $FE,$78,$3,$5,$9,$9,$9,$11,$11,$0


when I write that code lcd display only second

Darrel Taylor
- 25th August 2004, 00:59
Hi Swordman,

The second example uses Address $78 which is Location 7.

To display that Custom Character use this

<font="courier">Lcdout $FE,$C2,7</font>

Darrel

websmith
- 21st February 2007, 14:36
This is fun!
Here are 3 more:

lcdout $FE,$60,$1F,$11,$15,$17,$17,$15,$11,$1F 'copyright sign
lcdout $FE,$70,$0E,$11,$11,$11,$0E,$04,$0E,$04 'female symbol
lcdout $FE,$78,$07,$03,$05,$08,$0E,$11,$11,$0E 'male symbol

Lcdout $FE, $D4, 4, 6, 7

mister_e
- 21st February 2007, 18:08
and the tool to create them + PBP code easy... PicMultiCalc... once again ;)
http://www.mister-e.org/pages/utilitiespag.html


<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1404&stc=1&d=1172077657">

rhino
- 21st February 2007, 21:09
and the tool to create them + PBP code easy... PicMultiCalc... once again
http://www.mister-e.org/pages/utilitiespag.html

You're such a stud Steve.

mister_e
- 21st February 2007, 21:16
LMAO, not sure of the meaning of this 'stud' expression but... thanks :D

To me it's sounds x-rated... but since too much time i'm single so :D

rhino
- 22nd February 2007, 00:02
To me it's sounds x-rated
:eek: ooooooooooohhhhhhhhhhhhhh no.... sorry buddy, I'm married. How about "You The Man"..... uhm... maybe "You Rock". What I mean to say is that is cool. Keep on adding to your PicMultiCalc and eventually you'll end up with one heck of an IDE/compiler.

mister_e
- 22nd February 2007, 00:38
Don't worry, i prefer ladies anyways :D After having ruining Darrel's life and bank account (and or credit card) with the USBDemo and by suggesting him another compiler... i try to stay away of any potential problem... yeah i try. I'm sure Darrel will survive so far.


__________________________________________________ __________________________________________

well i have some plan to extend the PicMultiCalc, 'till now it's still a dream and a big work in progress when i find some new idea, time, courage etc etc etc... hence why it's still stated WIP version in the about menu.

I still consider any idea when there's some coming in my e-mail.

Darrel Taylor
- 22nd February 2007, 06:09
And, Lest we forget...

http://www.pbpgroup.com/files/CustChar.JPG (http://www.picbasic.co.uk/forum/showthread.php?t=2598)
http://www.picbasic.co.uk/forum/showthread.php?t=2598

P.S. That guy's got a problem with his thingy. :eek:

mister_e
- 22nd February 2007, 23:59
P.S. That guy's got a problem with his thingy.

Even if simple, it's funny what we can do with few minutes and the right software. So this
<embed src="http://www.mister-e.org/Wav/Viagra_Forum.mp3" autostart=false loop=false>
may help this guy to have at least $04, $0E, $15, $04, $0E, $11, $11, $0E
:D

Darrel Taylor
- 23rd February 2007, 05:52
I think you were right, before you changed your post mister_e.
A little viagra might help ..... let's see ....


http://www.pbpgroup.com/files/ViagraChar.gif

But I think yours might have a lower risk of heart attack ...

http://www.pbpgroup.com/files/Male2.gif
<br>

Ioannis
- 23rd February 2007, 10:02
Ooh, you people, are unbelievable!!!

Just for the history, the symbols are ancient greek ones and were used to symbol the man (holding his shield and arrow) and the woman she used and still holds the mirror (circle and handle).

Now I hear few asking, did ancient greeks have mirrors? No, they did not had glass mirrors. They had metal mirrors from silver or brass.

Ioannis

Angus Anderson
- 23rd February 2007, 14:58
Brilliant, DT

mister_e
- 23rd February 2007, 16:23
Why i had the feeling tat Darrel was building something like that yesterday :D

Well done!

Darrel Taylor
- 24th February 2007, 06:34
RE: History Lesson...

Yes those funny Ancient Greeks. Called them the "Shield of Mars" and the "Mirror of Venus".

But we know what they were really thinking of. :)

http://www.pbpgroup.com/files/MFsym.gif

Mostafa
- 18th May 2007, 09:35
hi

thanks mister-e, here is direct link:

PICMultiCalc:

All you need to calculate PIC Timers, PWM, USART, EUSART, ADC, Comparator register value in few clicks!

USART, EUSART, A/D and LCD custom character provide a code generation tool for Melabs PICBASIC PRO.

http://www.mister-e.org/files/picmulticalc_v_1_3_1.zip

with best regards

skimask
- 18th May 2007, 16:46
hi
thanks mister-e, here is direct link:
PICMultiCalc:
All you need to calculate PIC Timers, PWM, USART, EUSART, ADC, Comparator register value in few clicks!
USART, EUSART, A/D and LCD custom character provide a code generation tool for Melabs PICBASIC PRO.
http://www.mister-e.org/files/picmulticalc_v_1_3_1.zip
with best regards

What the.....????
Gee...I wonder who wrote that program...

Pic_User
- 18th May 2007, 18:12
What the.....????
Gee...I wonder who wrote that program...
see also:
http://www.picbasic.co.uk/forum/showthread.php?p=34133&highlight=%22working+pics%22#post34133
-Adam-

earltyso
- 10th November 2007, 04:31
I am impressed with the amount of work that has been put into this thread already.
I have used the custom character generator Darren Taylor posted and it works great!
I would like to now place my custom characters on the line of my choice for my 4x20. As far as I know my Truly 4x20 lcd has 4 rows and 8 colums for custom characters.
Can I simply add on to your custom character generator line with , 128, 192,148, or 212 to choose the start position?????
thanks

Darrel Taylor
- 10th November 2007, 22:12
... I would like to now place my custom characters on the line of my choice for my 4x20. As far as I know my Truly 4x20 lcd has 4 rows and 8 colums for custom characters.
The LCD only has 8 locations for custom characters, and those locations don't relate to any specific rows or columns.

Once you've sent a custom character to the LCD, it can be used any number of times, anywhere on the screen.

For instance, this line creates the Smiley Face in the LCD's CGRAM at location 4 ($60).


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

and this will fill your display with smiley faces.
LoopCount VAR BYTE

FOR LoopCount = 1 to 80
LCDOUT 4
NEXT LoopCount

Or this will do the same thing as the FOR/NEXT loop

LCDOUT REP 4\80

<hr>


... 128, 192,148, or 212 to choose the start position?????
If you always wanted to start in the first column of each row, those would work.
You can also add an "offset" to those numbers to specify the column.


Row1 CON 128
Row2 CON 192
Row3 CON 148
Row4 CON 212

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

LCDOUT $FE,Row3+10, 4 ; Put a smiley in the middle of Row 3
HTH,

earltyso
- 11th November 2007, 19:36
Darren,
Thanks, I got it now. Keep up the good work!

earltyso
- 15th November 2007, 03:23
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

mister_e
- 15th November 2007, 03:52
:D nice job earltyso!

amindzo
- 4th October 2008, 13:06
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

skimask
- 4th October 2008, 17:31
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...

amindzo
- 4th October 2008, 20:16
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?

mackrackit
- 4th October 2008, 20:30
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.

skimask
- 5th October 2008, 01:09
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...

Darrel Taylor
- 5th October 2008, 06:56
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>

mackrackit
- 5th October 2008, 13:55
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


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


LCDOUT $FE,1,0

second space


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


LCDOUT $FE,1,1

second space


LCDOUT $FE,$81,1

Darrel Taylor
- 5th October 2008, 22:06
Sorry Dave, wasn't refering to you.

But your new explanation might help someone. :)
<br>

amindzo
- 7th October 2008, 11:44
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?

mackrackit
- 7th October 2008, 11:57
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.

amindzo
- 7th October 2008, 14:42
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?

Ioannis
- 7th October 2008, 14:44
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

Ioannis
- 7th October 2008, 14:47
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

skimask
- 7th October 2008, 15:18
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.

amindzo
- 8th October 2008, 09:11
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?

Ioannis
- 8th October 2008, 09:29
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

amindzo
- 8th October 2008, 10:07
yes, i need too many character and just 8 available so there is no way unfortunately.

ELROJO_85
- 6th October 2009, 08:47
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

mackrackit
- 6th October 2009, 14:07
Maybe try


LCDOUT $FE,1,4

ELROJO_85
- 6th October 2009, 18:03
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 !! :eek: jaja WELL LET ME TRY ANOTHER EXAMPLES MAN

THANKS A LOT AGAIN

fratello
- 30th November 2011, 10:49
I try to display some characters, using this 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
.....

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

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 !

fratello
- 30th November 2011, 11:40
Custom characters...
and results (no changes).

fratello
- 30th November 2011, 17:29
I found another way :

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

SKOLS1
- 21st April 2012, 22:42
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?

mackrackit
- 21st April 2012, 23:05
http://www.picbasic.co.uk/forum/showthread.php?t=242&p=46027#post46027