<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Classic/Legacy CodeWarriorのトピックRead/Write to GPIO!</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Read-Write-to-GPIO/m-p/133099#M634</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Folks! any thoughts for incrementing the value on GPIO_B_DR register? I want to increment the GPIO_B_DR value with factor of tow after every iteration but no luck so far;-) I'm getting the '0' value every time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any pointros to freescale usenet community/archive will be great help as people here don't seem that much participating for simple questions;-)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;register po;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move #$0002 , X:GPIO_B_DR);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;po = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X:GPIO_B_DR , X0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X0 , po);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;po = po + 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X0 , po);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X:GPIO_B_DR , X0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me put elaborate my question again. I want to write some value to GPIO b port and then i want o read that value do something (say increment or decrement) before updating (writing back) the B port again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ali&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The chip i'm using is 56f801 .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Oct 2006 19:14:52 GMT</pubDate>
    <dc:creator>ali_</dc:creator>
    <dc:date>2006-10-13T19:14:52Z</dc:date>
    <item>
      <title>Read/Write to GPIO!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Read-Write-to-GPIO/m-p/133099#M634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Folks! any thoughts for incrementing the value on GPIO_B_DR register? I want to increment the GPIO_B_DR value with factor of tow after every iteration but no luck so far;-) I'm getting the '0' value every time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any pointros to freescale usenet community/archive will be great help as people here don't seem that much participating for simple questions;-)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;register po;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move #$0002 , X:GPIO_B_DR);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;po = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while(1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X:GPIO_B_DR , X0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X0 , po);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;po = po + 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X0 , po);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;asm(move X:GPIO_B_DR , X0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me put elaborate my question again. I want to write some value to GPIO b port and then i want o read that value do something (say increment or decrement) before updating (writing back) the B port again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ali&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The chip i'm using is 56f801 .&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2006 19:14:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Read-Write-to-GPIO/m-p/133099#M634</guid>
      <dc:creator>ali_</dc:creator>
      <dc:date>2006-10-13T19:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Read/Write to GPIO!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Read-Write-to-GPIO/m-p/133100#M635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I can see 20 views but no one bothered to answer;-) Not that fun.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ali&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 14:21:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Read-Write-to-GPIO/m-p/133100#M635</guid>
      <dc:creator>ali_</dc:creator>
      <dc:date>2006-10-16T14:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Read/Write to GPIO!</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Read-Write-to-GPIO/m-p/133101#M636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Not much here to go on.&lt;BR /&gt;&lt;BR /&gt;1) Are you configuring the register for read and write operations prior to accessing it? Can you see that you read the contents of the register successfully?&lt;BR /&gt;&lt;BR /&gt;2) If indeed you are incrementing the value by a factor of two, you'd probably want to perform a shift on register X0's contents, rather than use an add instruction?&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2006 22:24:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/Read-Write-to-GPIO/m-p/133101#M636</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2006-10-16T22:24:28Z</dc:date>
    </item>
  </channel>
</rss>

