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