1 / 14

ECT 357

ECT 357. Ch 7 LCD’s. Today’s Quote: Patience is a quality you admire in the driver behind you and scorn in the one ahead.

Download Presentation

ECT 357

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ECT 357 Ch 7 LCD’s

  2. Today’s Quote: Patience is a quality you admire in the driver behind you and scorn in the one ahead. The end of the matter is better than its beginning, and patience is better than pride. Do not be quickly provoked in your spirit, for anger resides in the lap of fools. Ecclesiastes 7:8,9

  3. LCD pinout • 8 Data Lines • 3 Control Lines • Power/Ground • Contrast

  4. Data Lines • 4 bit interface • 8 bit interface • Control bytes determine interface • 4 bit interface uses upper four bits of data bus

  5. Control Lines • RS determines control code or displayable character. • RS=0 Control Code • RS=1 Displayable Character • R/W determines whether the LCD is being read from or written to. • R/W=1 Read from LCD • R/W=0 Write to LCD • E stands for Enable. The falling edge of the enable latches the data.

  6. Power/Ground/Contrast • Vdd supplies +5 V power to LCD • Vss supplies ground reference to LCD • Vo is the contrast level for the LCD • Vo is fixed on our board, but is generally variable through a trimpot or rotary potentiometer.

  7. LCD Intialization • 8 bit Raise E, send 0x38, Drop E, wait 40 usec Raise E, send 0x38, Drop E, wait 40 usec Raise E, send 0x38, Drop E, wait 40 usec Raise E, send 0x38, Drop E, wait 40 usec Raise E, send 0x01, Drop E, wait 40 usec Raise E, send 0x0C, Drop E, wait 40 usec Raise E, send 0x06, Drop E, wait 40 usec

  8. LCD Intialization • 4 bit Raise E, send 0x3, Drop E, wait 40 useconds Raise E, send 0x3, Drop E, wait 40 useconds Raise E, send 0x3, Drop E, wait 40 useconds Raise E, send 0x2, Drop E, wait 40 useconds Raise E, send 0x2, Drop E, wait 40 useconds Raise E, send 0x8, Drop E, wait 40 useconds Raise E, send 0x0, Drop E, wait 40 useconds Raise E, send 0x1, Drop E, wait 40 useconds Raise E, send 0x0, Drop E, wait 40 useconds Raise E, send 0xC, Drop E, wait 40 useconds Raise E, send 0x0, Drop E, wait 40 useconds Raise E, send 0x6, Drop E, wait 40 useconds

  9. Cursor Positioning • Determined by sending a control code between 0x80 and 0x87 for 1st line • Determined by sending a control code between 0xC0 and 0xC7 for 2nd line 80 81 82 83 84 85 86 87 C0 C1 C2 C3 C4 C5 C6 C7

  10. LCD Displayable Character Set • Lower Half, page 93 of book • User defined characters, page 94 of book • Special ASCII codes 0xDF degree symbol 0xE0 alpha symbol 0xE2 beta symbol 0XF4 ohm symbol 0xF6 sigma symbol 0xF7 pi symbol

  11. User Defined Characters • Character Generating RAM • 5x7 normal character usage • 5x8 user defined usage (cursor row)

  12. Character Codes for User-Defined Char # CGRAM code 0 0x40 1 0x48 2 0x50 3 0x58 4 0x60 5 0x68 6 0x70 7 0x78

  13. Character Creation Routine • Send CGRAM code as control code • Send first line of data as display code • Send second line of data as display code • Send 3, 4, 5, 6, 7 lines • Send eighth line of data as display code

  14. Display Debugging • Display Registers, Position in Code, etc • Switch screens • Visual display such as bar graph

More Related