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 3rd March 2009, 09:26 PM   #76
Default clear all screen

Hi, I tried the function ClearScreenZone with the function unplot(), but only erase the middle of the screen and I need erase all the screen. Can you help me please...thanks
juanog is offline  
Old 5th March 2009, 09:20 AM   #77
Default

Hi,

I have a display problem but not always present.At the launch of my program, the display is correct, and from a time, the display starts to be weird, cutting off the display ( see picture), point cloud ..

Have you any idea?

Thank you in advance
Attached Thumbnails
Unicorn GLCD demo.-100_3979.jpg  

Last edited by jorg1n; 5th March 2009 at 09:21 AM.
jorg1n is offline  
Old 5th March 2009, 01:36 PM   #78
Default

I don't know the technical explanation for that, but it can happen if you try to write a pixel at a location greater than y = 64 or x = 128. Hope that helps.
superbrew is offline  
Old 5th March 2009, 02:06 PM   #79
Default

You're right, it then yest sometimes greater than 64 and x greater than 128.
But how can I solve my problem? Is there a solution?
Thank you in advance
jorg1n is offline  
Old 5th March 2009, 03:43 PM   #80
Default

You will have fix whatever code writes to those locations and prevent it from doing so.
superbrew is offline  
Old 6th March 2009, 03:27 PM   #81
Default

Hi,

I have a problem to display images, while for others it works.
Here is the image I want to see:

Code:
const rom unsigned char UP_BUTTON[]={
 40 /*width */,
 9 /* height */,
 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xE7,
 0xFF , 0xFF , 0xFF , 0xFF , 0xC3 , 0xFF , 0xFF , 0xFF,
 0xFF , 0x81 , 0xFF , 0xFF , 0xFF , 0xFF , 0x00 , 0xFF,
 0xFF , 0xFF , 0xFF , 0xE7 , 0xFF , 0xFF , 0xFF , 0xFF,
 0xE7 , 0xFF , 0xFF , 0xFF , 0xFF , 0xE7 , 0xFF , 0xFF,
 0xFF , 0xFF , 0xFF , 0xFF , 0xFF
};
by:

Code:
PutLogo((rom char*)UP_BUTTON);
and here is my function:

Code:
void PutLogo(char rom *logo){
unsigned char w,h,bitcount,Byte;
	w=*logo++;
	h=*logo++;
	bitcount=0;
	do{
		for(i=0;i<w;i++){
			if(bitcount==0){
				bitcount=8;
				Byte=*logo++;
			}
			if(Byte&1) plot(XPos,YPos);
			XPos++;
			Byte/=2;
			bitcount--;
		}
		YPos++;
		XPos-=w;
	}while(--h);
}
and when I work mode step by step, I realized that it took as the value of "w" and "h" the value "0".

Have you any idea? because I tried everything and nothing happens, it always does, and I think it is that it takes an image of size 0x0.

Thank you in advance.
jorg1n is offline  
Old 6th March 2009, 03:45 PM   #82
Default

I had a problem with that as well. I changed the 'w' to another letter because 'w' is reserved. Hope that helps. Also, make sure you call SetPos before PutLogo.
superbrew is offline  
Old 9th March 2009, 05:37 PM   #83
Default

Hi,

thank you for your help, i change the "w" in "l" ans the "W" in "LL",
but I still have the same phenomenon, when I do "PutLogo" it takes to "0" for variable "h" and "l" ...

I take "PutLogo" before, and my "xpos" and "ypos" variables make the right values but when the instruction "PutLogo" it does not take into account the size defined ...
you have an idea?
thank you in advance

Last edited by jorg1n; 9th March 2009 at 05:39 PM.
jorg1n is offline  
Old 10th March 2009, 03:58 PM   #84
Default

