Hi,i want to learn how can i write on graphic LCD? How can i make custom characters? How can i make new fonts in other languages? This is may first time. I bought TS12864A-2 v1.1 graphic LCD.I use PICbasic pro 2.5 and PIC16F877A.
Printable View
Hi,i want to learn how can i write on graphic LCD? How can i make custom characters? How can i make new fonts in other languages? This is may first time. I bought TS12864A-2 v1.1 graphic LCD.I use PICbasic pro 2.5 and PIC16F877A.
first of all, you need to know which controller type your LCD use, here, it seems to be a KS0108.
From there, you download the usual datasheet, and try to understand how it works.
A swear jar is recommended, not a so easy task... have done it before... still trying to recover it, or redoing it from scratch next week or so.
I can not find the complete datasheet of the LCD.could you send me a PDF file or website that can help me with graphic LCD in PICBasic(PIC projects with graphic LCD)?
Search for CrystalFontz LCD. They have the range of monochrome LCD panels with data sheets if thats what you're using.
Hi, Jerson
I'd better bet on : " SHENZHEN TECHSTAR ELECTRONICS CO.,LTD "
Alain
http://www.datasheet4u.com/download.php?id=553270
Yes ofcourse Alain. Most stuff comes from China anyway :D
Assuming I'm right, KS0108 controller, 128x64 GLCD type, the following datasheet should be handy
http://circuit-ed.com/uplds/GDM12864B.pdf
and then maybe this link too
http://www.compsys1.com/workbench/On...ontroller.html
Maybe, but the above also have it !
This is a 20 pin LCD from TECHSTAR company.
http://techstarlcd.en.makepolo.com/p...w/4519176.html
this is for TS12864A-1 but it shows it's really a KS0108 controller type.
So, i'm pretty confident of my links few post above.
Hi, i think this pdf file is very useful for me,do you think so or u have something better than this?
http://www.picbasic.it/it/CRN-12864C.pdf
i found another one,what about this?
http://www.electro-tech-online.com/a..._datasheet.pdf
could you explain more about the controllers that you said about LCD's?
can i use your link?( http://circuit-ed.com/uplds/GDM12864B.pdf) to work with my LCD?
because i can't find complete datasheet of my LCD that explain everything to tell me how can i make fonts and write on LCD.
There's nothing to explain... KS0108 is not a T6963 that's it. From memory.. T6963 have built-in fonts, while KS0108 don't.
Everything is in their respective datasheet, and i'd post more than enough link to get you started with your GLCD.
I will release my own KS0108 GLCD lib here probably in a week or so.. nothing free, but will be really easy to use.
EDIT: YES you should at least use my link to circuit-ed datasheet to begin.
EDIT2: thought confirm by futz
Quote:
Originally Posted by futz
Perhaps you should consider graphic LCD's with a serial interface. They cost more but communication is far easier, and as a bonus, these LCD's typically provide simple commands for circles, rectangles, multi-fonts, etc.
Just google for "serial graphic LCD"
Are Serial GLCD's a viable option when you want to sell lots of kit.
What about the need odd size units how do you cater for them?
IMHO its far cheaper to find a compiler that supports GLCD's or at least has access to routines that can use them.
So..... is that your answer to every one?
If some one makes a valid suggestion that in circumstances were the compiler does not suit the application its actually more economical to use another one for that job.
You then tell them to get lost?
;) don't worry with Alain, must be one of his bad days ;)
Definitly YES !!!
IF product doesn't suit your OWN requirements ... no use to loose your time. if " Time is money " for you ...
You want what PBP doesn't offer you ... why heavily insist ???
Lots of people have asked the same question as you ... in the right Forum section. One more may decide Melabs to add GLCD to the libraries ...
Who knows ???
Now one thing is sure ... PBP allows you to create your own driver ... without too many pain !!!
Alain
Hi again,imagine that i want to write "A" on this LCD,could you send me a sample code with picbasic pro that help me to know how can i work with this LCD?
could you explain more about graphic LCD? what is X,Y and Z address? how can i write on LCD? how can i make custom fonts on LCD?
This is not PicBasicPro code, but if you look through it, you will find exactly what you are looking for.
http://www.8052.com/codelib/files/12...LCD%20demo.asm
thanks, i will study it but i'm not good in assembly.
Maybe is bad ....maybe it help you.
Regards
Code:@ Device pic16F877, HS_OSC, BOD_ON, PWRT_OFF, WDT_ON, PROTECT_OFF
Define osc 20
ADCON1 = 7
trisc = $00
trisd = $00
en var portd.0
rw var portd.1
rs var portd.2
cs1 var portd.3
cs2 var portd.4
reset var portd.5
rs = 1
rw = 0
en = 0
cs1 = 1
cs2 = 1
temp var byte
x var byte
y var byte
z var byte
h var byte
x = 0
y = 0
z = 0
h = 0
gosub rst
pause 500
gosub brisanje
gosub levo
gosub nulti
temp = 184
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$09,$09,$09,$09,$09,$09,$89,$69,$19,$09,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$f9,$89,$89,$89,$89,$89,$89,$89,$89,$f9,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 184
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$f9,$09,$09,$09,$09,$09,$09,$f9,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$81,$81,$c1,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$81,$e1,$f1,$e1,$81,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
gosub nulti
temp = 185
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$90,$88,$86,$81,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$9f,$90,$90,$90,$90,$90,$90,$90,$90,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 185
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$91,$91,$91,$91,$91,$91,$91,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$81,$83,$83,$87,$81,$81,$81,$81,$81,$81,$80,$80,$80,$80,$80,$80,$80,$80,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 186
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$c0,$a0,$90,$88,$84,$fc,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$7c,$44,$44,$44,$44,$44,$44,$44,$c4,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 186
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$fc,$84,$84,$84,$84,$84,$84,$84,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$80,$00,$c0,$00,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$f0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 187
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$1f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$20,$20,$20,$20,$20,$20,$20,$20,$3f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 187
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$1f,$10,$10,$10,$10,$10,$10,$1f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$0a,$07,$1f,$07,$0a,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$1c,$3f,$1c,$04,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
gosub levo
gosub nulti
temp = 188
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$21,$31,$f9,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$79,$09,$09,$09,$09,$89,$79,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 188
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$09,$09,$09,$09,$89,$89,$89,$89,$f9,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
gosub nulti
temp = 189
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$90,$90,$9f,$90,$90,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$90,$98,$94,$92,$91,$90,$90,$90,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 189
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$90,$90,$90,$90,$90,$90,$90,$90,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 190
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$fc,$04,$04,$04,$04,$04,$fc,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$c0,$40,$c0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 190
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$f8,$88,$88,$88,$88,$00,$00,$f8,$88,$88,$88,$88,$98,$00,$00,$f8,$08,$08,$08,$08,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$f8,$88,$88,$08,$00,$f8,$00,$00,$f8,$00,$08,$08,$f8,$08,$08,$00,$f8,$88,$88,$08,$00,$f8,$88,$88,$88,$f8,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 191
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$9f,$90,$90,$90,$90,$90,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$81,$81,$81,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 191
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$8f,$88,$88,$88,$88,$80,$80,$8c,$88,$88,$88,$88,$8f,$80,$80,$8f,$88,$88,$88,$88,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$8f,$88,$88,$88,$80,$8f,$82,$84,$8f,$80,$80,$80,$8f,$80,$80,$80,$8f,$88,$88,$88,$80,$8f,$80,$81,$86,$88,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
goto kraj
'*************************************************************
'komande za GLCD *
'*************************************************************
rst:
reset = 0
pause 1000
reset = 1
temp = $3e
gosub komanda
pause 100
temp = $3f
gosub komanda
pause 100
nulti:
temp = $40'+55
gosub komanda
return
brisanje:
for x = 0 to 7
temp = $b8 + x
gosub komanda
for y = 0 to 63
temp = $00
gosub podatak
next y
next x
pause 1000
return
komanda:
rw = 0
rs = 0
portc = temp
en = 1
pause 5
en = 0
return
podatak:
rw = 0
rs = 1
portc = temp
en = 1
pause 5
en = 0
return
razmak:
temp = $00
return
levo:
cs1 = 0
cs2 = 1
return
desno:
cs1 = 1
cs2 = 0
return
kraj:
pause 1000
goto kraj
end
i have copied that code to picbsic pro 2.5 but it has some errors in compiling.
Jeeze...WHATEVER you do, don't tell us what the errors you got are. Let us guess at them...no wait...Let's have a lottery, or maybe we can draw pieces of paper out of a hat and guess the errors.
But since you are using PBP 2.50, look in your manual on page 30 at the bottom, then compare those comments with every one of those LOOKUP statements in the code above...
Notice anything?
Hi, Phoenix
Really a nice screen ...
I should learn Serbian language ...
Congratulations, RobertCode:'****************************************************************
'* Name : GLCD Test.BAS *
'* Author : Phoenix_1 *
'* Notice : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 12/04/2010 *
'* Version : 1.1 *
'* Notes : Easy Pic5 Modified !!! *
'* : *
'****************************************************************
@ Device pic16F877a, HS_OSC, BOD_ON, PWRT_OFF, WDT_ON, PROTECT_OFF
Define osc 8
ADCON1 = 7
CMCON = 7
trisB = $00
trisD = $00
en var portB.4
rw var portB.3
rs var portB.2
cs1 var portB.0
cs2 var portB.1
reset var portB.5
rs = 1
rw = 0
en = 0
cs1 = 1
cs2 = 1
temp var byte
x var byte
y var byte
z var byte
h var byte
x = 0
y = 0
z = 0
h = 0
gosub rst
pause 500
gosub brisanje
gosub levo
gosub nulti
temp = 184
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$09,$09,$09,$09,$09,$09,$89,_
$69,$19,$09,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$01,_
$01,$01,$01,$01,$01,$f9,$89,$89,$89,$89,$89,$89,$89,$89,$f9,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 184
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$f9,$09,$09,$09,$09,$09,$09,_
$f9,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$81,$81,$c1,_
$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$81,$e1,$f1,$e1,$81,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
gosub nulti
temp = 185
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$90,$88,$86,$81,$80,_
$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,_
$80,$80,$80,$80,$80,$9f,$90,$90,$90,$90,$90,$90,$90,$90,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 185
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$91,$91,$91,$91,$91,$91,$91,_
$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$81,$83,$83,$87,_
$81,$81,$81,$81,$81,$81,$80,$80,$80,$80,$80,$80,$80,$80,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 186
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$80,$c0,$a0,$90,$88,$84,$fc,_
$80,$00,$00,$00,$00,$00,$00,$00, $00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,_
$00,$00,$00,$00,$00,$7c,$44,$44,$44,$44,$44,$44,$44,$c4,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 186
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$fc,$84,$84,$84,$84,$84,$84,_
$84,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$80,$00,$c0,_
$00,$80,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$f0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 187
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$1f,_
$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,_
$00,$00,$00,$00,$00,$20,$20,$20,$20,$20,$20,$20,$20,$3f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 187
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$1f,$10,$10,$10,$10,$10,$10,_
$1f,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$0a,$07,$1f,_
$07,$0a,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$04,$1c,$3f,$1c,$04,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
gosub levo
gosub nulti
temp = 188
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$21,$31,$f9,$01,_
$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$01,_
$01,$01,$01,$01,$01,$01,$01,$79,$09,$09,$09,$09,$89,$79,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 188
gosub komanda
for z = 0 to 63
lookup z,[$ff,$01,$01,$01,$01,$01,$01,$01,$01,$01,$09,$09,$09,$09,$89,$89,$89,_
$89,$f9,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff,$01,$01,$01,$01,$01,$01,$01,_
$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$01,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
gosub nulti
temp = 189
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$90,$90,$9f,$90,_
$90,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,_
$80,$80,$80,$80,$80,$80,$80,$90,$98,$94,$92,$91,$90,$90,$90,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 189
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$90,$90,$90,$90,$90,$90,$90,_
$90,$9f,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,$80,$80,_
$80,$80,$80,$81,$81,$81,$81,$81,$81,$81,$81,$81,$81, $81,$81,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 190
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$fc,$04,$04,$04,$04,_
$04,$fc,$00,$00,$00,$00,$00,$00, $00,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$00,$00,_
$00,$00,$00,$00,$00,$00,$00,$00,$00,$c0,$40,$c0,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 190
gosub komanda
for z = 0 to 63
lookup z,[$ff,$00,$00,$00,$f8,$88,$88,$88,$88,$00,$00,$f8,$88,$88,$88,$88,$98,_
$00,$00,$f8,$08,$08,$08,$08,$00,$00,$00,$00,$00,$ff,$00,$00,$00,$f8,$88,$88,$08,_
$00,$f8,$00,$00,$f8,$00,$08,$08,$f8,$08,$08,$00,$f8,$88,$88,$08,$00,$f8,$88,$88,$88,$f8,$00,$00,$00,$00,$ff],temp
gosub podatak
next z
temp = 0
gosub levo
gosub komanda
temp = 191
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$9f,$90,$90,$90,$90,_
$90,$9f,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff,$80,$80,$80,$80,$80,_
$80,$80,$80,$80,$80,$80,$80,$80,$80,$81,$81,$81,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
temp = 0
gosub desno
gosub komanda
temp = 191
gosub komanda
for z = 0 to 63
lookup z,[$ff,$80,$80,$80,$8f,$88,$88,$88,$88,$80,$80,$8c,$88,$88,$88,$88,$8f,_
$80,$80,$8f,$88,$88,$88,$88,$80, $80,$80,$80,$80,$ff,$80,$80,$80,$8f,$88,$88,$88,_
$80,$8f,$82,$84,$8f,$80,$80,$80,$8f,$80,$80,$80,$8f,$88,$88,$88,$80,$8f,$80,$81,$86,$88,$80,$80,$80,$80,$ff],temp
gosub podatak
next z
goto kraj
'************************************************* ************
'komande za GLCD *
'************************************************* ************
rst:
reset = 0
pause 1000
reset = 1
temp = $3e
gosub komanda
pause 100
temp = $3f
gosub komanda
pause 100
nulti:
temp = $40'+55
gosub komanda
return
brisanje:
for x = 0 to 7
temp = $b8 + x
gosub komanda
for y = 0 to 63
temp = $00
gosub podatak
next y
next x
pause 1000
return
komanda:
rw = 0
rs = 0
portD = temp
en = 1
pause 1 '5
en = 0
return
podatak:
rw = 0
rs = 1
portD = temp
en = 1
pause 1 '5
en = 0
return
razmak:
temp = $00
return
levo:
cs1 = 0
cs2 = 1
return
desno:
cs1 = 1
cs2 = 0
return
kraj:
pause 1000
goto kraj
end
I just sped it a bit, as datasheet enable cycle time is specified @ 1 ms ...
Alain
Hi Alain,
It was only test for some my project .....
Yes it was slow but work and it was in my start to play with graphic display with touch screen from Mikro Elektronika.....
It cost 20EUR but there is much faster GLCD in market...
The best regards
/Robert
Hello,
May I ask some of you what designing software* you use to create the graphics?
I'm starting using a EADOGL128-6 display (http://www.lcd-module.com/products/dog.html). At the bottom of this website, there's a soft I may use.
Nevertheless, is there a program most people use?
*I'm using Windows XP
Can you post a tutorial or something like that,so I can made my own picture on GLCD?And how to put a text line,from mesurments with DS18B20?
If you just mean graphics, and not picture, here is one http://www.picbasic.co.uk/forum/cont...Nokia-3310-LCD
And a thermostat using the 3310 and a DS18B20 http://www.picbasic.co.uk/forum/show...7933#post87933
If you really need a picture then you could get one of these: http://www.picbasic.co.uk/forum/cont...D-code-example
Hi,
Mikroelektronika offers it's GLCG Bitmap editor in their Free version compilers ...
nice tool to convert Bitmaps to " printable " files ...
You just have to write the " driver " to print the 8192 generated pixels ... or exactly ... the 1024 bars !
here's such file :
AlainCode:// ------------------------------------------------------
// GLCD Picture name: truck.bmp
// GLCD Model: KS0108 128x64
// ------------------------------------------------------
unsigned char const truck_bmp[1024] = {
0, 0, 0, 0, 0,248, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12,
12, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 9, 9, 9, 9, 9, 9, 9, 9,137,137,137,137,137,137,
137,137,137,137,137,137,137, 9, 9, 9, 9, 9, 9, 9, 9, 9,
9, 9, 13,253, 13,195, 6,252, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
240,240,240,240,240,224,224,240,240,240,240,240,224,192,192,224,
240,240,240,240,240,224,192, 0, 0, 0,255,255,255,255,255,195,
195,195,195,195,195,195, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,255,240, 79,224,255, 96, 96, 96, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64,128, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
255,255,255,255,255, 0, 0, 0, 0,255,255,255,255,255, 0, 0,
0, 0,255,255,255,255,255, 0, 0, 0,255,255,255,255,255,129,
129,129,129,129,129,129,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0,255, 1,248, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 16,224, 24, 36,196, 70,130,130,133,217,102,112,
160,192, 96, 96, 32, 32,160,160,224,224,192, 64, 64,128,128,192,
64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 63, 96, 96, 96,224, 96, 96, 96, 96, 96, 96,
99, 99, 99, 99, 99, 96, 96, 96, 96, 99, 99, 99, 99, 99, 96, 96,
96, 96, 99, 99, 99, 99, 99, 96, 96, 96, 99, 99, 99, 99, 99, 99,
99, 99, 99, 99, 99, 99, 99, 96, 96, 96, 96, 96, 96, 96, 64, 64,
64,224,224,255,246, 1, 14, 6, 6, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2,130, 67,114, 62, 35, 16, 16, 0, 7, 3, 3, 2,
4, 4, 4, 4, 4, 4, 4, 28, 16, 16, 16, 17, 17, 9, 9, 41,
112, 32, 67, 5,240,126,174,128, 56, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1,127,127,127,127,255,255,247,251,123,191, 95, 93,125,189,
189, 63, 93, 89,177,115,243,229,207, 27, 63,119,255,207,191,255,
255,255,255,255,255,255,255,127,127,127,127,127,127,127,127,255,
255,255,127,127,125,120,120,120,120,120,248,120,120,120,120,120,
120,248,248,232,143, 0, 0, 0, 0, 0, 0, 0, 0,128,240,248,
120,188,220, 92,252, 28, 28, 60, 92, 92, 60,120,248,248, 96,192,
143,168,216,136, 49, 68, 72, 50,160, 96, 0, 0, 0, 0, 0, 0,
0, 0, 0,128,192,248,248,248,248,252,254,254,254,254,254,254,
254,254,254,254,254,255,255,255,255,255,246,239,208,246,174,173,
169,128,209,208,224,247,249,255,255,252,220,240,127,255,223,255,
255,255,255,255,255,254,254,255,255,255,255,255,255,255,254,255,
255,255,255,255,255,255,254,254,254,254,254,254,254,254,254,254,
254,254,254,254,255,255,255,255,255,255,254,255,190,255,255,253,
240,239,221,223,254,168,136,170,196,208,228,230,248,127,126,156,
223,226,242,242,242,242,242,177, 32, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 1, 1, 1, 3, 3, 3, 7, 7, 7, 7, 7, 15,
15, 15, 7, 15, 15, 15, 7, 7, 15, 14, 15, 13, 15, 47, 43, 43,
43, 43, 43, 47,111,239,255,253,253,255,254,255,255,255,255,255,
191,191,239,239,239,191,255,191,255,255,255,255,255,255,255,255,
255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,
255,255,255,255,127,127,127,127,255,255,191,191,191,191,255,254,
255,253,255,255,255,251,255,255,255,127,125, 63, 31, 31, 31, 31,
31, 31, 63, 15, 15, 7, 7, 3, 3, 3, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
1, 1, 1, 1, 3, 3, 3, 11, 11, 11, 11, 7, 3, 14, 6, 6,
6, 2, 18, 19, 19, 3, 23, 21, 21, 17, 1, 19, 19, 3, 6, 6,
14, 15, 15, 7, 15, 15, 15, 11, 2, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
Another GLCD Assistant :
http://en.radzio.dxp.pl/bitmap_converter/
Alain