Jump to content

Recommended Posts

I need a large LCD module for the project I am working on. I have found one that is 40x4. What is the largest LCD that BoostC/C++ will support? Is there a limit?

Share this post


Link to post
Share on other sites

Hi

 

What exactly do you mean by "BoostC/C** support"?

 

AFAIK any limitation would be from the PIC resources, not from the compiler.

 

 

 

Best regards

Jorge

Share this post


Link to post
Share on other sites

Well, what I mean is this. Is there a limitation to the size (lines/characters) that can be used when using BoostC or BoostC++ as the compiler? I have another compiler that is limited to no more than 20 characters and no more than 4 lines. So, if I want to use a 4x40 LCD, I can't use that particular compiler as it does not support the number of characters I need. Now, that is based on the library for the compiler, so it might work fine if I built my own library, but I haven't tried that. Plus, I woudl really ratehr use BoostC++.

 

Does that make more sense?

Share this post


Link to post
Share on other sites

Hi

 

Yes, it does a lot more sense since you put the actual issue on the table.

After all its not a matter of compiler capabilities or PIC resources, its a question of library limitations.

 

Well, I have a very special position about ready made libraries for small microcontrollers. Up to now I never used one and I'm not planing to ever do it.

But I recon that 4x40 is a reasonable limit for a library that, most probably, was designed to be used with LCD displays using the HD44780 controler or any of its many clones.

 

As you seem to have special needs in terms of the LCD, you would better choose it first and then check if it uses the HD44780 or compatible controler.

If it doesn't, there is a real chance that you won't find a ready made library for it.

 

If the LCD of your choice does use an HD44780 controller but its so large that the available libs don't handle it, you have to do it "my way".

Either recode the library or do it yourself from scratch.

 

It doesn't take much, all there is to be done is the LCD initialization and sending bytes/nibbles to it

Anything besides that is largelly application dependent so you would code it yourself anyway.

 

You can find everything you need in terms of sample code and explanations in the net. Just be carefull because the amount of online garbagge is, at least, as large as the amount of usefull stuff.

I would suggest the Microchip forum as a good starting point.

 

 

Best regards

Jorge

Share this post


Link to post
Share on other sites

I still don't think we're speaking the same language.

 

I realize that I could probably build my own library. I don't want to do that if I don't HAVE to (why recreate the wheel if there's a perfectly usable wheel to be used?).

 

So, the question is not about the PIC or the LCD controller. The question is about the boostC compiler. Is there a limit to what the boostC compiler can do with regards to the lcd library? in other words, when I use the command lcd_gotoxy(0,3) am I going to get an error because the library has no idea how to handle a 4 line lcd?

 

That being said, I guess there IS a question to be had regarding the lcd controller: perhaps the boostC compiler will not generate an error with the code I suggested above but will simply not compile it in a way that the lcd controller will understand, again due to a misunderstanding that the boostC compiler has regarding a 4 line lcd.

 

Is my question making any sense?

Edited by mityeltu

Share this post


Link to post
Share on other sites

Hi

 

We are speaking the same language. only you are mixing compiler with libraries.

 

The BoostC compiler, or any other one, have no limitations regarding any LCD module by the simple reason they "know" nothing about LCDs.

All a compiler knows is how to generate PIC binary code from a "C" source.

 

OTOH the libraries are pieces of "C" code that you can add to your program.

Given that, they were written by someone who certainly made a few choices and assumptions like we all do whenever we write a program.

Any features and limitations of the library would be depicted in the relevant manual.

 

 

 

BTW

Do you know why I never use ready made libraries?

By the simple fact that I had never seen one that I could classify as "perfectly usable".

They are all great for "school code", "teach yourself examples" and "beginner DIY projects", But when it come to real life professional projects, things are a bit more tricky.

For something as simple as a character LCD driver I don't even bother to look at the ready made library. I never even used exact copies if my own code accross projects.

For other heavier stuff, like an RTOS, I do use it after a good look at it and a few test programs.

Thats how I found a bug in NOVO has you can see in other topic in the forum.

In the forum you can also find an interesting topic about the EEPROM libraries.

Bugs in libraries do happen, and its not a Sourceboost exclusive. The first one I found was in a RTOS from Intel, when I was still a simple university student, back in 1985.

Since then I found many more on all sort of environments and programming languages.

 

 

Best regards

Jorge

Edited by JorgeF

Share this post


Link to post
Share on other sites

Ok, well, all that not withstanding, I purchased a 4x40 lcd module and have it working with the existing boostC library. I am able to use all 4 lines and all 40 characterws per line. That was all I wanted to know if it could do. All the other stuff is just cannon fodder.

 

It seemed to me like a pretty straight forward question but I do realize now that I was incorrectly using "compiler" when I should have been using "library". Anyway, the issue is resolved and I have my answer. I can use the existing boostC library on the 4x40 lcd module.

 

I apologize for the confusion.

 

Thank you for all your input.

Edited by mityeltu

Share this post


Link to post
Share on other sites

Hi

 

No need to thank for anything.

I'm glad the existing library suits your needs.

Anyhow, if it didn't, I had already found, among my projects, a piece of code that suits your needs.

 

 

Best regards

Jorge

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...