![]() | ![]() | ![]() |
| | #61 |
|
wow... thanks a lot dear jason it work very nice really you are professional. | |
| |
| | #62 |
|
na lol i wish i was. I would be making money lol. This is for fun and you are very welcome.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #63 |
|
Hi, I made the change so that I can write in black on a white background, it works very well with the function "PutMessage", but why can't i view my logo when i do "PutLogo", whereas before making the change I got to do what I wanted. I wish that my logo is black on a white background.. I think it would be nice to add some features like draw a circle, or add another size of font. I would also perform a function that clears a defined area, a function like: ClearScreenZone (x1, y1, x2, y2). Thank you in advance | |
| |
| | #64 |
|
I watched the "PutLogo" and it involves the "plot", so I presume it must change (reverse) data as you do in the function "putchar", but it does not work correctly. .. I inpression that the data are inverted, but they are not sent correctly. Here is the update: Code: void plot(unsigned char x,unsigned char y){
unsigned char d;
if(x>63){
b_GLCD_GCS1=1;
b_GLCD_GCS2=0;
x-=64;
}
else
{
b_GLCD_GCS1=0;
b_GLCD_GCS2=1;
}
GLCD_Write_Cmd(0x40+x); //write column address
GLCD_Write_Cmd(0xb8+(y>>3)); //write row address
d=GLCD_Read_Data(); //dummy read
d=GLCD_Read_Data();
d=~d; /////ADD
GLCD_Write_Cmd(0x40+x); //write column address again
d=d&(0xff-(1<<(y&7)));
GLCD_Write_Data(d);
}
Thanks in advance | |
| |
| | #65 |
|
i just started on the GLCD clock again. I thought since i had gained so much knowledge ill finish my first clock then continue. The pics below are all the clocks i have made and the last would be GLCD one but im still developing the menu for setting the time/date/alarm. The first one is the best TIME shower. I can see the time across the room at night when im sleepy and it doesn't disturb the eyes. The middle is my desk clock for now until the glcd is done.
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
| | #66 |
|
I am using almost the same code and it functions properly for me. My plot function has this line different: Yours Code: d=d&(0xff-(1<<(y&7))); Code: if(color)d=d|(1<<(y&7)); else d=d&(0xff-(1<<(y&7))); Code: void bhsmcircle(int xc,int yc,int r)
{
int x=0,y=r,dp;
dp=1-r;
for(;x<y;x++)
{
if(dp<0)
{
dp+=2*x+3;
}
else
{
dp+=2*(x-y)+5;
y--;
}
plot(x+xc,y+yc,1);
plot(-x+xc,-y+yc,1);
plot(x+xc,-y+yc,1);
plot(-x+xc,y+yc,1);
plot(y+xc,x+yc,1);
plot(-y+xc,-x+yc,1);
plot(-y+xc,x+yc,1);
plot(y+xc,-x+yc,1);
}
}
Last edited by superbrew; 26th February 2009 at 12:26 AM. | |
| |
| | #67 |
|
Hi, Thank you for your help. But according to your function "bhsmcircle",you call the function "plot", but there is 3 arguments: "plot(x+xc,y+yc,1)", the "1" corresponds to the variable "color"? Should we add the argument "color" has all the functions? Thank you again | |
| |
| | #68 |
|
I want to do a function for Clear a zone of the glcd as : ClearScreenZone (x1, y1, x2, y2) But I can not ... Can you help me if you like ... Thank you in advance | |
| |
| | #69 |
|
Try, Code: void ClearScreenZone(char x1,char y1,char x2,char y2){
char i,j;
for(i=y1;i<y2;i++){
for(j=x1;j<x2;j++)
unplot(i,j);
}
}
| |
| |
| | #70 |
|
Thank you, But i don't have function "unplot"... I think to do : Code: void ClearScreenZone(unsigned char x1,unsigned char y1,unsigned char x2,unsigned char y2){
unsigned char m,n;
for(m=y1;m<y2;m++)
{
for(n=x1;n<x2;n++)
{
if(n>63){
b_GLCD_GCS1=1;
b_GLCD_GCS2=0;
n-=64;
}
else
{
b_GLCD_GCS1=0;
b_GLCD_GCS2=1;
}
GLCD_Write_Cmd(0x40+n); //write column address
GLCD_Write_Cmd(0xb8+(m>>3)); //write row address
GLCD_Write_Data(0x00);
}
}
}
| |
| |
| | #71 |
|
It's good ... I succeeded, I created a "unplot" identical to "plot" and I replaced: Code: d=d|(1<<(y&7)); Code: d=d&(0xff-(1<<(y&7))); | |
| |
| | #72 |
|
Sorry, I forget that my plot function has a color argument added. Well, all my functions that draw something have a color argument added. That is why my plot function is different than yours.
| |
| |
| | #73 |
|
Hi SuperBrew, can you send me your file glcd.c because I too would like the opportunity to choose the color. And i have another question, how do you display a variable of type float or int, for do a voltmeter, for example. Thank you in advance Last edited by jorg1n; 26th February 2009 at 03:23 PM. | |
| |
| | #74 |
|
Hi, I have a problem when I want to write a message, I have a string of characters that is nothing ... and that since I added my functions "unplot", "circle" and "fillzone" ... I post therefore my glcd.c file, could you help me .. PS: "superbrew", can you send me your your glcd.c which also functions as setting the color of writing? Thanks in advance | |
| |
| | #75 |
|
Sorry this took so long. It is a work in progress, so it may be a little messy.
| |
| |
|
| 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 |