Page 1 of 1

gLCD_KS0108 missing pixels - Resolved

Posted: Mon Aug 12, 2013 5:02 pm
by Jordy101091
Im now getting this message form pickit 2 programming software:

Image

As Im loading the newly compiled file ready to program I get the message that there are now config words in the hex file

Re: Flowcode v6 Beta 1

Posted: Mon Aug 12, 2013 6:04 pm
by Jordy101091
Oke I can now program the chip correctly (installed patch 3),

Im checking with a one second flasher to see if the timing is wright, and its spot-on.
But im on my GLCD (KS0108) display the text doesn't appear in its complete form. There are some pixels missing.
In v5 your could customise the code and add a few nops to it and usually this fixes the problem, but I cant seem to find this option in v6.

Could you investigate this for my why im missing a few pixels in my printed text.

Re: Flowcode v6 Beta 1

Posted: Tue Aug 13, 2013 9:08 am
by Benj
Hello,
In v5 your could customise the code and add a few nops to it and usually this fixes the problem, but I cant seem to find this option in v6.
Can you show me where you place the nops in v5 and I will add a small delay into the component for you.

Re: Flowcode v6 Beta 1

Posted: Tue Aug 13, 2013 3:56 pm
by Jordy101091
Benj wrote:Hello,
In v5 your could customise the code and add a few nops to it and usually this fixes the problem, but I cant seem to find this option in v6.
Can you show me where you place the nops in v5 and I will add a small delay into the component for you.
Hi ben,

In v5 I put the nops in this peace of code "GetDefines":

Code: Select all

//Internal Prototypes
void MX_LCD_Enable (void);
void MX_Write_Command(char cmd, char chip);
void GotoXY(char x, char y);
void MX_WriteData(char data);
char MX_ReadData(void);


//Internal Functions
void MX_LCD_Enable (void)
{
	set_bit(MX_CONTROL_PORT, MX_ENABLE);
	//delay_10us(1);								//Min delay 450ns
	nop();
	nop();
	nop();
	nop();
	nop();

	clear_bit(MX_CONTROL_PORT, MX_ENABLE);
	//delay_10us(1);								//Min delay 1.5us
	nop();
	nop();
	nop();
	nop();
	nop();
}


