Lecture 12 Serial Character Based LCD

Lecture 12 Serial Character Based LCD - Character Based...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Character Based Liquid Crystal Displays ECET 209 – Lecture 12 Jeffrey J. Richardson Character LCD’s ECET 209 Purdue University 2 LCD Connections ECET 209 Purdue University 3 LCD Connections ECET 209 Purdue University 4 LCD Connections ECET 209 Purdue University 5 Micro Control of LCD Backlight VCC VCC 14 13 12 11 10 9 8 7 2 3 VCC VO DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 1 VSS Character LCD Line1 Character LCD Line2 6 A K E R/W RS 5 4 VCC Microcontroller ECET 209 Purdue University 6 Serial LCD’s Serial LCD’s VCC VCC 14 13 12 11 10 9 8 7 Asynchronous Serial Synchronous Serial Microcontroller 2 3 VCC VO DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 1 VSS Character LCD Line1 Character LCD Line2 6 A K E R/W RS 5 4 VCC Two-wire Interface ECET 209 Purdue University 7 Serial LCD Daughterboard Images are from Sparkfun.com ECET 209 Purdue University 8 Character LCD’s ECET 209 Purdue University 9 Liquid Crystal Displays • Display ASCII characters – Can also display “special” symbols • Require information to be written – Write data – Write control commands • Allow data to be read ECET 209 Purdue University 10 Character LCD’s • Must write both data and control words to LCD’s • Commands: – – – – Clear the display Position the cursor Turn the cursor on or off Control the style of cursor (line or block) ECET 209 Purdue University 11 Character LCD’s • Must write both data and control words to LCD’s • Data: – Strings of ASCII text – Numbers (also in ASCII) ECET 209 Purdue University 12 LCD Instructions ECET 209 Purdue University 13 LCD Instructions – Cursor Location Instruction Set DD RAM Address ECET 209 Code RS R/W DB7 0 0 1 DB6 DB5 DB4 DB3 DB2 DB1 DD Adress Purdue University DB0 Description Set the DD RAM Address (position the cursor) 14 LCD Instructions – Cursor Location ECET 209 Purdue University 15 LCD Instructions – Cursor Location Character LCD Line1 Character LCD Line2 Character LCD Line3 Character LCD Line4 Address of the first character is 8410 Address of the first character is 2010 Address of the first character is 6410 Address of the first character is 010 ECET 209 Purdue University 16 ECET 209 Purdue University 17 Sending Serial Data • Printf works with the serial port…all we need is a connection to the LCD • Configure USART for 9600, N, 8,1 • printf(”LCD Test Program…”); ECET 209 Purdue University 18 Actual Serial Connection ECET 209 Purdue University 19 Sending Serial Commands • Sending commands is a 2 step process – First we send 0xFE – Second we send the actual command value • Utilize the putchar() function to send single values to the LCD – putchar(0xFE); – putchar(0x01); ECET 209 // sending a command… // clear and home the LCD Purdue University 20 Questions? ECET 209 Purdue University 21 ...
View Full Document

This note was uploaded on 02/22/2012 for the course ECET 209 taught by Professor Richardson during the Fall '08 term at Purdue University-West Lafayette.

Ask a homework question - tutors are online