I am using LPC1769 and it's port pins as below image.

DB0 to DB15: Port pins of LPC1769 used as data pins for LCD

Control Signals for LCD:

C/D : Register Select Command or Data

/WR : Write

/RE : Read

LCD_OE: Chip Select

LCD_R: LCD Reset


Since I have used different port/data pins (ie from port 0,1,2 and 4), does it cause any problem in functionality of LCD?

Thank you in advance.

  • 3
    \$\begingroup\$ Why are you tying all of your non-data pins HIGH? Doesn't tying /WR /RE /LCD OE & /LCD R high at once create an un-winnable situation (i.e., if all are active-HIGH, then you're enabling read, write & output enable, which makes read/write conflict, but then enabling reset too, which wipes evrrything out)? \$\endgroup\$ – Robherc KV5ROB Mar 2 '16 at 13:08
  • 1
    \$\begingroup\$ Also, what are you driving the LCD from? You've told us the LCD model, then told us that you're driving from different "ports," but not what those ports are attached to. Is it an ATMega? Arduino Uno? PC? Raspberry Pi? - Without knowing what the 'ports' are part of, we can't answer your direct question about using "different port/data pins" except to say that if you wire to match your software encoding, or code to match your wiring, port #s should be interchangeable. \$\endgroup\$ – Robherc KV5ROB Mar 2 '16 at 13:13
  • 2
    \$\begingroup\$ @RobhercKV5ROB I think the LPC1769 is the MCU and not the LCD model \$\endgroup\$ – TisteAndii Mar 2 '16 at 13:17
  • \$\begingroup\$ /WR,/RE,C/D,LCD_OE,LCD_R are control pins and assigned to LCD respective pins through pull up. My question is different port pins are capable of working of LCD without any malfunction in performance. \$\endgroup\$ – Electroholic Mar 2 '16 at 16:42

If you will be reading 16-bit data from the LCD with its parallel port, because you have used different LPC ports for the parallel port, it will take several lines of code (reading from each register, bit shifts and masking) to read from each port and combine the data into one 16-bit integer. This will probably not be much of an issue since all you will be reading is a few control registers (unless you decide to read the graphics RAM).

If you will be writing to the LCD with the same parallel port, again several lines of code will be needed to write one 16-bit integer. This may slow down the rate at which pixels are drawn to the screen, but this may be insignificant depending on what you are drawing to the screen; images = lots of dissimilar pixels to be written, so a slow refresh rate will be evident. Text, however, is usually a few pixels written against a uniform background, so you wont notice it as much. All this may still not matter depending on the screens size e.g. a 320x240 screen has fewer pixels than a 640x480 screen. With a fast enough peripheral clock, a smaller screen will do better.

However, if you connect the LCD parallel pins to one LPC port, you can read or write in one instruction basically.

PORTA = 0xFFFF; // write

data = PORTA; // read

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.