• AVR Freaks

How to use graphics Library

Page: < 123 Showing page 3 of 3
Author
HOODEY
Super Member
  • Total Posts : 580
  • Reward points : 0
  • Joined: 2005/02/08 06:06:31
  • Status: offline
Re:How to use graphics Library 2011/04/05 14:41:02 (permalink)
0
Okay was able to create a c file for the arial font.


but then I am gettin these warnings



Executing: "..\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24HJ128GP504 -x c -c   "Graphics\GOLFontDefault.c" -o".\obj\GOLFontDefault.o" -I".\h" -I".\Graphics\Include\Graphics" -I".\Graphics\Include" -D__DEBUG -g -Wall -mlarge-code -mlarge-data -mlarge-scalar -Os
Microchip MPLAB C30 License Manager Version v3_11 (Build Date Aug  6 2008).
Copyright (c) 2008 Microchip Technology Inc. All rights reserved.
The MPLAB C30 license has expired.
pic30-coff-cc1.exe: warning: Options have been disabled due to expired licens

I thought c30 was free?
#41
frankcf1
Super Member
  • Total Posts : 1105
  • Reward points : 0
  • Joined: 2009/01/09 08:20:10
  • Location: Northern New Jersey
  • Status: offline
Re:How to use graphics Library 2011/04/05 14:54:57 (permalink)
0
The full version is not free. The student and light versions are free. The only options disabled are for optimization. If you don't mind the warning don't worry about it, or download the free version.
 
#42
HOODEY
Super Member
  • Total Posts : 580
  • Reward points : 0
  • Joined: 2005/02/08 06:06:31
  • Status: offline
Re:How to use graphics Library 2011/04/06 14:33:27 (permalink)
0
http://bajanchameleon.com/mchipgrahpics.jpg
Does not bomb anymore but tries to create the meter.




#43
frankcf1
Super Member
  • Total Posts : 1105
  • Reward points : 0
  • Joined: 2009/01/09 08:20:10
  • Location: Northern New Jersey
  • Status: offline
Re:How to use graphics Library 2011/04/06 15:22:12 (permalink)
0
What are the dimensions of the meter. That's only a 128x64 display but it looks like you are asking for more than that.
 
#44
HOODEY
Super Member
  • Total Posts : 580
  • Reward points : 0
  • Joined: 2005/02/08 06:06:31
  • Status: offline
Re:How to use graphics Library 2011/04/07 13:27:36 (permalink)
0
fRANCF1 seems like you  are the only graphics expert on the forum.
 
//METER  *MtrCreate(WORD ID, SHORT left, SHORT top, SHORT right, SHORT bottom,
//      WORD state, SHORT value, SHORT range,
//      XCHAR *pText, GOL_SCHEME *pScheme) 
 
 
      meterScheme = GOLCreateScheme();
      meterScheme ->Color0 = BLACK;
      meterScheme->Color1 = WHITE;
      meterScheme->TextColor0 = BLACK;
      meterScheme->TextColor1 = WHITE;
      meterScheme->EmbossDkColor = WHITE;
      meterScheme->EmbossLtColor = BLACK;
      meterScheme->pFont = (void *) &Arial;
     
pMeter = MtrCreate(
            ID_METER,                               // assign ID
            20, 20, 108, 44,                       // set dimension
           MTR_DRAW|MTR_RING,             // draw object after creation
            1,                                             // set initial value
            5,                                             // maximum value
            (XCHAR *) MeterStr,                // Text Label
            meterScheme);                       // style scheme  
             
#45
frankcf1
Super Member
  • Total Posts : 1105
  • Reward points : 0
  • Joined: 2009/01/09 08:20:10
  • Location: Northern New Jersey
  • Status: offline
Re:How to use graphics Library 2011/04/08 08:34:29 (permalink)
0
I don't know about the expert part, but I've been doing user interfaces for 30 years. My first was done in Fortran on a PDP-11 for a VT-100 terminal.
 
I think your meter dimensions are too small. A meter takes up a lot of space for the lines and the text. Using a 10 point font the smallest I could get was a 125x63 pixel meter. That takes up your entire screen.
 
Frank
#46
AlainRTC
New Member
  • Total Posts : 18
  • Reward points : 0
  • Joined: 2010/09/28 08:44:52
  • Location: 0
  • Status: offline
Re:How to use graphics Library 2011/04/08 14:50:57 (permalink)
0
Hi Hoodey,

There are 3 versions of C30 :
* evaluation version : full functionality for 45 or 60 days, after this period you lose only optimization but you can continue to use it without any restrictions of time / lines of code,...
* Licensed version
* Lite version = free version : from the beginning it has no optimization

regards
#47
HOODEY
Super Member
  • Total Posts : 580
  • Reward points : 0
  • Joined: 2005/02/08 06:06:31
  • Status: offline
Re:How to use graphics Library 2011/07/02 16:49:46 (permalink)
0
I have re-kindle my interest in this...I am actually now seeing the meter needle but I am not seeing the lables on the meter.
#48
jnnewton
Super Member
  • Total Posts : 311
  • Reward points : 0
  • Joined: 2007/04/16 23:52:43
  • Location: USA
  • Status: offline
