see also:
http://www.picbasic.co.uk/forum/show...s%22#post34133
-Adam-
Ohm it's not just a good idea... it's the LAW !
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
Padawan-78
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).
and this will fill your display with smiley faces.Code:LCDOUT $FE,$60,$00,$0a,$0a,$00,$00,$11,$0e,$00 ; #4 Smiley FaceOr this will do the same thing as the FOR/NEXT loopCode:LoopCount VAR BYTE FOR LoopCount = 1 to 80 LCDOUT 4 NEXT LoopCount
LCDOUT REP 4\80
<hr>
If you always wanted to start in the first column of each row, those would work.... 128, 192,148, or 212 to choose the start position?????
You can also add an "offset" to those numbers to specify the column.
HTH,Code: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
DT
Darren,
Thanks, I got it now. Keep up the good work!
Padawan-78
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
nice job earltyso!
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks