Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

First PIC GLCD project

Status
Not open for further replies.

Mimuwhen

Junior Member level 3
Junior Member level 3
Joined
Oct 7, 2014
Messages
29
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
284
Hello everyone,

This is my first post to your forum. Thanks for the valuable resource.

I'm fairly experienced with electroncs but only recently did I get into microcontrollers and I'm still very much in the process of learning. I've already done a few projects with my microcontroller (16F628A) and I'd really love to do something a bit more advanced.

I'm thinking of doing my first ever GLCD project. The problem is that the information out there is rather overwhelming and I have no clue where I should start. There is a very wide variety of LCD displays but I have no idea which one is the right one for me and which one would work with PIC. I'm aware to make a GLCD work one needs to have a library for it but I'm not sure how to obtain or make one.

My questions are
What materials do I need for this project? I would prefer to stay with PIC. Can it be done with my 628A?
What GLCD screen is easily available and easy to make work with PIC?
What kind of software do I need to make graphics to display on my GLCD?
Can it be done in BASIC, which is what I've used thus far, or is it better to use C? I do have mikroC on hand.

I really need somebody to point me in the right direction and I would be very thankful for any advice that you can offer! I like learning new things but often what I lack is a teacher.

Thank you!
 

Hi, welcome,
You can certainly use PICs to drive GLCDs. The one you mentioned doesn't have a lot of pins, but enough to drive most simple LCDs, assuming you don't need a lot of additional pins for other things. The main question is the size of the display you want to use, and often you want to refresh. For example, a 640x480 (VGA) pixel color display will require nearly 1MB of data per frame plus message overhead, so if you were looking to do 30fps video, it would mean a minimum of 30MB/s bandwidth and most 8-bit micros would not be able to handle it. On the other hand, a common small 128x64 pixel monochrome display will require only 1kB of data per frame and if you are only updating certain areas infrequently, e.g. lines of text, that PIC would be fine.

There are various interface types available, including mainly parallel, SPI, and I2C. For starting out, I would suggest parallel since getting SPI or I2C communications to work and troubleshooting them can be a little more difficult. I think you will also find that parallel displays are more commonly available. Most parallel displays will have an 8-bit data/address bus, as well as some other control lines, so the wiring is a little more involved than SPI or I2C, but it shouldn't be a problem. If you use that PIC, I would suggest only using 4 data/address lines if the display supports it. This will cut down on the wiring, but slow the maximum display update rate down. A very common parallel GLCD controller chip is the KS0108, and if you get/write code for that you can reuse it with other types of LCDs that also use this controller.

Yes, you will want to have a separate library for this, especially so you can copy it to other projects in the future, but you don't necessarily need to find one - you could make your own. If you are still learning, you might find it easier to use one someone else made however. It will depend somewhat on what language you prefer to use to. Most written for PICs and other small embedded micros are done in C. If you do some searching you should find some example code for PICs - here's one I found: http://sites.google.com/site/abdulla877/about/pic-tutorials/glcd-clock The link was on the page for this display from Sparkfun: http://www.sparkfun.com/products/710

I prefer C, but you can certainly use Basic. I'm also pretty sure mikroC has some GLCD libraries which should work fine. As far as application code, here is a pretty good page showing how to connect a GLCD to a PIC18 and make a menu system. It is for a serial display if you want to try that, but a lot of the information is still relevant to parallel displays. **broken link removed**

How you use the LCD driver will depend more on your application. There are some pre-canned graphics libraries, but you probably won't be able to do much with the Flash/memory available on that PIC. Text and basic shapes is probably about it.

I hope that gets you started!

Regards,
Angelo
 

Thank you very much for the inormation Angelo. After looking into it perhaps I may have gotten a little bit carried away starting off with a GLCD. Perhaps it's a better idea to start off with a regular 16x4 or 16 x 2 display.

Do you know of any good projects for that sort of thing? Like maybe a project where I can use a 16 X 2 display where I can select or change something on screen and change an output at one of the uC pins? It would be great if i can find something with it's code as that way I can look at the code and learn a thing or two from it.

Agan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top