Hi,
I have another concern, I changed the name of my variable w and sometimes it takes me more inconsistent values for width and height.
For example, for this picture:
Code:
const rom unsigned char CODE_CONTRUCTEUR_FR[]={
 128, /*width */
 9,   /*height*/
 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF,
 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF,
 0x1F , 0x0C , 0x06 , 0x07 , 0x1F , 0x0C , 0xE6 , 0x06,
 0x81 , 0xE0 , 0x9C , 0x41 , 0x20 , 0xC8 , 0x09 , 0xFE,
 0xCF , 0xE7 , 0x64 , 0xE6 , 0xCF , 0xE7 , 0xC4 , 0xF2,
 0xE7 , 0xCC , 0x9C , 0xFC , 0x39 , 0xCF , 0xC9 , 0xFC,
 0xCF , 0xE7 , 0xE4 , 0xE4 , 0xCF , 0xE7 , 0x84 , 0xF2,
 0xE7 , 0xCC , 0x9C , 0xFC , 0x39 , 0xCF , 0xC9 , 0xFC,
 0xCF , 0xE7 , 0xE4 , 0x04 , 0xCF , 0xE7 , 0x14 , 0x86,
 0xE7 , 0xCC , 0x9C , 0xFC , 0x39 , 0xC8 , 0xC9 , 0xFC,
 0xCF , 0xE7 , 0xE4 , 0xE4 , 0xCF , 0xE7 , 0x34 , 0x3E,
 0xE7 , 0xE0 , 0x9C , 0xFC , 0x39 , 0xCF , 0x09 , 0xFE,
 0xCF , 0xE7 , 0x64 , 0xE6 , 0xCF , 0xE7 , 0x74 , 0x3E,
 0xE7 , 0xE4 , 0x9C , 0xFC , 0x39 , 0xCF , 0x49 , 0xFE,
 0x1F , 0x0C , 0x06 , 0x07 , 0x1F , 0x0C , 0xF6 , 0x82,
 0xE7 , 0xCC , 0xC1 , 0xC1 , 0x39 , 0x18 , 0xCC , 0xFC,
 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF,
 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF
};
It takes me to:
larg = 230;
haut = 106;

here is my function "PutLogo":
Code:
void PutLogo(char rom *logo){
unsigned char larg,haut,bitcount,Byte;
	larg=*logo++;
	haut=*logo++;
	bitcount=0;
	do{
		for(i=0;i<larg;i++){
			if(bitcount==0){
				bitcount=8;
				Byte=*logo++;
			}
			if(Byte&1) plot(XPos,YPos);
			XPos++;
			Byte/=2;
			bitcount--;
		}
		YPos++;
		XPos-=larg;
	}while(--haut);
}
Have you any idea? I can not understand why?
I'm really stuck on my project, I was not going ...

Thank you in advance
jorg1n is offline  
Old 10th March 2009, 06:04 PM   #85
Default

Try this:
Code:
void PutLogo(char rom *logo){
unsigned char larg,haut,bitcount,Byte;
	larg=*logo++;
	haut=*logo++;
	bitcount=8;
	do{
		for(i=0;i<larg;i++){
			if(bitcount==8){
				bitcount=0;
				Byte=*logo++;
			}
			if(Byte&0x80) plot(XPos,YPos);
			XPos++;
			Byte*=2;
			bitcount++;
		}
		YPos++;
		XPos-=larg;
	}while(--haut);
}
superbrew is offline  
Old 11th March 2009, 08:19 AM   #86
Default

Hello,

I just test the function that you sent me, but this function sends the logos inverted over a width of 8 pixels.
But the thing I do not understand is that the function that I use works, but sometimes for certain logos, I see things he inconsistent, or even the time it takes to size "0x0".

Thank you for your help ...
jorg1n is offline  
Old 11th March 2009, 09:03 AM   #87
Default

The only way I can see that it could be inconsistent is if the logo data was in a far area. Try changing the pointers to far pointers and see if that fixes it.
Code:
const far rom unsigned char CODE_CONTRUCTEUR_FR[]={
void PutLogo(char far rom *logo){
You will have to change it in a few other places as well.

BTW, which pic chip are you using?

Mike.
Pommie is online now  
Old 11th March 2009, 09:05 AM   #88
Default

Thank you,

I will test this.
I am using a PIC 18F6722.
Thank you again
jorg1n is offline  
Old 11th March 2009, 09:11 AM   #89
Default

Quote:
Originally Posted by jorg1n View Post
I am using a PIC 18F6722.
That has 128k of program space and so the far pointer may fix it. Let us know the outcome.

Mike.
Pommie is online now  
Old 11th March 2009, 11:50 AM   #90
Default

Thank you Pommie ...
Everything works correctly, I added the "far" in all my statements and functions PutLogo ", and it works ...
A big thank you because I was beginning to despair ...
By against, could you explain why? What does the term "far"? I suppose it is the memory access ...

But in any case, thank you very much ...
jorg1n 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 11:46 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker