Continue to Site

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.

  • 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.

how to write C coing for lcd

Status
Not open for further replies.
No one is going to do that for you.

You need to at least put some of your own effort into a project. We will help you with your work but we will not do it for you.

Even if we wanted to we could not because we do not know what processor, language or LCD you are using. Sort of like asking one to build a house without a plan. Do you want a mud hut or a pallace?

3v0
 
Most PIC development kits include drivers for LCD displays that just require a text write to an LCD command, if you cant code the details, just get a kit that that does it for you. If your using an LCD display with a serial input, the manual that came with it will explain all.
 
Last edited:
Most PIC development kits include drivers for LCD displays that just require a text write to an LCD command, if you cant code the details, just get a kit that that does it for you. If your using an LCD display with a serial input, the manual that came with it will explain all.

If the goal is to get the job done that is a great solution. If the goal is to learn it is wrong solution.

In general it is not a good thing to depend heavily on prepackaged solution when learning. Doing so lets the student feel they have acomplished somthing but at the cost of understanding.

Ballance is required.
 
Well 3vo, you have a point there, but coding drivers is a mind bend at times. I have found that the big picture application at hand is often the exciting reason for starting a project, not the the effort that gets buried in complicated device drivers. Nothing kills enthusiasm faster than problems with a seemingly simple LCD display message "full speed ahead".
 
Last edited:
Im getting the distinct feeling that school projects are a whole different world to the normal "get it done efficiently" mantra im used to. Im not sure plowing-thru-mud is the best way to maintain interest for newbies. I feel driver code is so generic these days, its a boring disinsentive reinventing the wheel all the time. Application engineering these days is so competitive, efficient big picture innovation is more usefull, I dont think driver detail neccessraily breeds a better understanding of real world applications. ie, drivers should be just another basic command, supplied by the device vendor.
 
A few week ago there was a post where the idea of building anything that already had been built was a yawn. The OP only wanted to build new and exciting things. How can anyone expect to build the new things when they are too lazy to learn the basics.

bassnut;677460.. said:
I feel driver code is so generic these days, its a boring disinsentive reinventing the wheel all the time. Application engineering these days is so competitive, efficient big picture innovation is more usefull, I dont think driver detail neccessraily breeds a better understanding of real world applications. ie, drivers should be just another basic command, supplied by the device vendor.
Where is it written that everything you learn is supposted to be a thrill ?

Embedded systems is all about interfacing to the real world. It is what sets it apart from other branches of computer science.

The goal of learning to drive well understood devices is not to drive these specific devices. It is to develop an understanding of driver code in a general sense. If you can not master the common devices your chances of writing code to drive custom hardware are nealy zero.

If your goal is to patch together existing bits then you may survive. But the first time you run into a custom chip or the hardware engineer changes the way a part is connected, you are toast.

3v0
 
A few week ago there was a post where the idea of building anything that already had been built was a yawn. The OP only wanted to build new and exciting things. How can anyone expect to build the new things when they are too lazy to learn the basics.


Where is it written that everything you learn is supposed to be a thrill ?

Embedded systems is all about interfacing to the real world. It is what sets it apart from other branches of computer science.

The goal of learning to drive well understood devices is not to drive these specific devices. It is to develop an understanding of driver code in a general sense. If you can not master the common devices your chances of writing code to drive custom hardware are nearly zero.

If your goal is to patch together existing bits then you may survive. But the first time you run into a custom chip or the hardware engineer changes the way a part is connected, you are toast.
Yes! Very eloquently put, 3v0. :D
 
Well 3vo, you have a point there, but coding drivers is a mind bend at times. I have found that the big picture application at hand is often the exciting reason for starting a project, not the the effort that gets buried in complicated device drivers. Nothing kills enthusiasm faster than problems with a seemingly simple LCD display message "full speed ahead".

While I accept that i am not an expert of software, what 3v0 said as reply to this post, is very apt and if i were to be in this position of the O P, I would coolly accept it, and start writing of my own, if get the problems, as it is more likely in early days, and come back only to discuss the problem.

I am of the opinion, that a person is only to pick up off shelf subroutines, and simply write a link patch, he could succeed for some time. When a problem is faced, where he is assigned to debug overnight, due to emergency of the situation, the person is likely to fumble.

It is just because, he/she never has tried to develop an organised habit of writing real software or real drivers.
 
Last edited:
Nice insight 3v0...

where do you suggest someone start learning from? A lot of people say learn basic electronics but the thing there is there is no good resource to learn from. They all leave you wanting more of an explanation.

That is why i think a bunch of people just jump into the subject of there choice and ask for help later. (like me)

Its like when i went to college to learn electronics they taught me other things i never knew why, such as english and compensation and other things. I found that its good to learn for the business part of any job but it throws you off the technical part.

I mentioned that because many tutorials and sites are the same. They want you to learn alot of things you might not need to and you get lost.

I know nothing about ATOMS, Protons etc... Yet i can do some things with electronics. I understand having basic knowledge of this is a good idea but to truly understand the basics of just that its a hassle since no one can write a descent electronics for dummies.

OK enough with my run on. The point is that there is no rule on what to learn first really.

Like when i first started i wondered what the hell is a resistor. I found out its a current limiter. But used in various ways it can cut voltages. Now if i read that i would be like ok i understand whats it for. The issue there is i never said how exactly to use it. Books don't really help. I get tired of reading a example over and over.

I want a real world example that is why i try and fail and ask you guys here. If not ill see whats on the web and copy it which isn't always a good idea. But like this guy who wanted "help" with LCD coding, he has no info on a starting point perhaps. That's why people copy code because no one can explain it to them they have to trial and error which sucks.

The sum of this would be if someone would help with the basics alone then they wouldn't be asking for help with the slightly difficult stuff. Now saying that... can someone be my tutor :D teach me the basics again. Resistors, capacitors, inductors, diodes, logic.

I know this was long but hey, I like to write even if it all doesn't make sense.
 
It makes sense Jason, and your right of course, as is 3vo, nicley put. I was playing devils advocate a tad there. Sometimes I get very frustrated with a small part of a project that you just cant get over, but on the other hand its those times that really teach you the most, and are the most satisfiing to solve.

In the end though, especially in a commercial enviroment, coding yet another stupid device driver gets to be expensive and time wasteing.
 
In the end though, especially in a commercial enviroment, coding yet another stupid device driver gets to be expensive and time wasteing.

You are still making excuses not not wanting to learn.

There are jobs where all you need to do is stitch together canned drivers with a bit of application code. It is the first to be outsourced because it is less difficult.

On the job one would not write a driver for kicks and giggles. But there will always be hardware where no driver exists. This is one of the areas where a good embedded programmer earns his keep.

On some projects the firmware engineer works with the chip designer. You have to keep up with his mostly undocumented and constantly changing design. He may come to you to solve problems he can not overcome in hardware. Or he may simply say I left this one for you.

Anyone can do the easy stuff.

3v0
 
3v0 it seems like you have a degree of some sort. If so what kind. If not how does one get a job doing embedded systems and stuff. Also what do you mean by hardware where no drivers exist?

Are you referring to someone building something with a uC and not programming it? If so then ok .

Please dont take this as me be mean or anything i just get lost easy :D
Being a hobby for me i would love to turn this into a job/career. If it was a job or even a school type of thing for me i bet i would know way more than i do now just because of the demand for me to know more.
 
..If not how does one get a job doing embedded systems and stuff.

In general a 4 year degree is EE or CS is required. Some people have a MS (masters of science) which is another couple of years. There are two year degrees in programming but I do not know how useful they are. From what I have seen a 2 year job will land a technician level job, engineering and higher require at least 4 years.​

Also what do you mean by hardware where no drivers exist?

Many designs include FPGA's or semi-custom or full custom chips. These chips are often controled by a uC. But because it is all new there are no existing drivers. But even existing devices can be used differently then expected and that requires unique driver code too.​

Are you referring to someone building something with a uC and not programming it? If so then ok .

