-9
\$\begingroup\$

I am doing a project using PIC 18F4620 to display readings on a LCD. but I am not sure how my power, LCD and pic 18f4620 should be connected. Is there any suggested schematics??

\$\endgroup\$

closed as too broad by PeterJ, Peter Smith, Bence Kaulics, Autistic, uint128_t Jun 13 '16 at 2:58

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    \$\begingroup\$ It depends on the LCD type, if you can provide the LCD part number and datasheet then we can help you with the connections. \$\endgroup\$ – Oli Glaser Sep 11 '12 at 3:31
  • 4
    \$\begingroup\$ -1 for not providing any information about your particular LCD. \$\endgroup\$ – Olin Lathrop Sep 11 '12 at 12:33
5
\$\begingroup\$

Note:
like Olin comments I'm presuming you're using a character LCD, because that's what very often used by hobbyists, but also in industry. Two lines of 16 characters is a common format. Many of these LCD modules use a standard 14 pin interface (sometimes plus 2 for the backlight). This answer applies to these modules.

You connect data lines and control lines simply to GPIO (General Purpose I/O) pins of the PIC. The LCD has an 8-bit bus, but can work in 4-bit mode too, which saves you 4 I/Os.

enter image description here

In this example the R/W line is connected to ground, meaning you can only write to the LCD, not read. Most of the time that's not a problem, and it saves you another I/O pin. So the only two control lines you need are RS (Register Select), which indicates whether you're writing to a control or data register, and E (Enable), which latches the data in the LCD.

\$\endgroup\$
  • \$\begingroup\$ You should note that this only applies to the common "character" LCD display units. There is a wide range of stuff out there called "LCD". \$\endgroup\$ – Olin Lathrop Sep 11 '12 at 12:32
  • \$\begingroup\$ @Olin - You're right: assumptions... I clarified my answer. \$\endgroup\$ – stevenvh Sep 11 '12 at 12:40
4
\$\begingroup\$

There are many things that could be called "LCD". Steven assumed a particular type in his answer. That might be what you have, but it could just as well not be. You really need to give us details of your particular LCD.

At the lowest level, you could have a "bare glass" LCD. In that case, the PIC 18F4620 is not the right chip. At this level, the LCD lines need to be driven with special modulated AC signals. Some PICs have hardware for that purpose built in, but not the 18F4620. Generally Microchip puts a "9" near the end of the part number when the PIC includes a bare glass LCD driver.

All LCDs are ultimately driven with multiplexed AC signals, but some "LCDs" include a controller chip along with the bare LCD "glass". There are many different chips out there, and many different possible interfaces. Some use IIC, some SPI or SPI-like, and some still serial but different with separate read and write lines, for example. It all depends on the controller chip.

Then there is another distinction between a graphics LCD and one with specific segments. With a graphics LCD, you can ultimately display anything, but displaying text requires you to store a lot of bitmaps for the different characters or to do font generation on the fly. Usually graphics LCDs come with controller chips, and again those can have wildly different interfaces. LCDs with specific segments generally have several 7-segment digits, and you address each segment of each digit separately.

Some LCD units are even more complicated. They are basically graphics LCDs underneath, but have a controller chip with some fonts built in so that you can send ASCII characters and think of the whole thing as a character display. This is the type Steven was assuming in his answer. Many of this type do have the same interface, which can be either 4 bit or 8 bit parallel with some control lines. If this really is what you have, then Steven's answer applies.

\$\endgroup\$

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