1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Nokia 6100 Library

Discussion in 'Microcontrollers' started by AtomSoft, Oct 27, 2009.

  1. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Hey guys great news!!! Im making a Nokia 6100 Color LCD library. WIll use SPI BitBang , 12bit color per pixel. Here is a image of some progress:

    [​IMG]

    So far i have:

    CIRCLE, RECTANGLE, CHAR, STRING, BASIC COLORS
     

    Attached Files:

    • 6100.jpg
      6100.jpg
      File size:
      406.1 KB
      Views:
      2,919
  2. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada
    Very nice. I ended up destroying the connector on my 6100. Watch if you try to unplug it from the board. It's definitely a pretty little LCD and not too hard to develop for. Main problem I've seen is the complaints about the different versions.

    If anyone finds a really cheap source, I might get another one or two, but right now I haven't found a need to replace my old broken one.
     
  3. birdman0_o

    birdman0_o Active Member

    Joined:
    Feb 23, 2009
    Messages:
    1,370
    Likes:
    18
    Location:
    Montreal, Quebec
    Good job, where'd you get the LCD from though!
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US

    Sorry lol forgot... I got it from eBay.. Came on a noce board for $15 .. You can also get from sparkfun cheaper but no board ..

    I'm tired like crazy..I'll post links in a little bit
     
  6. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
  7. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Never mind...
     
    Last edited: Oct 28, 2009
  8. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    hey guys i ran into a snag. I need a BMP converter the only thing is i have this code written using 12bit color code and dont want to use 8 bit.

    This is a 8-Bit converter:
    How to: Nokia 6100 LCD (english) | Zipfelmaus - Blog

    Anyone know where i can get a 12-bit version or similar application..

    Im sure i can make one in VB but heh dont have much time on my hands anymore.
     
  9. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US

    Attached Files:

    Last edited: Oct 29, 2009
  10. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Ok im working in VB6 and so far i can open a image and get the RGB of each pixel. Im not sure if im converting it correctly since i havnt tried it yet. But since the RGB is 4-4-4 for this LCD to be 12bit .... Im diving the 255,255,255 by 17 each this way the max of 255 is turned into 15(F)(1111) which is 4 bits.

    I hope this works heh.. Now i have to code the creation on data bytes. I need to connect every 2 parts together to make one byte and if then append a 0 to the end if need be (odd amount of pixel data)

    Wish me luck. Remember all the code and stuff will be shared and posted when complete or if i quite (most likely complete :D )
     
  11. birdman0_o

    birdman0_o Active Member

    Joined:
    Feb 23, 2009
    Messages:
    1,370
    Likes:
    18
    Location:
    Montreal, Quebec
    How do you use VB to decompose an image into pixels :O
     
  12. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    its a nice api called:

    GetPixel
     
  13. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    I am about to test out some hex it generated ill post a comment on it in a bit

    24x9 bmp of 4 main colors RGB and Black
     
    Last edited: Oct 30, 2009
  14. Sceadwian

    Sceadwian Banned

    Joined:
    Oct 27, 2006
    Messages:
    14,047
    Likes:
    141
    Location:
    Rochester, US
    RGB and black? What the heck colour pallet are you using?
    RGB at all FFs is white, RGB at all 00s is black, if you have a fourth colour it's either an alpha channel a mask or you badly mistyped something.
     
    Last edited: Oct 30, 2009
  15. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    heh i mean im trying RED, GREEN, BLUE, WHITE and BLACK color image...


    I ran into a issue::
    MAX = unsigned long
    the width and height = unsigned char
    Code (text):

        max = width * height;
     
    My problem is if width = 50 and height = 50 max should = 2500 but it = 196

    any thoughts????
     
  16. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    dude for this display it uses 4 bit color for each RGB so
    RED = 4 bit
    GREEN = 4 bit
    BLUE = 4 bit

    Now if pixel 1 is solid red you get F0,0
    and if pixel 2 is solid blue you get 0F,0

    but as decimals so thats.... 240,0,240 the way the lcd works is it will read the 2 bytes like

    RRRRGGGG,BBBBRRRR,GGGGBBBB = 11110000,0000,11110000

    you see?
     
  17. Sceadwian

    Sceadwian Banned

    Joined:
    Oct 27, 2006
    Messages:
    14,047
    Likes:
    141
    Location:
    Rochester, US
    That makes even less sense atom....
    RGB....
    All 00s == black. All FFs == white. There should be no separate bytes other than R G and B.
     
  18. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    hey guys this is killing me:

    Code (text):

    void LCDWriteBMP(unsigned rom char *bmp, unsigned char x, unsigned char y, unsigned char width, unsigned char height) {
    unsigned int j;
    unsigned int maxPix;
    unsigned int xmin, xmax, ymin, ymax;
    unsigned int i;

        maxPix = 0;

        //maxPix = (width * height);
        for(j = 0; j < height; j++) {
            maxPix += width;
        }

        xmin = x;
        xmax = x + width;
        ymin = y;
        ymax = y + height;

        LCDCommand(PASETP);
        LCDData(ymin);
        LCDData(ymax);

        LCDCommand(CASETP);
        LCDData(xmin);
        LCDData(xmax);

        LCDCommand(RAMWRP);

        for(j = 0; j < maxPix; j++) {
            LCDData(*bmp++);
        }
    }
     
    The above might work well... I call it like:

    LCDWriteBMP(bmp444,20,20,50,50);

    for some reason the values are mixed up or wrong..

    [​IMG]
     

    Attached Files:

    • err.jpg
      err.jpg
      File size:
      103.6 KB
      Views:
      746
    Last edited: Oct 30, 2009
  19. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
  20. David James

    David James New Member

    Joined:
    Jul 26, 2007
    Messages:
    54
    Likes:
    1
    Location:
    East Yorkshire, UK
    The calculation is being done in unsigned char (i.e. multiples of 256 are being dropped in the result), put another way:

    2500 = hex 9C4

    Hex C4 = 196

    You need to force the calculation to be done in unsigned long
    max = width;
    max = max * height;
    would probably do it or you could probably use explicit type casts.
     
  21. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    the issue was it wasnt getting the data from the call but i fixed it somewhat;

    Code (text):

        width = *bmp++;
        height = *bmp++;

        for(j = 0; j < height; j++) {
            maxPix += width;
        }
     
    but ill try your suggestion for the math tho

    UPDATE:

    Code (text):

        width = *bmp++;
        height = *bmp++;

        maxPix = height;
        maxPix = maxPix * width;
     
    Works well! thanks
     
    Last edited: Oct 31, 2009

Share This Page