gLCD_KS0108 missing pixels - Resolved

Please add any bug reports that require discussion here

Moderator: Benj

Forum rules
Only bug reports will be considered here. General questions should not be posted in this forum.
Post Reply
User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

gLCD_KS0108 missing pixels - Resolved

Post 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
the will to learn, should not be stopped by any price

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Flowcode v6 Beta 1

Post 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.
the will to learn, should not be stopped by any price

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode v6 Beta 1

Post 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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Flowcode v6 Beta 1

Post 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
the will to learn, should not be stopped by any price

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Flowcode v6 Beta 1

Post 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...
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode v6 Beta 1

Post 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 356 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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Flowcode v6 Beta 1

Post 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.
the will to learn, should not be stopped by any price

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Flowcode v6 Beta 1

Post 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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Flowcode v6 Beta 1

Post 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?.
the will to learn, should not be stopped by any price

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: gLCD_KS0108 missing pixels

Post by Jordy101091 »

Hi Ben,

Have you tried your GLCD to replicate my problem.
the will to learn, should not be stopped by any price

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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 16870 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 16870 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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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
the will to learn, should not be stopped by any price

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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?

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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
the will to learn, should not be stopped by any price

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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.

nnnnff
Posts: 107
Joined: Tue Oct 04, 2011 8:55 am
Has thanked: 3 times
Been thanked: 6 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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 16794 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: gLCD_KS0108 missing pixels

Post by Jordy101091 »

Thank you very much for your work Ben.
Regards jordy
the will to learn, should not be stopped by any price

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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
the will to learn, should not be stopped by any price

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: gLCD_KS0108 missing pixels

Post by dazz »

Hi Benj
works a treat out of interest what was wrong with the component code

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: gLCD_KS0108 missing pixels

Post by dazz »

HI Benj
Forgot to say it wont sim numbers but will print them on hardware
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: gLCD_KS0108 missing pixels

Post 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

Post Reply