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.

Question on setting LCD up

Status
Not open for further replies.

bryan1

Well-Known Member
Hiya Guy's,
I'm on my next project using a 16f877a and I intend to use the 4 lower bits from portA to control the data lines in 4 bit mode. now the question is I can just label portA as lcd_data as is usually done, but what if I want to use the 2 remaing pins?. I've looked around on the net without finding any usefull answer so if someone can answer my query I'll appreciate it.

Cheers Bryan :D
 
bryan1 said:
Hiya Guy's,
I'm on my next project using a 16f877a and I intend to use the 4 lower bits from portA to control the data lines in 4 bit mode. now the question is I can just label portA as lcd_data as is usually done, but what if I want to use the 2 remaing pins?. I've looked around on the net without finding any usefull answer so if someone can answer my query I'll appreciate it.

Providing a label such as 'lcd_data' is simply a text replacement option, during assembly of the program every occurance of the text 'lcd_data' will be replaced by the number you assigned to it - or in this case, replaced by the number assigned to the port name you assigned to 'lcd_data'.

Hope that's clear! 8)

You can assign the same number (or port name) to any number of text names you like - as I said, it's simply repalced by the number assigned to it during assembly.
 
Just make sure you are using a program that can be easily reinstalled.
because everything has bugs. :wink:
 
mstechca said:
Just make sure you are using a program that can be easily reinstalled.
because everything has bugs. :wink:

Are you perhaps on some strange 'chemical experience'?, two completely useless posts in a row is a record even for you!.
 
Nigel Goodwin said:
Are you perhaps on some strange 'chemical experience'?, two completely useless posts in a row is a record even for you!.
Excuse me?
USELESS posts?
:lol:
At least I'm trying to help.

I could see now that any technical user with a broken hard drive is likely to buy one, put XP on it, and realize they have to install several win XP patches before being able to use a program, because the program may require those installed XP patches to work.

Don't tell me you never had to fight with Windows.
 
mstechca said:
Nigel Goodwin said:
Are you perhaps on some strange 'chemical experience'?, two completely useless posts in a row is a record even for you!.
Excuse me?
USELESS posts?
:lol:
At least I'm trying to help.

I could see now that any technical user with a broken hard drive is likely to buy one, put XP on it, and realize they have to install several win XP patches before being able to use a program, because the program may require those installed XP patches to work.

Don't tell me you never had to fight with Windows.

I tend to agree with Nigel on this one. The 2 posts you've done in this thread has nothing to do with the topic and what in the hell has windo$e xp got to do with setting up a LCD :?: I'm starting to think you would be better off learning " Would you like fries with that order" as 99% of your posts are complete rubbish.
 
Hi,

I would use this.


typedef struct
{
unsigned lcd_pins : 4; //This allocates 4 bits
unsigned remaining : 2; // you said uyou have to use two remaining //pins
}PORT_STRUCT;

PORT_STRUCT port_use; // a variable

THen in my code port_use.lcd_pins = 0x0; // any value like that.

This method may work out for you.
 
Status
Not open for further replies.

Latest threads

Back
Top