Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC 18 basic Glcdout

Status
Not open for further replies.

Mity Eltu

Member
I am trying to figure out how the Glcdout command works. I have managed to get the other basic glcd functions to work ok, but nothing I do makes any difference with this command. I have tried constants and variables in various combination of 2, 3 and 4 and nothing seems to be happening. There is not much about the glcdout command in the help file. Can anyone tell me how to use this instruction?
 
My apologies. I assumed that since the forum is for Oshonsoft and they make pic microcontroller simulators that this might be somewhat of a given. However, I am referring to the pic18 simulator by oshonsoft basic compiler. One of the commands (the one I referred to above : Glcdout) is used when programming a graphical lcd display. Specifically a 128x64 dot matrix lcd. I do not have it wired, so I do not have a power supply. This s strictly for the pic simulator basic compiler. Does anyone know what I'm talking about?
 
You are quite right Mity Eltu This is the Oshonsoft basic forum..
Are you trying Vladimir's example?? If so which one are you trying?... Secondly! If you are simulating in the PIC IDE then you may have quite some time to wait.. Simulation is NOT in real time.... First you need to specify the simultation_waitms_delay, so that any delays are sped up... It may take a while to draw anything on the screen..

If you set the delay to simulation and run at ultimate... it sim's pretty well.
 
My apologies.... I have re-read and now understand your question!!!
Code:
for i = 0 to 255
GLCDout i
next i

will print the binary value at the internal cursor position and increment.. So if you want to put a bitmap onto the screen you can write 8 bytes to the screen..

Take this array... 00H,0FCH,16H,12H,12H,16H,0FCH,00H writen in turn will print an 'A' at the present cursor position...

Just tested the theory..
Code:
for i = 0 to 8
 ch = lookup(00H,0FCH,16H,12H,12H,16H,0FCH,00H),i
 GLCDout ch
next i
 
OK. Thanks. That got it. I thought I had tried that arrangement and got nothing. I did however notice something. If I clear the glcd and then use this, it doesn't print anything on the glcd screen? Why is that?
 
I used the above code in the simulator, and it prints the letter A, so I know it works! Are you simulating or working on a real device?

When you clear the device... Make sure you put the cursor back at the first byte!
 
I am only simulating. When I put the cursor back to to the first byte everything works, but I thought that's part of what the glcdclear command did. Anyway, it seems to be working. Now I just have to get the hardware and see if I can make it ACTUALLY work. Thanks for the help.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top