Go Down

Topic: Graphic LCD (KS0108) library now available (Read 49 times) previous topic - next topic

lorz

I'm sorry but I couldn't post links in my first post so I have to do it now.

I have a problem. like on page one in the last two posts. My Display is flickering a lot. both sides are involved. I hope you understand what I mean.
I took the libary given on this page http://www.arduino.cc/playground/Code/GLCDks0108 and installed it on my arduino. I use an Atmega328 microcontroller on my arduino.
this is my display http://cgi.ebay.de/ws/eBayISAPI.dll?ViewItem&ssPageName=STRK:MEWNX:IT&item=140331745957
I hope you will find a solution because I have to use it in my project. I want to show temperatures, fanspeeds and other things with it.

mem

Quote
I have a problem. like on page one in the last two posts.

could you say what the actual post numbers are, I am not sure which ones you mean.

The specifications of your display look ok so we should be able to get it to work if you can explain the problem clearly.

lorz

Thanks for the answer! It is reply #12

may I make a video.

lorz

I've made a short video clip.

[media]http://www.youtube.com/watch?v=zmw9fgX9f9A[/media]

mem

#169
Jul 30, 2009, 01:30 pm Last Edit: Jul 30, 2009, 01:32 pm by mem Reason: 1
lorz, Reply#12 was a problem where there was no actual graphics, also the code that was related to that problem is no longer in the latest release.

Your LCD is producing graphics - I can make out the boxes and the FPS text but although its breaking up, I think you are close to getting it working.   In the file ks0108_panel.h, try increasing the delay value:
#define EN_DELAY_VALUE 2 // this is the delay value that may need to be hand tuned for slow panels

Change the number 2 to something like 16. Delete the ks0108.o file and rebuild your sketch. If that fixes the problem you can try smaller values to find the fastest speed your panel can cope don't forget to delete the .o file after each change in one of the library files.

If you still have the problem try a very large value, say 30. if that makes no difference then its some other issue and we can look at that if necessary

BTW, I think you need to swap the chip select pins, the FPS should display on the right hand side. See the playground for more about this.

lorz

Thanks a lot now it is working.

in my download I hadn't any file named ks0108_panel.h.

But after I reload it from playground there was one. I hadn't anything to change.

Now I will programm my own code with temperaturesensors and other things.

I will show you the result in some days.

mem

Good to hear you have it going. I hope you can post some pictures when you are done.

lorz

Again me


I have  the next problem: I can't change the command pins. I want to put it to port b. but if I put it to port b the display shows only the second half. I don't know why. Is there anything else what I have to change?

All Datapins are on port d and my serial communication during the code runs on arduino is deactivated ==> pin 8 to 13 are free so they are free and ready to be used by the command pins. I hope you understand what I mean.

mem

If you can see the display on one half only then you have a problem with one of the chip select pins (CSEL1 or CSEL2). Make sure that the defines in the ks0108_Arduino.h header file match the actual pins you are using.

lorz

All pins are right!

Thanks for the answer

mem

Does that mean its now working correctly,  or that you checked the pins and they are set correctly but its still not working

lorz

It means that its still not working. Sorry that I confused you.

thanks for the answer.

mem

Try swapping the wires so that CSEL1 and CSEL2 are connected to opposite pins. See if the image changes sides.  If so the you need to make sure that the pin definitions in the header file match the wiring.

It may help if you say what pins you are using and cut and paste the definitions from the header into a post so I can see what you have.

lorz

I found the mistake. I forgot to commend the following line:

/* option: uncomment the next line if all command pins are on the same port for slight speed & code size improvement */
#define LCD_CMD_PORT            PORTC            // Command Output Register for pins 14-19


I'm sorry I think tomorrow I will post some pictures.

lorz

I've a further question. I want to youse the GLCD with shiftoutregisters how can I realize that?

I think that it is a bit complicate so I ask you mem.

If it is too complicate it is also possible to use a seperate arduino but I prefere to do it with the shift register. My shift registers are 74hc595. I think taht I have shift in registers for the command pins. So I thinkk I will use 74hc165.

I hope you understand what I mean. Is it possible to paste the libaries into the normal code cause if it is I could use the shiftregisters easily. If not I don't know how I have to use it.

Go Up