Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 5th November 2009, 10:01 PM   #136
Smile

Quote:
Originally Posted by AtomSoft View Post
Move the init out the while loop first of all I'll take a look at it closer in a minute
Any progress?
hkBattousai is offline  
Old 6th November 2009, 07:56 AM   #137
Default

good work man

keep it up
mosh11 is offline  
Old Yesterday, 03:17 AM   #138
Default

Hi,

Really nice work you guys. Its a very useful library.
Is there a way to invert the colors of display (black font with blue or green background) ?

Thanking in advance
haxan is offline  
Old Yesterday, 05:11 AM   #139
Default

Quote:
Originally Posted by haxan View Post
Is there a way to invert the colors of display (black font with blue or green background) ?
Yes, you need to add the bits in red,
Code:
void GLCD_Write_Data (unsigned char data){
	Wait_Not_Busy();
	GLCD_Data = data^0xff;
	b_GLCD_RS=1;
	b_GLCD_RW=0;
	b_GLCD_E=1;
	Delay();
	b_GLCD_E=0;
}

unsigned char GLCD_Read_Data(void){
	Wait_Not_Busy();
	TRIS_Data=0xff;
	b_GLCD_RS=1;
	b_GLCD_RW=1;
	b_GLCD_E=1;
	Delay();
	W=GLCD_Data^0xff;
	b_GLCD_E=0;
	TRIS_Data=0x00;
	return W;
}
Mike.
Pommie is online now  
Old Yesterday, 07:13 AM   #140
Default

Thank you Pommie for the quick reply, it has inverted the Data but now there is a new problem.

The backgound is still black and the text is inverter (Black font with blue background) what i wanted. However i actually wanted to make the complete background blue and only font black..

The attached image will help you understand what i meant.

The text is displaying okay but the background is annoying now

I have solved this issue but the method is really stupid so i was looking for a more professional solution for it
Attached Thumbnails
Unicorn GLCD demo.-untitled.jpg  
haxan is offline  
Old Yesterday, 07:52 AM   #141
Default

You must have changed some other part of the code as it works perfectly on mine. What happens if you call ClearScreen before printing the text?

Mike.
Pommie is online now  
Old Yesterday, 12:06 PM   #142
Default

what is your current code for:
Code:
void ClearScreen(void)
also pommie shouldnt this be more like:

Code:
void GLCD_Write_Data (unsigned char data){
	Wait_Not_Busy();
	GLCD_Data = ~(data);
	b_GLCD_RS=1;
	b_GLCD_RW=0;
	b_GLCD_E=1;
	Delay();
	b_GLCD_E=0;
}

unsigned char GLCD_Read_Data(void){
	Wait_Not_Busy();
	TRIS_Data=0xff;
	b_GLCD_RS=1;
	b_GLCD_RW=1;
	b_GLCD_E=1;
	Delay();
	W=~(GLCD_Data);
	b_GLCD_E=0;
	TRIS_Data=0x00;
	return W;
}

Last edited by AtomSoft; Yesterday at 12:09 PM.
AtomSoft is offline  
Old Yesterday, 12:41 PM   #143
Default

Pommie it gives the same result.

ClearScreen when called actually turns the screen complete black. Is it possible that my screen is running in inverted mode already. When (in proteus) the screen is powered on, it gives black background.



AtomSoft: Its the same thing, gives the same result I tried what you said earlier before asking question here on forum
haxan is offline  
Old Yesterday, 01:52 PM   #144
Default

Is this your GLCD clear screen?
Code:
void ClearScreen(void){
unsigned char i,j;
	b_GLCD_GCS1=1;
	b_GLCD_GCS2=1;	
	for(i=0;i<8;i++){
		GLCD_Write_Cmd(0x40);	//y=0
		GLCD_Write_Cmd(0xb8+i);	//x=0
		for(j=0;j<0x40;j++)
			GLCD_Write_Data(0x00);
	}
	SetPos(0,0);
}
AtomSoft is offline  
Old Yesterday, 01:54 PM   #145
Default

heh for some reason not working now

Last edited by AtomSoft; Yesterday at 02:12 PM.
AtomSoft is offline  
Old Yesterday, 02:13 PM   #146
Default

AtomSoft: It doesnt actually make any difference.

I have tried

GLCD_Write_Data(0x00);
and
GLCD_Write_Data(~(0x00));
and
GLCD_Write_Data(0xFF);


Still gives the same result
haxan is offline  
Old Yesterday, 02:46 PM   #147
Default

heh please tell me you are trying this in proteus
AtomSoft is offline  
Old Yesterday, 02:49 PM   #148
Default

If you are then try this:



also revert all the data back to normal, meaning If you changed the read data and others put them back to normal.... the only thing that should be changed is:

Code:
void GLCD_Write_Data (unsigned char data){
	Wait_Not_Busy();
	GLCD_Data =~data;
	b_GLCD_RS=1;
	b_GLCD_RW=0;
	b_GLCD_E=1;
	Delay();
	b_GLCD_E=0;
}
Attached Thumbnails
Unicorn GLCD demo.-glcd.jpg   Unicorn GLCD demo.-clipboard03.jpg  

Last edited by AtomSoft; Yesterday at 02:53 PM.
AtomSoft is offline  
Old Yesterday, 04:02 PM   #149
Default

Thank you so much

It finally works by changing the initial contents of Ram.

Will this work in real GLCD project aswell (i hope so)
haxan is offline  
Old Yesterday, 11:13 PM   #150
Default

it should heh.... and your welcome

ill test it out later on or tomorrow and ill take some pictures

Last edited by AtomSoft; Yesterday at 11:14 PM.
AtomSoft is offline  
Reply

Tags
demo, glcd, unicorn

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Unicorn Oscilloscope running GLCD 128x64 & Photo blueroomelectronics Micro Controllers 8 18th June 2007 03:06 PM
Help understanding the Unicorn Kyle-s4h Micro Controllers 2 5th June 2007 07:09 PM
Open MultiSim DEMO Files mayo General Electronics Chat 1 3rd May 2007 04:52 PM
mcuStudio an Eclipse based IDE for PIC: flash demo available octal Micro Controllers 0 23rd August 2006 06:44 AM
Honeywell HMR3000 DEMO KIT shermaine General Electronics Chat 5 26th May 2005 09:35 AM



All times are GMT. The time now is 12:04 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker