Page 1 of 1

glcd (ks0108) print number, problem??

Posted: Thu Oct 21, 2010 12:19 am
by cobra1
Hi

i am trying to setup a thermometer using a ks0108 type glcd 128x64 pixel.

I have been able to type text onto the screen etc, and my ADC is working fine.

Problem is when i use the Print Number function, it doenst do what i want it to, it just counts super fast, looks like its counting between 64 -80 over and over.

to eliminate any error in the ADC side of things i set a variable to 50, "Sample = 50"
then in the print number function told it to display "Sample" this again just counts really fast.

i tried a normal 4x20 display and this does what i expect it to do, so i can only imagine that it might be a bug in the custom_code.c file.

Can someone have a look and see what the problem may be?

My LCD is a JHD12864E. And im using a 16f877 pic

cheers

Re: glcd (ks0108) print number, problem??

Posted: Thu Oct 21, 2010 10:10 am
by Benj
Hello Cobra,

Would you mind attaxching the exact custom code file you are using and I will have a look at the print number function to make sure it is correct.

Re: glcd (ks0108) print number, problem??

Posted: Thu Oct 21, 2010 8:28 pm
by cobra1
Hi Benj

I feel like a bit of an idiot now. i found the problem.

The variable in the print number command was in inverted commas, like you would with a string.

This was making it do these random numbers, it was only after i posted that i realised what the problem was.

There was one more thing i wanted to do but cant find much info for flowcode, Is it possible to display BMPs i have seen in google images people using this screen to display photos or graphics, can this be done in flowcode???

Re: glcd (ks0108) print number, problem??

Posted: Fri Oct 29, 2010 3:22 pm
by Benj
Hello,

Ah great thanks for letting me know. Always the simple things that cause problems :)

Displaying bitmaps / graphics can be done but the hard part is how to get the data into the device.

One way I have seen is someone used USB and VB code to stream a bitmap into a chip for displaying. Another way would be to put the picture data onto a SD card etc in the form of an array and simply output the array to the display.

Hard coding pictures actually onto the internal memory of the chip is also possible but obviously there is problems with breaking down the image into an array of data and then converting that into a data array the chip can compile and work with.