Re:How to use graphics Library 2011/07/08 08:40:07 (permalink)
0
I agree with the "too much information" point, but I think that it is more organization.  I think microchip's plan for us goes something like this:

1.  Download the Graphics Libraries & Designer.
2.  Buy a Development Board
3.  Read about how LCD's work.
4.  Read about the graphics libraries.
5.  Program some of the Demo's into your Dev Board.

I have completed steps 1-5, and I still have no idea what I'm doing.   Not a clue.  The Demo's are extremely complicated, with Dozens of source / header files with 1000's of lines of code in my dev board project.  We need a clear path from a blank project, through simple lines and colors to text, widgets and color look up tables that can guide us.  If anyone knows where this is, please chime in.  I would like to stress that it is very important, in order to understand how all this works, to start from a blank project, and understand, not what to add, but when and why to add what.  Otherwise, there is no understanding, only copying, which leaves us with only the ability to run demos, and not develop with the products Microchip provides.

I hope that I am simply missing some app note, but I have looked, and can't seem to find any.



I would probably change this a little bit now that I see all the replies to this thread, but I'll leave it as is.  I had my settings on Tree as opposed to Flat and Didn't notice any replies.
post edited by jnnewton - 2011/07/08 08:45:23
#49
frankcf1
Super Member
  • Total Posts : 1105
  • Reward points : 0
  • Joined: 2009/01/09 08:20:10
  • Location: Northern New Jersey
  • Status: offline
Re:How to use graphics Library 2011/07/08 10:53:28 (permalink)
0
I agree there is a lot missing in the graphics library documentation. If you are looking for something to give you everything you need to create a user interface you are not going to find it. You also won't find it from Microsoft or from whoever owns Java these days. Books have always been my best source but nobody has written one for the Microchip graphics library. AN1136 has a lot of good information and Microchip does have a class on the graphics library. If you work for a company get them to send you to the class. When Microsoft came out with Windows they had very little information available, same with Java. But Microsoft offered classes and I took them. I also took classes on the Java user interface. I also have every one of Petzold's books on Windows and several on the Java releases.
I find the demos are of very little use. It's just another person's idea of how to do it.
The library is almost 4 years old and Microchip keeps changing it to match the demos. This drives me crazy since my hardware doesn't look like any of the evaluation boards. I have product that was released in 2008 using a very early version of the library and product using later ones, therefore I have to keep everything around in case changes are needed. They should leave the library alone and make the demo software use it as is instead of adding all these i#f and #ifelse directives to match specific evaluation hardware. I'm not even sure if I'll use version 3.00 because it's too full of evaluation board choices.
To get back to how do you learn. Start simple, draw a line, change its color. Add a button, add some text. It's the only way to do it unless you can convince Petzold to write a book on the Microchip graphics library.
Frank
 
#50
jnnewton
Super Member
  • Total Posts : 311
  • Reward points : 0
  • Joined: 2007/04/16 23:52:43
  • Location: USA
  • Status: offline
Re:How to use graphics Library 2011/07/08 11:54:22 (permalink)
0
Surprisingly, that makes me feel a bit better.  Better in that I now know that I'm just not looking in the right place.  And yes, you're right, the demo stuff is driving me nuts.  I am trying to cut out all the non-applicable stuff to get down to the "bare-bones" of what is needed.   I have pared down the HardwareProfile.h file from 1200+ lines to under 200, although I haven't actually tried it yet, and I'm guessing it won't work properly the first round, at least I can start to see what's in there, although I don't know where to find what half of it actually means, or better yet, where it's used.  There's even some "auto-generated code", which i am assuming is somehow tied to the #include compiler.h .  I am currently searching the directories for this header to see what it does.  Thanks for the info.
#51
HOODEY
Super Member
  • Total Posts : 580
  • Reward points : 0
  • Joined: 2005/02/08 06:06:31
  • Status: offline
Re:How to use graphics Library 2011/07/21 08:19:53 (permalink)
0
Here is a clip of what is happening. I found a presentation from a masters course which assisted me a bit more. In the demo I am stuck with black and white colors but the meter seems to want to work. I just need some help.

Also there should be a production graphics board that simply connects the graphic lcd with serial or parallel input and possibly outputs.
it sole job is to display or provide repsonses when the screen is touch. It seems a deveolper would have to design his own board to accomplish this task.

This is just to make it ieasy to integrate with other systems. 
 
copy and paste into your browser.
http://bajanchameleon.com/graphics
post edited by HOODEY - 2011/07/21 12:23:38
#52
HOODEY
Super Member
  • Total Posts : 580
  • Reward points : 0
  • Joined: 2005/02/08 06:06:31
  • Status: offline
Re:How to use graphics Library 2011/08/16 17:05:39 (permalink)
0
Okay i have created the meter. Appreciate if some one can send me a 10 point font file. hoodey@hotmail.com
#53
Page: < 123 Showing page 3 of 3
Jump to:
© 2019 APG vNext Commercial Version 4.5