These constants could be renamed from: const word SCR_X_RES = 84 const word SCR_Y_RES = 48
to: const GLCD_X_PIXELS = 84 const GLCD_Y_PIXELS = 48 and also add: const GLCD_COLOR_BITS = 2 -- two colors The above constants could be put into your library file, since your glcd will never change size :) Your library could be called glcd_Nokia_3310.jal for things that are only related to your glcd. Matt. On Dec 14, 1:44 pm, mattschinkel <[email protected]> wrote: > Hey Paul, > > I had a chance to look at your code a bit. Your programming skills are > good. I just tried your circle and line procedures, and they do work > on my GLCD. > > Can you rename plot_pixel to lcd_write_pixel. This is one thing > glcd_common needs. You don't have to use glcd_common if you don't wish > to, but I can help. > > I see you only put the library file on your website. Is there a sample > file as well? I can't compile your program. > > Matt. > > On Dec 14, 1:27 pm, pdhaene <[email protected]> wrote: > > > I did try the glcd_common and could not get it to work with a simple > > include > > simply because there are some calls to procedures missing from the > > glcd_Nokia3310 lib > > It seemed to fit better with the glcd_ks0108 lib > > > But.. I totally agree with the general standard idea. > > > I have been programming in different languages for may years but I am > > a newcomer > > to Jal and embedded programming so any advice and proposals > > are most welcome. > > > I have tried to make my procedures as general as possible in my > > library and it was therefore > > I chose not to use Nokia in any names/signatures. > > > My experience is, as I wrote, a little limited and that is the reason > > why I wanted to present > > more experienced with my code and hopefully see it appear jallib > > > and finally :-) > > > I am used to see my x,y origin in the bottom left corner, and the > > Nokia lcd starts at the top > > So I thought that it would help to adapt to other lcd makes.. > > > Paul > > > On 14 Dec., 17:43, mattschinkel <[email protected]> wrote: > > > > > I have written a little graphics library for drawing graphics and > > > > printing on e.g. Nokia 3310. > > > > The reason for this is that need for a sort of GUI for the type of > > > > display and I found the 6 row > > > > addressing to restrictive. > > > > We will definitely welcome this library, but it will need some > > > discussion and changes. I hope to have some kind of standard for all > > > GLCD's. Mainly, the LCD should use glcd_common.jal for drawing shapes. > > > I would like to be able to draw circles & triangles on my color glcd > > > as well :) Some things are not common to all glcd's and should stay > > > within it's own library. > > > > There is also a recent font library that may be helpful. > > > > See 18f4620_glcd_touch_stm032qvt-003.jal and it's libraries. This is > > > the most recent work on glcd's. > > > > Try to make your sample compatible with a include block similar the > > > following: > > > var word LCD_BACK_COLOR = 1 > > > var word LCD_PEN_COLOR = 0 > > > include glcd_stm032qvt-003 > > > glcd_init() > > > include glcd_common > > > > You can also see a font include block in the file I mentioned. > > > > > I have chosen to use a screen cache. The reason for this is my wish to > > > > have OR, AND and XOR plotting. > > > > As a convenience (for me and maybe for others? ) > > > > So I assume you have a large array holding each value of the GLCD for > > > the cache? Are you not able to read pixel value from the LCD? > > > > > I have added a constant to define the Y origin. > > > > I'm not sure what you mean, what is this for? > > > > Matt. > > -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
