﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-派克大街-随笔分类-关于ARM</title><link>http://www.cppblog.com/kimtaini/category/4579.html</link><description>$ Park Avenue $</description><language>zh-cn</language><lastBuildDate>Fri, 23 May 2008 00:18:22 GMT</lastBuildDate><pubDate>Fri, 23 May 2008 00:18:22 GMT</pubDate><ttl>60</ttl><item><title>GPIO控制中同时将某口线拉高或拉低小技巧.</title><link>http://www.cppblog.com/kimtaini/archive/2007/06/20/26726.html</link><dc:creator>Jolly Roger</dc:creator><author>Jolly Roger</author><pubDate>Wed, 20 Jun 2007 14:44:00 GMT</pubDate><guid>http://www.cppblog.com/kimtaini/archive/2007/06/20/26726.html</guid><wfw:comment>http://www.cppblog.com/kimtaini/comments/26726.html</wfw:comment><comments>http://www.cppblog.com/kimtaini/archive/2007/06/20/26726.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/kimtaini/comments/commentRss/26726.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/kimtaini/services/trackbacks/26726.html</trackback:ping><description><![CDATA[利用IOSET和IOCLR寄存器可更改GPIO引脚的位。<br>但是IOSET和IOCLR对应写入&#8220;1&#8221;的位才能设置成高/低电平。例如：将P0口的[7:0]由状态0xA5改变为0x5A,<br>通过设置IO0SET和IO0CLR两步走会产生一段中间过程（有的系统允许存在这段时间的延时）。<br>对于只读寄存器IOPIN进行写操作可以解决上面产生中间状态的问题。仅需执行语句:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"&nbsp; IO0PIN = (IO0PIN &amp; 0xFFFFFF00) | 0x0000005A "即可。<br>说明：<br>　　IOPIN的内容和一个值相&#8220;与&#8221;（该值使要改变的引脚对应使用0来屏蔽，其他引脚对应1），再将相&#8220;与&#8221;的结果和期望得到的引脚输出对应的二进制数相&#8220;或&#8221;，并将相或的结果存入IOPIN寄存器中。<br>（注意：PHILIPS公司不推荐使用此做法。）<br>
<img src ="http://www.cppblog.com/kimtaini/aggbug/26726.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/kimtaini/" target="_blank">Jolly Roger</a> 2007-06-20 22:44 <a href="http://www.cppblog.com/kimtaini/archive/2007/06/20/26726.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>