Not sure what you mean. A uC without somthing around it is mostly useless. Execpt maybe as a learning tool.​

Please dont take this as me be mean or anything i just get lost easy :D
Being a hobby for me i would love to turn this into a job/career. If it was a job or even a school type of thing for me i bet i would know way more than i do now just because of the demand for me to know more.
It is hard to study this sort of thing with a family to support. People have done it successfuly but it means a lot of difficult work and doing without.
3v0

EDIT: I do not want to give the impression that I am against 2 year degree's. In some cases they offer a lot of bang for the buck. But I do not know how a person could cram enough into 2 years to do an engineers job.
 
Last edited:
It's like this, Jason: the driven people get the job done, no matter what.

You get a two year degree. That becomes the stepping stone to a job with a company that pays for you to take more classes. That is, most companies, seeing the advantage in having employees who constantly update/upgrade their skills, offer to pay your tuition and book fees IF YOU PASS. And, of course, if you take classes relevant to your job. So, an electronic tech with an AS in Electronics can hope to get compensation for future classes in programming and IT, as well as circuit design and board layout. You just have to wedge yourself into the right situations, hunt up jobs that most engineers don't want to handle, and do the leg work for them. This should make you VERY popular, and justifies your request later to take classes in those fields you keep handling at work as a side job. Get it?

I constantly advise my employer where his interests would be best served in the production department where I'm concerned. I buy small development kits that I apply to test beds and crank out more reliable products. I do a demonstration of these improved situations and he pays me for the kits. And, of course, he ends up paying me the time on the job I spent cobbling all this together. This doesn't always work, I don't always make my point, so I'm out the money for the kit. But I still get paid for the time, and I keep learning things, which end up on my resume as "acquired skills".

I swear I slept through most of my classes. I have Apnea, a sleeping disorder. I made it through tests by constant reading after class and my past experiences with circuitry before college. I can spell "transistor", but don't expect much after that. Then we got to digital circuits, and I found my calling. I now understand analog well enough to get the outside world to work with a microprocessor, and vice versa. In my present world, transistors are simply switches used to turn relays and motors on and off. 'Nuff said.
When the really math-intensive jobs come up I defer to my employer, he's the engineer. He excels at this stuff, so why should I stress over it? I remind him 12V logic can talk to TTL circuits through simple two-resistor dividers; the fancy, expensive converter chip is not necessary IN THIS CASE. I stress the last because YOU HAVE TO KNOW what you're talking about before you advise in these cases. The simple divider doesn't always work or apply. YOU MUST KNOW THE DIFFERENCE! You never stop learning. Never.

And if you have fun doing it, it's not work!
Happy holidays!
kenjj
 
I am in agreement with most thoughts, that the companies offer special training for its recruits, and also that the academic learning is all about reaching a specific level so that the fundamentals need not be taught again there.

Now at the student level, a person should stick to a defined curriculum and show his eminence.

The O P in this case has himself come up with a request "I m a new one pls help me to write the code for lcd". i don't think that he is in need of learning this unless his college syllabus would have wanted him.

Now one cant say that these are all not needed as the manufacturers provide drivers, and that one can do wonders tomorrow with FPGA programming as the situation needs. If one cant find resources for his college homework in 21st century where knowledge is made available on worldwide basis, It is impossible for one to do wonders tomorrow when real situations arise.

One of my bosses used to tell that while working in Telecom, if an engineer can think of using OHMS LAW to sort out a problem that he/she encounters while facing interruptions/down times, he is an engineer.

The education should be taken seriously as it inculcates and develops skill levels in the studentship, so that one can be purposefully useful for tomorrows society.

Sorry for long texts.
 
Last edited:
sorry friend

sorry friends
since i m new to this field i not mentioned the micro controller. i m using PIC16f877a and i like to do projects of my own so as a first thing i decided to do the simple one just to connect a keyboard and LCD and to display the content pressed in the keyboard. pls help me how to start of my own to code this project. if my way of starting is wrong tell me the right way to start
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top