![]() | ![]() | ![]() |
| | #91 |
|
The chip that you chose has 128k of memory and most compilers assume that you will use a chip that has no more than 64k. With 64k of memory the address fits in 16 bits and so we can use near pointers (16 bit). When the address space gets bigger then we need bigger pointers. The far directive tells the compiler to use 24 bits as a pointer. You must have lots of data in your project. May I ask what it is? Mike. | |
| |
| | #92 |
|
My project has many variables (900 bytes in data memory), and approximately 97,656 bytes of program data. My application has several configuration menu and allows to measure several types of informations. Thank you for your help Pommie | |
| |
| | #93 |
|
Pommie, I have a little question to ask: - I want to display a "float" or "int" is that I convert my string variable, but I get a string of cloud of points. That's how I proceeded: Code: char DATAtoLCD[30]; float voltage; [...] voltage = 6.654; [...] sprintf (DATAtoLCD,"%6.2f",voltage); SetPos(73,19); PutMessage(DATAtoLCD); Thank you in advance | |
| |
| | #94 |
|
I use this. You will need to convert your number to an integer, though. Code: void displayNum(int x, int y, int theValue) {
char toPrint[4];
toPrint[0] = (theValue/1000)+48;
toPrint[1] = ((theValue%1000)/100)+48;
toPrint[2] = ((theValue%100)/10)+48;
toPrint[3] = (theValue%10)+48;
SetPos(x,y);
PutChar(toPrint[0]);
PutChar(toPrint[1]);
PutChar(toPrint[2]);
PutChar(toPrint[3]);
}
| |
| |
| | #95 |
|
The sprintf function in C18 does not support floating point. I suggest you look around for a ftoa function. Mike. | |
| |
| | #96 |
|
I had a play with this and here is the result. A quick and dirty ftoa routine. Code: void ftoa(float f,char* String,char Places){
long power;
char n,i;
power=1;
while(power*10<=f)
power*=10;
while(power>=1){
n=(char)(f/power);
f-=n*power;
power/=10;
*String++=n+'0';
}
*String++='.';
for(i=0;i<Places;i++){
f*=10;
n=(char)f;
f-=n;
*String++=n+'0';
}
*String=0;
}
Mike. | |
| |
| | #97 |
|
Hi AtomSoft, I used your function void loadimg(rom char *image); and the mikroelectronica bitmap generator, I'm using C18 compiler, but when I build the project I have this message of error: Error - section '.idata_main.o' can not fit the section. Section '.idata_main.o' length=0x00000400 Waht can I do? thanks | |
| |
| | #98 |
|
Please Pommie can you convert my logo to use in GLCD...thanks
| |
| |
| | #99 |
|
Ive been out of the field for a while but if i remember its a memory issue.Like a linker issue.Ask pommie or futz.They helped me with a similar issue. If i remember ill be sure to post the information for you.
__________________ 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 | |
| |
| | #100 |
|
Try reading this: Microchip Technology User Forums | |
| |
| | #101 |
| Try this, Code: const rom unsigned char Logo[]={
35,58,
0x20,0x01,0x00,0x00,
0xA0,0x03,0x00,0x20,
0x01,0x00,0x00,0x00,
0x08,0x10,0x00,0x00,
0x00,0x00,0x00,0x00,
0x90,0x00,0x08,0x01,
0x00,0x00,0x00,0x00,
0x00,0x21,0x00,0x40,
0x00,0x16,0x00,0x08,
0x09,0x20,0x12,0x00,
0xF2,0x80,0x10,0x00,
0x80,0x08,0x89,0x04,
0x08,0xBC,0x54,0x00,
0x40,0x40,0x12,0x02,
0x00,0x30,0x0A,0x08,
0x09,0x10,0x00,0x1C,
0x02,0x80,0xB4,0x45,
0x3E,0x00,0x04,0x00,
0x01,0x10,0x40,0x00,
0x18,0x00,0x80,0x8E,
0x02,0x66,0x0B,0xD4,
0x00,0x84,0xAC,0xA0,
0x0D,0x08,0xAC,0x85,
0x6B,0x00,0x60,0x2D,
0xF0,0x04,0x00,0xAB,
0x63,0x14,0x00,0x58,
0x0F,0xB5,0x01,0xC0,
0x9A,0xC1,0x08,0x00,
0xD6,0xCB,0x3A,0x00,
0xB0,0x02,0x6A,0x02,
0x80,0x95,0xD2,0x13,
0x00,0xB2,0x04,0x77,
0x00,0x60,0x24,0x44,
0x03,0x80,0x1A,0xC1,
0x23,0x00,0xD2,0x08,
0x23,0x02,0xC0,0x49,
0xD0,0x2A,0x80,0x59,
0x02,0x49,0x03,0xE8,
0x12,0x38,0xF7,0x5A,
0x8F,0x40,0x5A,0xAD,
0x3B,0x04,0x4A,0x00,
0x26,0xA4,0x90,0x47,
0x50,0x87,0x84,0x02,
0x22,0xD1,0x03,0xE4,
0x49,0xD5,0x19,0xA0,
0xA2,0x08,0xF2,0x00,
0x2D,0xA7,0x64,0x01,
0x48,0x96,0x5A,0x1C,
0x40,0x73,0x45,0xB2,
0x00,0x75,0xCE,0x68,
0x02,0x70,0x8C,0x68,
0x29,0x00,0x10,0x2B,
0xB4,0x00,0x60,0x9A,
0x7E,0x01,0x00,0x96,
0x56,0x0E,0x00,0x98,
0x43,0x0F,0x00,0x40,
0x13,0x84,0x01,0x90,
0x4A,0xD0,0x36,0x00,
0x00,0x48,0x00,0x00,
0x98,0x01,0x4C,0x51,
0x60,0x4D,0x80,0x2A,
0x05,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
0x00,0x00
};
Mike. | |
| |
| | #102 |
|
Hello, I want to display a "int". I have used the function of SuperBrew (displayNUM) Code: void displayNum(int x, int y, int theValue) {
char toPrint[4];
toPrint[0] = (theValue/1000)+48;
toPrint[1] = ((theValue%1000)/100)+48;
toPrint[2] = ((theValue%100)/10)+48;
toPrint[3] = (theValue%10)+48;
SetPos(x,y);
PutChar(toPrint[0]);
PutChar(toPrint[1]);
PutChar(toPrint[2]);
PutChar(toPrint[3]);
}
I use it like this: Code: int BacklightType; [...] BacklightType++; [...] displayNum(50,40, BacklightType); I guess I have "0010" but my character does nothing ... I also post my glcd.c so you can see my function "putchar". But I find the strange outcome ... Have you any idea? Thank you in advance | |
| |
| | #103 |
|
Hello, I return to you because I managed to correct my error display (declaration problem of my variables), but I would now like to add a function to write in large letters .. But I can not find a solution .. I thank you in advance | |
| |
| | #104 |
|
to write in large letters you have to make a new font. larger
__________________ 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 | |
| |
| | #105 |
|
Hello AtomSoft, I already create a new policy of width 8 and height 13, but I don't know how to use this. I want to make a function "putchar" to display the font. Could you help me? Will you or may already be a policy of this kind with a function call? Thank you in advance I have another problem, I use the function to display a "INT" of SuperBrew, but sometimes it displays symbols like my previous photo! and sometimes it works, would you also an idea about this problem? Thank you in advance AtomSoft | |
| |
|
| 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 |