1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/document/gpio.htm Fri Aug 13 10:41:29 2010 +0100 1.3 @@ -0,0 +1,336 @@ 1.4 +<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN"> 1.5 + 1.6 +<html> 1.7 + 1.8 +<head> 1.9 +<title>GPIO Core</title> 1.10 +<meta http-equiv="content-type" content="text/html; charset=windows-1252"> 1.11 +<meta name="generator" content="RoboHelp by eHelp Corporation www.ehelp.com"> 1.12 +<link rel="stylesheet" href="lever40_ns.css"><script type="text/javascript" language="JavaScript" title="WebHelpSplitCss"> 1.13 +<!-- 1.14 +if (navigator.appName !="Netscape") 1.15 +{ document.write("<link rel='stylesheet' href='lever40.css'>");} 1.16 +//--> 1.17 +</script> 1.18 +<style type="text/css"> 1.19 +<!-- 1.20 +img_whs1 { border:none; width:29px; height:31px; float:none; border-style:none; } 1.21 +p.whs2 { font-style:italic; } 1.22 +table.whs3 { height:84px; margin-left:14px; left:0px; top:129px; width:637px; x-cell-content-align:Top; border-spacing:0px; } 1.23 +col.whs4 { width:85px; } 1.24 +col.whs5 { width:505px; } 1.25 +tr.whs6 { x-cell-content-align:top; height:22px; } 1.26 +td.whs7 { width:85px; padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-color:#c0c0c0; border-top-style:Solid; border-top-color:#c0c0c0; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-right-width:1px; border-left-width:1px; border-top-width:1px; border-bottom-width:1px; background-color:#dee8f4; } 1.27 +td.whs8 { width:505px; padding-right:10px; padding-left:10px; border-top-style:Solid; border-top-color:#c0c0c0; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-top-width:1px; border-bottom-width:1px; border-right-width:1px; background-color:#dee8f4; } 1.28 +td.whs9 { width:85px; padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-left-width:1px; border-left-style:Solid; border-right-color:#c0c0c0; border-right-style:Solid; border-right-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-bottom-width:1px; } 1.29 +td.whs10 { width:505px; padding-right:10px; padding-left:10px; border-right-color:#c0c0c0; border-right-style:Solid; border-right-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-bottom-width:1px; } 1.30 +table.whs11 { x-cell-content-align:top; margin-left:15px; border-spacing:0px; } 1.31 +col.whs12 { width:503px; } 1.32 +tr.whs13 { x-cell-content-align:top; } 1.33 +td.whs14 { width:85px; padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-color:#c0c0c0; border-top-color:#c0c0c0; border-top-style:Solid; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-right-width:1px; border-left-width:1px; border-top-width:1px; border-bottom-width:1px; background-color:#dee8f4; } 1.34 +td.whs15 { width:503px; padding-right:10px; padding-left:10px; border-top-color:#c0c0c0; border-top-style:Solid; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-color:#c0c0c0; border-bottom-style:Solid; border-top-width:1px; border-bottom-width:1px; border-right-width:1px; background-color:#dee8f4; } 1.35 +td.whs16 { width:85px; padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-width:1px; border-left-color:#c0c0c0; border-right-width:1px; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; } 1.36 +td.whs17 { width:503px; padding-right:10px; padding-left:10px; border-right-width:1px; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; } 1.37 +td.whs18 { width:588px; padding-right:10px; padding-left:10px; border-left-style:Solid; border-left-width:1px; border-left-color:#c0c0c0; border-right-width:1px; border-right-color:#c0c0c0; border-right-style:Solid; border-bottom-width:1px; border-bottom-color:#c0c0c0; border-bottom-style:Solid; } 1.38 +td.whs19 { width:85px; padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-left-width:1px; border-left-style:Solid; border-right-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-bottom-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; } 1.39 +td.whs20 { width:503px; padding-right:10px; padding-left:10px; border-right-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-bottom-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; } 1.40 +td.whs21 { width:588px; padding-right:10px; padding-left:10px; border-left-color:#c0c0c0; border-left-width:1px; border-left-style:Solid; border-right-style:Solid; border-right-color:#c0c0c0; border-right-width:1px; border-bottom-style:Solid; border-bottom-color:#c0c0c0; border-bottom-width:1px; } 1.41 +img_whs22 { border:none; width:14px; height:16px; float:none; border-style:none; } 1.42 +--> 1.43 +</style><script type="text/javascript" language="JavaScript"> 1.44 +<!-- 1.45 +function ehlp_showtip(current,e,text) 1.46 +{ 1.47 + if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape')) 1.48 + { 1.49 + document.tooltip.document.write("<layer bgColor='yellow' style='border:1px solid black;font-size:12px;'>"+ text + "</layer>"); 1.50 + document.tooltip.document.close(); 1.51 + document.tooltip.left=e.pageX+5; 1.52 + document.tooltip.top=e.pageY+5; 1.53 + document.tooltip.visibility="show"; 1.54 + } 1.55 +} 1.56 +function ehlp_hidetip() 1.57 +{ 1.58 + document.tooltip.visibility="hidden"; 1.59 +} 1.60 +//--> 1.61 +</script> 1.62 +<script type="text/javascript" language="JavaScript" title="WebHelpInlineScript"> 1.63 +<!-- 1.64 +function reDo() { 1.65 + if (innerWidth != origWidth || innerHeight != origHeight) 1.66 + location.reload(); 1.67 +} 1.68 +if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) { 1.69 + origWidth = innerWidth; 1.70 + origHeight = innerHeight; 1.71 + onresize = reDo; 1.72 +} 1.73 +onerror = null; 1.74 +//--> 1.75 +</script> 1.76 +<style type="text/css"> 1.77 +<!-- 1.78 +div.WebHelpPopupMenu { position:absolute; left:0px; top:0px; z-index:4; visibility:hidden; } 1.79 +p.WebHelpNavBar { text-align:right; } 1.80 +--> 1.81 +</style><script type="text/javascript" language="javascript1.2" src="whmsg.js"></script> 1.82 +<script type="text/javascript" language="javascript" src="whver.js"></script> 1.83 +<script type="text/javascript" language="javascript1.2" src="whproxy.js"></script> 1.84 +<script type="text/javascript" language="javascript1.2" src="whutils.js"></script> 1.85 +<script type="text/javascript" language="javascript1.2" src="whtopic.js"></script> 1.86 +<script type="text/javascript" language="javascript1.2"> 1.87 +<!-- 1.88 +if (window.gbWhTopic) 1.89 +{ 1.90 + if (window.setRelStartPage) 1.91 + { 1.92 + addTocInfo("GPIO"); 1.93 + 1.94 + } 1.95 + 1.96 + 1.97 + if (window.setRelStartPage) 1.98 + { 1.99 + setRelStartPage("msb_peripherals.htm"); 1.100 + 1.101 + autoSync(0); 1.102 + sendSyncInfo(); 1.103 + sendAveInfoOut(); 1.104 + } 1.105 + 1.106 +} 1.107 +else 1.108 + if (window.gbIE4) 1.109 + document.location.reload(); 1.110 +//--> 1.111 +</script> 1.112 +</head> 1.113 +<body><script type="text/javascript" language="javascript1.2"> 1.114 +<!-- 1.115 +if (window.writeIntopicBar) 1.116 + writeIntopicBar(4); 1.117 +//--> 1.118 +</script> 1.119 +<h1>LatticeMico32 GPIO <a title="View Data Sheet" href="gpio.pdf" target="_blank" onmouseover="if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape')) ehlp_showtip(this,event,'View Data Sheet');" onmouseout="if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape')) ehlp_hidetip();"><img src="ds_icon_ast.jpg" x-maintain-ratio="TRUE" width="29px" height="31px" border="0" class="img_whs1"></a></h1> 1.120 + 1.121 +<p>The LatticeMico32 general-purpose input/output core (GPIO) provides 1.122 + a memory-mapped interface between a WISHBONE slave port and general-purpose 1.123 + I/O ports. The I/O ports can connect to either on-chip or off-chip logic.</p> 1.124 + 1.125 +<p class="whs2">*If the data sheet fails to open, see the 1.126 + note at the bottom of this page.</p> 1.127 + 1.128 +<h2>Revision History</h2> 1.129 + 1.130 + 1.131 + 1.132 +<table x-use-null-cells cellspacing="0" width="637" height="84" class="whs3"> 1.133 +<script language='JavaScript'><!-- 1.134 +if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table><table x-use-null-cells cellspacing='0' width='637' height='84' border='1' bordercolor='silver' bordercolorlight='silver' bordercolordark='silver'>"); 1.135 +//--></script> 1.136 +<col class="whs4"> 1.137 +<col class="whs5"> 1.138 + 1.139 +<tr valign="top" class="whs6"> 1.140 +<td bgcolor="#DEE8F4" width="85px" class="whs7"> 1.141 +<p class=Table 1.142 + style="font-weight: bold;">Version</td> 1.143 +<td bgcolor="#DEE8F4" width="505px" class="whs8"> 1.144 +<p class=Table 1.145 + style="font-weight: bold;">Description</td></tr> 1.146 + 1.147 +<tr valign="top" class="whs6"> 1.148 +<td colspan="1" rowspan="1" width="85px" class="whs9"> 1.149 +<p class=Table 1.150 + style="font-weight: normal;">3.1 (7.2)</td> 1.151 +<td colspan="1" rowspan="1" width="505px" class="whs10"> 1.152 +<p class=Table>Updated the Edge Capture Register clean method</p> 1.153 +<p class=Table>Made IRQ Mask register readable</td></tr> 1.154 + 1.155 +<tr valign="top" class="whs6"> 1.156 +<td colspan="1" rowspan="1" width="85px" class="whs9"> 1.157 +<p class=Table 1.158 + style="font-weight: normal;">3.0 (7.0 SP2)</td> 1.159 +<td colspan="1" rowspan="1" width="505px" class="whs10"> 1.160 +<p class=Table>Cleaned up code. No function change.</td></tr> 1.161 + 1.162 +<tr valign="top" class="whs6"> 1.163 +<td colspan="1" rowspan="1" width="85px" class="whs9"> 1.164 +<p class=Table 1.165 + style="font-weight: normal;">1.0</td> 1.166 +<td colspan="1" rowspan="1" width="505px" class="whs10"> 1.167 +<p class=Table>Initial release.</td></tr> 1.168 +<script language='JavaScript'><!-- 1.169 +if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) == 4)) document.write("</table></table><table>"); 1.170 +//--></script> 1.171 +</table> 1.172 + 1.173 +<h2>Dialog Box Parameters</h2> 1.174 + 1.175 +<table x-use-null-cells cellspacing="0" class="whs11"> 1.176 +<col class="whs4"> 1.177 +<col class="whs12"> 1.178 + 1.179 +<tr valign="top" class="whs13"> 1.180 +<td bgcolor="#DEE8F4" width="85px" class="whs14"> 1.181 +<p class=Table 1.182 + style="font-weight: bold;">Parameter</td> 1.183 +<td bgcolor="#DEE8F4" width="503px" class="whs15"> 1.184 +<p class=Table 1.185 + style="font-weight: bold;">Description</td></tr> 1.186 + 1.187 +<tr valign="top" class="whs13"> 1.188 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.189 +<p class=Table>Instance Name</td> 1.190 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.191 +<p class=Table>Specifies the name of the GPIO instance. Alphanumeric values 1.192 + and underscores are supported. The default is gpio.</td></tr> 1.193 + 1.194 +<tr valign="top" class="whs13"> 1.195 +<td width="85px" class="whs16"> 1.196 +<p class=Table>Base Address</td> 1.197 +<td width="503px" class="whs17"> 1.198 +<p class=Table>Specifies the base address for the device. The minimum boundary 1.199 + alignment is 0X80. Supported values are 0X80000000 to 0XFFFFFF80. The 1.200 + default is 0x80000000. If other components are included in the platform, 1.201 + the allowable values will vary.</td></tr> 1.202 + 1.203 +<tr valign="top" class="whs13"> 1.204 +<td colspan="2" rowspan="1" width="588px" class="whs18"> 1.205 +<p class=Table 1.206 + style="font-weight: bold;">Port Types</td> 1.207 +</tr> 1.208 + 1.209 +<tr valign="top" class="whs13"> 1.210 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.211 +<p class=Table>Output Ports Only</td> 1.212 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.213 +<p class=Table>Specifies the transfer mode of PIO ports as output only. 1.214 + This option is selected by default.</td></tr> 1.215 + 1.216 +<tr valign="top" class="whs13"> 1.217 +<td colspan="1" rowspan="1" width="85px" class="whs19"> 1.218 +<p class=Table>Input Ports Only</td> 1.219 +<td colspan="1" rowspan="1" width="503px" class="whs20"> 1.220 +<p class=Table>Specifies the transfer mode of PIO ports as input only. 1.221 + This option is deselected by default.</td></tr> 1.222 + 1.223 +<tr valign="top" class="whs13"> 1.224 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.225 +<p class=Table>Tristate Ports</td> 1.226 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.227 +<p class=Table>Specifies the transfer mode of PIO ports as tristate only. 1.228 + This option is deselected by default.</td></tr> 1.229 + 1.230 +<tr valign="top" class="whs13"> 1.231 +<td colspan="1" rowspan="1" width="85px" class="whs19"> 1.232 +<p class=Table>Both Input and Output</td> 1.233 +<td colspan="1" rowspan="1" width="503px" class="whs20"> 1.234 +<p class=Table>Specifies the transfer mode of PIO ports as both input and 1.235 + output. This option is deselected by default.</td></tr> 1.236 + 1.237 +<tr valign="top" class="whs13"> 1.238 +<td colspan="2" rowspan="1" width="588px" class="whs18"> 1.239 +<p class=Table 1.240 + style="font-weight: bold;">Port Width</td> 1.241 +</tr> 1.242 + 1.243 +<tr valign="top" class="whs13"> 1.244 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.245 +<p class=Table>Data Width</td> 1.246 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.247 +<p class=Table>Specifies the width of the I/O port, in bits. Supported 1.248 + values are 1 to 32. The default is 1.</td></tr> 1.249 + 1.250 +<tr valign="top" class="whs13"> 1.251 +<td colspan="1" rowspan="1" width="85px" class="whs19"> 1.252 +<p class=Table>Input Width</td> 1.253 +<td colspan="1" rowspan="1" width="503px" class="whs20"> 1.254 +<p class=Table>Specifies the input data bus width for an independent input/output 1.255 + GPIO, in bits. Supported values are 1 to 32. The default is 1.</td></tr> 1.256 + 1.257 +<tr valign="top" class="whs13"> 1.258 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.259 +<p class=Table>Output Width</td> 1.260 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.261 +<p class=Table>Specifies the output data bus width for an independent input/output 1.262 + GPIO, in bits. Supported values are 1 to 32. The default is 1.</td></tr> 1.263 + 1.264 +<tr valign="top" class="whs13"> 1.265 +<td colspan="2" rowspan="1" width="588px" class="whs21"> 1.266 +<p class=Table 1.267 + style="font-weight: bold;">IRQ Mode</td> 1.268 +</tr> 1.269 + 1.270 +<tr valign="top" class="whs13"> 1.271 +<td colspan="1" rowspan="1" width="85px" class="whs19"> 1.272 +<p class=Table>IRQ Mode</td> 1.273 +<td colspan="1" rowspan="1" width="503px" class="whs20"> 1.274 +<p class=Table>Provides IRQ signal output when a specified event occurs 1.275 + on input ports. This option is deselected by default.</td></tr> 1.276 + 1.277 +<tr valign="top" class="whs13"> 1.278 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.279 +<p class=Table>Level</td> 1.280 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.281 +<p class=Table>Generates an IRQ whenever a specific input is high and interrupts 1.282 + have been enabled for that input in the IRQ-MASK register. This option 1.283 + is deselected by default.</td></tr> 1.284 + 1.285 +<tr valign="top" class="whs13"> 1.286 +<td colspan="1" rowspan="1" width="85px" class="whs19"> 1.287 +<p class=Table>Edge</td> 1.288 +<td colspan="1" rowspan="1" width="503px" class="whs20"> 1.289 +<p class=Table>Generates an IRQ whenever a specific bit in the edge capture 1.290 + register is high and interrupts have been enabled for that bit in the 1.291 + IRQ-MASK register. This option is selected by default.</td></tr> 1.292 + 1.293 +<tr valign="top" class="whs13"> 1.294 +<td colspan="2" rowspan="1" width="588px" class="whs18"> 1.295 +<p class=Table 1.296 + style="font-weight: bold;">Edge Response</td> 1.297 +</tr> 1.298 + 1.299 +<tr valign="top" class="whs13"> 1.300 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.301 +<p class=Table>Either Edge</td> 1.302 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.303 +<p class=Table>Generates an IRQ on either low-to-high or high-to-low transitions. 1.304 + This option is deselected by default.</td></tr> 1.305 + 1.306 +<tr valign="top" class="whs13"> 1.307 +<td colspan="1" rowspan="1" width="85px" class="whs19"> 1.308 +<p class=Table>Positive Edge</td> 1.309 +<td colspan="1" rowspan="1" width="503px" class="whs20"> 1.310 +<p class=Table>Generates an IRQ on low-to-high transitions. This option 1.311 + is selected by default.</td></tr> 1.312 + 1.313 +<tr valign="top" class="whs13"> 1.314 +<td colspan="1" rowspan="1" width="85px" class="whs16"> 1.315 +<p class=Table>Negative Edge</td> 1.316 +<td colspan="1" rowspan="1" width="503px" class="whs17"> 1.317 +<p class=Table>Generates an IRQ on high-to-low transitions. This option 1.318 + is deselected by default.</td></tr> 1.319 +</table> 1.320 + 1.321 + 1.322 + 1.323 +<p><span style="font-weight: bold;"><B>Note</B></span>: If the data sheet fails 1.324 + to open, click <img src="qm_icon.jpg" x-maintain-ratio="TRUE" width="14px" height="16px" border="0" class="img_whs22"> on the Available Components toolbar, and 1.325 + then click the note button.</p> 1.326 + 1.327 +<script type="text/javascript" language="JavaScript"> 1.328 +<!-- 1.329 + if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == 'Netscape')) 1.330 + document.write("<div id='tooltip' class='WebHelpPopupMenu'></div>"); 1.331 +//--> 1.332 +</script><script type="text/javascript" language="javascript1.2"> 1.333 +<!-- 1.334 +if (window.writeIntopicBar) 1.335 + writeIntopicBar(0); 1.336 +//--> 1.337 +</script> 1.338 +</body> 1.339 +</html>