📄 acd1.htm
字号:
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta name="description" content="An example schematic and description for connecting up an LCD Module to the Parallel Port. Includes source code in C.">
<meta name="keywords" content="Parallel Port, Printer Port, Centronics Port, IEEE 1284, Centronics Mode, Nibble Mode, Byte Mode, EPP Mode, ECP Mode, ECP, SPP, EPP, Extended Capabilities Port, Enhanced Parallel Port, Data Sheets">
<title>Interfacing the Parallel Port to a 16 Character x 2 Line LCD</title>
</head><body leftmargin="0" topmargin="0" basefont="" face="ARIAL" background="ACD1_files/bgyellow.gif" marginheight="0" marginwidth="0">
<style type="text/css">
#TITLEBLOCK { text-decoration: none; color:#FFFFFF }
TD,P,FONT,A,LI,B {font-family : Arial}
PRE,TT {color:#100080}
</style>
<br><center>
<table boarder="0" width="95%"><tbody><tr>
<td width="25%"><center><a href="http://www.beyondlogic.org/"><img src="ACD1_files/beyondsmall.gif" alt="Beyond Logic" border="0"></a></center></td>
<td width="50%"><center>
<script type="text/javascript"><!--
google_ad_client = "pub-7725444460812017";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "0033FF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript" src="ACD1_files/show_ads.js">
</script><script src="ACD1_files/expansion_embed.js"></script><script src="ACD1_files/test_domain.js"></script><script>window.google_render_ad();</script><ins style="border: medium none ; margin: 0pt; padding: 0pt; display: inline-table; height: 60px; position: relative; visibility: visible; width: 468px;"><ins style="border: medium none ; margin: 0pt; padding: 0pt; display: block; height: 60px; position: relative; visibility: visible; width: 468px;"><iframe allowtransparency="true" hspace="0" id="google_ads_frame1" marginheight="0" marginwidth="0" name="google_ads_frame" src="ACD1_files/ads.htm" style="left: 0pt; position: absolute; top: 0pt;" vspace="0" scrolling="no" width="468" frameborder="0" height="60"></iframe></ins></ins>
<noscript><FONT COLOR=RED>This page is optimised with JavaScript 1.2. Currently your browser has JavaScript switched off.</noscript>
</center></td>
<td align="right" valign="CENTER"><br><font face="ARIAL">
<script language="javascript" src="ACD1_files/beyondmenu_plain.js"></script><script language="JavaScript1.2" src="ACD1_files/HM_ScriptDOM.js" type="text/javascript"></script><font size="-1">Sunday, April 12th, 2009</font><br></font></td></tr></tbody></table></center><table border="0" cellpadding="1" cellspacing="0" width="100%" frame="below"><tbody><tr><td align="center" bgcolor="BLUE" nowrap="nowrap"><font color="WHITE" face="ARIAL"><b></b></font><center><font color="WHITE" face="ARIAL"><b><a id="TITLEBLOCK" href="http://www.beyondlogic.org/index.htm#USB" onmouseover="HM_f_PopUp('elMenu1',event)" onmouseout="HM_f_PopDown('elMenu1')">Universal Serial Bus</a> <img src="ACD1_files/HM_More_white_down.gif"></b></font></center></td><td align="center" bgcolor="BLUE" nowrap="nowrap"><font color="WHITE" face="ARIAL"><b></b></font><center><font color="WHITE" face="ARIAL"><b><a id="TITLEBLOCK" href="http://www.beyondlogic.org/index.htm#uClinux" onmouseover="HM_f_PopUp('elMenu2',event)" onmouseout="HM_f_PopDown('elMenu2')">Embedded Internet</a> <img src="ACD1_files/HM_More_white_down.gif"></b></font></center></td><td align="center" bgcolor="BLUE" nowrap="nowrap"><font color="WHITE" face="ARIAL"><b></b></font><center><font color="WHITE" face="ARIAL"><b><a id="TITLEBLOCK" href="http://www.beyondlogic.org/index.htm#Legacy" onmouseover="HM_f_PopUp('elMenu3',event)" onmouseout="HM_f_PopDown('elMenu3')">Legacy Ports</a> <img src="ACD1_files/HM_More_white_down.gif"></b></font></center></td><td align="center" bgcolor="BLUE" nowrap="nowrap"><font color="WHITE" face="ARIAL"><b></b></font><center><font color="WHITE" face="ARIAL"><b><a id="TITLEBLOCK" href="http://www.beyondlogic.org/index.htm#DeviceDrivers" onmouseover="HM_f_PopUp('elMenu4',event)" onmouseout="HM_f_PopDown('elMenu4')">Device Drivers</a> <img src="ACD1_files/HM_More_white_down.gif"></b></font></center></td><td align="center" bgcolor="BLUE" nowrap="nowrap"><font color="WHITE" face="ARIAL"><b></b></font><center><font color="WHITE" face="ARIAL"><b><a id="TITLEBLOCK" href="http://www.beyondlogic.org/index.htm#Misc" onmouseover="HM_f_PopUp('elMenu5',event)" onmouseout="HM_f_PopDown('elMenu5')">Miscellaneous</a> <img src="ACD1_files/HM_More_white_down.gif"></b></font></center></td></tr></tbody></table><br>
<noscript></TD></TR></TABLE></CENTER></noscript>
<center>
<br>
<br>
<font color="GREEN" size="5">Interfacing Example - 16 Character x 2 Line LCD</font>
<br>
<table width="95%"><tbody><tr><td>
<ul>
<br>
<br>
<font size="+1">Description.</font>
<br><hr>
<ul>
<p>
This is the first interfacing example for the Parallel Port. We will start with something
simple. This example doesn't use the Bi-directional feature found on newer ports, thus it
should work with most, if no all Parallel Ports. It however doesn't show the use of the Status Port as an input.
So what are we interfacing? A 16 Character x 2 Line LCD Module to the Parallel Port. These
LCD Modules are very common these days, and are quite simple to work with, as all the logic
required to run them is on board.
</p>
</ul>
<font size="+1">Schematic</font>
<br><hr>
<ul>
<br>
<center><img src="ACD1_files/parlcd.gif" alt="Parallel Port to 16 Character x 2 Line LCD Schematic"></center>
<br>
</ul>
<font size="+1">Circuit Description</font>
<br><hr>
<ul>
<p>
Above is the quite simple schematic. The LCD panel's <i>Enable</i> and <i>Register Select</i> is
connected to the Control Port. The Control Port is an open collector / open drain output.
While most Parallel Ports have internal pull-up resistors, there are a few which don't.
Therefore by incorporating the two 10K external pull up resistors, the circuit is more
portable for a wider range of computers, some of which may have no internal pull up resistors.
</p>
<p>
We make no effort to place the Data bus into reverse direction. Therefore we hard wire
the <i>R/W</i> line of the LCD panel, into write mode. This will cause no bus conflicts on the
data lines. As a result we cannot read back the LCD's internal Busy Flag which tells us
if the LCD has accepted and finished processing the last instruction. This problem is
overcome by inserting known delays into our program.
</p>
<p>
The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -