This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

defining port wirh reverse order

Hi,

I will use a 4-bit LCD with 8051.
But there is a problem, LCD's data pins are connected in reverse order.
i.e.
D7 to P2^0
D6 to P2^1
D5 to P2^2
D4 to P2^3

My previosly written program uses a port called Data which is defined as
#define Data P2

Now i want to simple change the "Data" definition with reversed ordered P2 pins, without changing the program itself.

How can i do this?

Parents
  • I am not an expert. Just for a few months, i am dealing with keil c51. I am looking for examples, articles etc. I write this program myself. But i have searched a lot of thing and i study some codes doing this job. Then i combine these and write my own code.

    The danger of using "examples" is that you learn NOTHING!. as I said "anyone who can write a LCD driver should have no problem with this"

    By using "examples" and sometimes asking here, you can get much mundane stuff to work, but when you get tasked with a real job, you will be blank.

    Write some code without using "examples" and make it work, you will learn more in less time.

    Erik

Reply
  • I am not an expert. Just for a few months, i am dealing with keil c51. I am looking for examples, articles etc. I write this program myself. But i have searched a lot of thing and i study some codes doing this job. Then i combine these and write my own code.

    The danger of using "examples" is that you learn NOTHING!. as I said "anyone who can write a LCD driver should have no problem with this"

    By using "examples" and sometimes asking here, you can get much mundane stuff to work, but when you get tasked with a real job, you will be blank.

    Write some code without using "examples" and make it work, you will learn more in less time.

    Erik

Children
No data