void MX_Write_Command(char cmd, char chip)
{
normally I would place some nops between the already existing nops (x5), I don't know how many because this can very between displays with the same controller.
I would start with 4 extra nops.

Regards Jordy

Re: Flowcode v6 Beta 1

Posted: Tue Aug 13, 2013 4:03 pm
by kersing
Jordy101091 wrote:normally I would place some nops between the already existing nops (x5), I don't know how many because this can very between displays with the same controller.
I would start with 4 extra nops.
Sounds like the best option would be to make it configurable...

Re: Flowcode v6 Beta 1

Posted: Tue Aug 13, 2013 5:07 pm
by Benj
Ok give this one a whirl, there is now a property which allows you to configure the delay in us. If you would rather have a nop counter then I can do this but it may get a bit silly on fast devices to have hundreds or thousands of nops.
gLCD_KS0108.fcpx
(31.53 KiB) Downloaded 374 times
Is the switch array going to be included?
There were lots of bugs with cloning but should be all sorted now. LED array and switch array components are now included in the latest release.

Re: Flowcode v6 Beta 1

Posted: Tue Aug 13, 2013 5:36 pm
by Jordy101091
Hi ben

Im testing the updated component but no success yet, maybe its better to have a nop counter or something

I have attached a image to show the problem.

Image

Here it needs to say "Hello World" but its not correct.
Hope this will clearup what im trying to say.

Re: Flowcode v6 Beta 1

Posted: Wed Aug 14, 2013 2:24 pm
by Benj
Hi Jordy,
Im testing the updated component but no success yet, maybe its better to have a nop counter or something
What delays have you tried in the enable delay property? Think the default was 10us.

Re: Flowcode v6 Beta 1

Posted: Thu Aug 15, 2013 3:55 pm
by Jordy101091
Benj wrote:Hi Jordy,
Im testing the updated component but no success yet, maybe its better to have a nop counter or something
What delays have you tried in the enable delay property? Think the default was 10us.
Ben,

I have tried several different delays "10,20,25,30 ect" but nothing seems to make a difference.
Don't know what the problem is maybe my display is faulty don't know?.

Re: gLCD_KS0108 missing pixels

Posted: Sat Aug 17, 2013 9:00 pm
by Jordy101091
Hi Ben,

Have you tried your GLCD to replicate my problem.

Re: gLCD_KS0108 missing pixels

Posted: Sun Aug 18, 2013 3:17 pm
by dazz
HI Guys
sorry for the delay (not well)
been playing with ks0108 since 9 today.with very strange results, tried delays from 0 to 100( in 1's) no joy, what appears to be happening is it seems to blank out random lines, also i tried to print the following
wanted.jpg
wanted.jpg (10.42 KiB) Viewed 17304 times
But what i actually got on my glcd was this (sorry no pic(lost camera) had to mock it up in flowcode)
getting.jpg
getting.jpg (14.92 KiB) Viewed 17304 times
it's as if it on a vertical line it plots the last pixel on a page. and also seems to print the first and last horizontal lines of a page and just the first pixel of the following lines

Regards
DAzz

Re: gLCD_KS0108 missing pixels

Posted: Mon Aug 19, 2013 5:14 pm
by Benj
Hello,

Nearly recovered from the office move now and things starting to appear back out of boxes. I have a EB006 and the display so I will rig it up tomorrow and see if I can get anywhere.

Re: gLCD_KS0108 missing pixels

Posted: Tue Aug 20, 2013 12:43 pm
by Jordy101091
Hi ben,

I have just received my new GLCD KS0108, and I can confirm that the problem is not related to the GLCD itself.
The problem is in the code.
How is your test setup going. Im curious on what type of results you have with your LCD.

Regards Jordy

Re: gLCD_KS0108 missing pixels

Posted: Tue Aug 20, 2013 2:44 pm
by Benj
Hi Jordy,

Managed to dig out the LCD but not got round to wiring it up yet. Main problem is that my soldering iron is still at the bottom of a box and I haven't currently got a desk to set it up on. Moving is such a pain!!

I will try and get onto this tonight when I go home as it should be much easier to set it all up there. Probably something minor in my code. Do you have a working custom C code file for v5 or earlier which I could use for comparison?

Re: gLCD_KS0108 missing pixels

Posted: Tue Aug 20, 2013 3:01 pm
by Jordy101091
No I don't have a v5 code because the costum component doesn't allow me to pick the controll lines from different ports.
The controll and data line need to be on the seem port, but for v6 i can choose different ports and pins for the control lines.

Regards jordy

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 12:40 pm
by Benj
Hi Jordy,

I have got the hardware rigged up now but so far have been unable to get anything from the display. I'll keep on with it for now but it could be my display has become damaged, also could just be my micro.

Edit: working now - had shorted some of the bus pins together! I'm now getting the same graphical corruption on the text so let me see what I can do.

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 2:16 pm
by nnnnff
Do have a problem.
I in the proteus simulation is also the same problem.
The following is a screenshot:
1.JPG
(151.68 KiB) Downloaded 2749 times
2.JPG
2.JPG (33 KiB) Viewed 17228 times

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 3:08 pm
by Benj
Hi Jordy,

I've got it all working correctly now so the updated and fixed component will be included in the release later today. If it's looking like we won't get it out today then I will post the updated component here.

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 3:16 pm
by Jordy101091
Thank you very much for your work Ben.
Regards jordy

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 3:21 pm
by Benj
Hello,

As there are a couple of you waiting to test this here is the updated component. Simply drop into "Flowcode v6 Beta/Components" directory and restart Flowcode.

Edit - Attachment removed - update patchset 2 contains this fix.

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 3:51 pm
by Jordy101091
Hi ben,

I don't know what you have done but it works.
Awesome just another bug that can be scraped of the list :wink:

Anyway, thanks for the work you have put into this.

Regards Jordy

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 4:01 pm
by dazz
Hi Benj
works a treat out of interest what was wrong with the component code

Regards
Dazz

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 5:10 pm
by dazz
HI Benj
Forgot to say it wont sim numbers but will print them on hardware
Regards
Dazz

Re: gLCD_KS0108 missing pixels

Posted: Wed Aug 21, 2013 6:26 pm
by Benj
Cheers Guys,
works a treat out of interest what was wrong with the component code
There was a few bugs, firstly the clear function was very slow (took several seconds) due to the fact I was clearing each individual pixel rather then writing a byte at a time. This is now very fast. Secondly the new variable delay was not being used with the read function so the read modify write process of setting a pixel was failing. Thirdly the incoming value was not being manipulated correctly and so even with the delay in place the read macro still wouldn't have worked.
Forgot to say it wont sim numbers but will print them on hardware
Ok I will investigate, thanks :D