# Nokia 6100 Library

Status
Not open for further replies.

#### AtomSoft

##### Well-Known Member
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:

So far i have:

CIRCLE, RECTANGLE, CHAR, STRING, BASIC COLORS

#### Attachments

• 6100.jpg
406.1 KB · Views: 2,979

#### DirtyLude

##### Well-Known Member
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.

#### birdman0_o

##### Active Member
Good job, where'd you get the LCD from though!

#### AtomSoft

##### Well-Known Member
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

Never mind...

Last edited:

#### AtomSoft

##### Well-Known Member
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.

#### AtomSoft

##### Well-Known Member
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 )

#### birdman0_o

##### Active Member
How do you use VB to decompose an image into pixels :O

#### AtomSoft

##### Well-Known Member
its a nice api called:

GetPixel

#### AtomSoft

##### Well-Known Member

24x9 bmp of 4 main colors RGB and Black
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,255,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,255,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,255,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,255,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,255,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,255,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,255,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,255,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,255,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,240,15,0,240,15,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,255,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,15,0,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,240,15,0,240,15,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,15,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,255,0,240,
15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,240,15,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,255,0,240,15,0,240,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,240,15,0,240,15,0,240,15,0,240,15,0,240,15,
0,240,15,0,240,15,0,240,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

Last edited:

##### Banned
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:

#### AtomSoft

##### Well-Known Member
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:
    max = width * height;

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

any thoughts????

#### AtomSoft

##### Well-Known Member
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?

##### Banned
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.

#### AtomSoft

##### Well-Known Member
hey guys this is killing me:

Code:
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..

#### Attachments

• err.jpg
103.6 KB · Views: 804
Last edited:

#### Attachments

• page7.jpg
236.2 KB · Views: 769

#### David James

##### New Member
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:
    max = width * height;

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

any thoughts????

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.

#### AtomSoft

##### Well-Known Member
the issue was it wasnt getting the data from the call but i fixed it somewhat;

Code:
    width = *bmp++;
height = *bmp++;

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

but ill try your suggestion for the math tho

UPDATE:

Code:
    width = *bmp++;
height = *bmp++;

maxPix = height;
maxPix = maxPix * width;

Works well! thanks

Last edited:
Status
Not open for further replies.

Replies
0
Views
2K
Replies
5
Views
2K
Replies
14
Views
4K
Replies
1
Views
2K
Replies
0
Views
2K