PDA

View Full Version : Glcd help



santamaria
- 8th January 2009, 14:31
i found on microbasic compiler one tool that convert image to data.the tool name is glcd bitmap editor.I convert one bitmap but i can't print it to screen. I start print the first data on top left to write and top to down.does anybody played before with bitmaps to tell me an idea?

one sample code is here:


' Set Addr Ptr
glcd_msb = $10
glcd_lsb = $00
glcd_cmd = ADDR_PTR_SET
gosub send_2

gl_y= $1000 'start picture and print the first 248 bytes
gl_ad1= gl_y.BYTE1
gl_ad2= gl_y.BYTE0
gosub pict_part1 'print part1 248 bytes
gosub pict_part2 'print part2 onother 248 bytes

pict_part2:
for gl_i=0 to 239
lookup gl_i,[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, 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, 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,255,255,255,255,255,255,247,_
252, 0, 0, 0, 0, 0, 0, 0,_
0, 0, 0, 0, 0, 0, 0, 0,_
0, 0, 0, 0, 0, 0,126, 0,_
0, 0, 0, 0, 7,224, 0,224,_
0, 0, 0, 0, 0, 0, 0, 0,_
0, 0, 0, 0, 0, 0, 0, 0,_
0, 0, 0, 15,128, 0, 0, 0,_
0, 0, 59, 0, 0, 8, 0, 0,_
0, 0, 0, 0, 0, 0, 0, 0,_
0, 0, 0, 0, 0, 0, 0, 0],gl_k
glcd_msb=gl_k
glcd_cmd=DATA_WR_INC
gosub send_1
next


return

send_2:
gosub busy_chk
glcd_dat = glcd_lsb
glcd_cd = 0
glcd_rd = 1
glcd_WR = 0
glcd_CE = 0
pauseus GL_PAUSE
glcd_wr = 1
glcd_ce = 1
send_1:
gosub busy_chk
glcd_dat = glcd_msb
glcd_cd = 0
glcd_rd = 1
glcd_WR = 0
glcd_CE = 0
pauseus GL_PAUSE
glcd_wr = 1
glcd_ce = 1
send_cmd:
gosub busy_chk
glcd_dat = glcd_cmd
glcd_rd = 1
GLCD_CD = 1
glcd_WR = 0
glcd_CE = 0
pauseus GL_PAUSE
glcd_wr = 1
glcd_ce = 1
return

santamaria
- 12th January 2009, 08:32
i found how to display an image. i download a programm called fastlcd and this program gives an output in basic but with different format so i built a program that convert it to our code. The code to display the image is from workbench.below i have a sample code to see how you can display an image with t6963c lcd controller.because i did the program fast you have to delete the "," and "_"before the ] and also to fix the bytes to the last part of image.if you have any questions please feel free to ask.

jamshid.dastur
- 8th February 2009, 10:11
Hi, finally got some compilable code, well i compilete the code using pbp and tried simulating it on PIC SIMULATOR IDE but i can't get any output...can you provide me with the schematic of the example too...

Best Regards



i found how to display an image. i download a programm called fastlcd and this program gives an output in basic but with different format so i built a program that convert it to our code. The code to display the image is from workbench.below i have a sample code to see how you can display an image with t6963c lcd controller.because i did the program fast you have to delete the "," and "_"before the ] and also to fix the bytes to the last part of image.if you have any questions please feel free to ask.