PIC16F628 With Nokia 3310 LCD

General discussion on mikroC.
Author
Message
NeoMatrix
Posts: 128
Joined: 17 Mar 2005 17:28
Contact:

PIC16F628 With Nokia 3310 LCD

#1 Post by NeoMatrix » 16 Apr 2005 00:44

Hello

is any bedy have schematic and source to drive nokia 3310 lcd with pic16f628 i am begineer

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

#2 Post by LGR » 16 Apr 2005 04:03

Anton has it in Pascal.
If you know what you're doing, you're not learning anything.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: PIC16F628 With Nokia 3310 LCD

#3 Post by zristic » 16 Apr 2005 08:13


anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

3510i LCD

#4 Post by anton » 16 Apr 2005 15:35

Now that that one work fine, I’m busy with a program to use the NOKIA 3510i COLOR LCD.

I'ts 132 x 12bit x 132 and can display 4096 colors :-)

At the moment I can only get it to draw lines in different colours, but the text is a bit more difficult.

Any info will be appreciated.

As soon as it’s finish, I’ll post it here. :)

Anton

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: 3510i LCD

#5 Post by zristic » 16 Apr 2005 21:47

anton wrote:At the moment I can only get it to draw lines in different colours, but the text is a bit more difficult.
You should use const arrays for implementing font and then to draw letters as they are typed. This is what we did with dsPIC and PIC in general. We created a font, which is nothing else than a bitmat with all characters. If a letter is to be written, then you write a portion of the font which corresponds to the letter.

Once you succeed in image drawing, you will have fonts as well.

With the version mP/mB 3.0/2.0 you will be able to pass a pointer to const array as a parameter and to set font in this way. You can already do that in mikroC, btw.

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

#6 Post by LGR » 16 Apr 2005 22:04

There are actually programs which convert fonts into bitmaps. My daughters' Corel setup can create bitmaps from fonts pretty easily. With those small Nokia LCDs, you will need very small fonts; probably 3x5 pixels. The very small fonts need to be hand drawn. Larger ones can (and should) be created using a graphics program which can convert from truetype to greyscale to 1-bit. And the order of conversion makes a difference!

If you have mP 2.16, you don't have the pixel editor. I think the C has it, and I know that dsPIC Pascal has it. The BMP utility has a Nokia option, which allows you to draw pixel-by-pixel, and then automatically generate a const array. If you want to experiment with larger fonts and characters (and icons and images), go to sourceforge, and download the GIMP. It has a learning curve, but it can do anything. And it's free. :)
If you know what you're doing, you're not learning anything.

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

Re: 3510i LCD

#7 Post by LGR » 16 Apr 2005 22:10

zristic wrote:With the version mP/mB 3.0/2.0 you will be able to pass a pointer to const array as a parameter and to set font in this way. You can already do that in mikroC, btw.
I didn't see that in the mP 3.0 manual. I was wondering about that. In the GLCD library there were a couple of new procedures (GLCD_image and partial image, or something like that), which appeared to require very large arrays. Are those arrays dummy declarations, and how is all of that supposed to work? Maybe some new examples are needed. :?
If you know what you're doing, you're not learning anything.

User avatar
zristic
mikroElektronika team
Posts: 6608
Joined: 03 Aug 2004 12:59
Contact:

Re: 3510i LCD

#8 Post by zristic » 17 Apr 2005 09:27

LGR wrote:how is all of that supposed to work?

Code: Select all

program largecosntarray;

const largearr: array[1024] of byte = (.......);

procedure passlargearr(largearrparam: ^byte);
begin
....
end;

begin
  ...
   passlargearr(largearr);
  ...
end.
In this way you will pass the actual address of the const array to the procedure. It is like having a pointer to const array. You have to be careful here not to pass too short or too long array since there is no control for comparing pointer size to array size...

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

#9 Post by LGR » 17 Apr 2005 17:27

So if I understand correctly, you can simply pass a pointer into a parameter that was declared as a large variable (RAM) array? And you don't need to actually declare an array in RAM? Excellent!
If you know what you're doing, you're not learning anything.

anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

#10 Post by anton » 17 Apr 2005 18:20

You should use const arrays for implementing font and then to draw letters as they are typed. This is what we did with dsPIC and PIC in general. We created a font, which is nothing else than a bitmat with all characters. If a letter is to be written, then you write a portion of the font which corresponds to the letter.
Thank you. It's the same way i did with the Nokia 3310 LCD, and thats what i thought i would do.

I'm more strugling to figure out the color look-up table used when in 8bit mode and not 12bit mode for the color.

But give it time.

Anton :)

anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

#11 Post by anton » 21 Apr 2005 23:01

Update on Nokia 3510i LCD

Image

Image
Last edited by anton on 19 Jul 2005 01:34, edited 2 times in total.
Another proud user of LV 24-33A Development System and mikroPascal PRO for dsPIC :)
PortA not working? Add CMCON := 7; PortD not working? Add ADCON1 := 6;
To paste code on the forum, please use the [b] Code [/b] button !! ;)

LGR
Posts: 3204
Joined: 23 Sep 2004 20:07

#12 Post by LGR » 21 Apr 2005 23:19

What's the resolution on that LCD?
If you know what you're doing, you're not learning anything.

anton
Posts: 807
Joined: 23 Sep 2004 09:16
Location: South-Africa
Contact:

#13 Post by anton » 22 Apr 2005 12:52

What's the resolution on that LCD?
98 x 67 pixels
256 Color in 8 bit mode or 4096 Color in 16 bit mode.

These pictures are in 8 bit mode

Anton

xeeshanz
Posts: 1
Joined: 10 Apr 2009 21:02

Image conversion help

#14 Post by xeeshanz » 10 Apr 2009 21:04

hey cool work i am also interfacing the 3510 lcd and i am having trouble in converting the image to a lookup table how did u converted the image??

NuMcA
Posts: 37
Joined: 24 Dec 2009 17:08
Location: Athens, Greece
Contact:

Re: PIC16F628 With Nokia 3310 LCD

#15 Post by NuMcA » 13 Oct 2010 12:10

Does anyone have the library from ANTON (http://www.riecktron.com/en/) from MikroBASIC PRO? I want to drive a NOKIA 3310 LCD with a PIC16F887..
Thank you!
My simulation cockpit and other projects: www.numca.grImage

Post Reply

Return to “mikroC General”