<?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>topic Re: How to read specific address in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-read-specific-address/m-p/183641#M13554</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Leinmi,&lt;/P&gt;&lt;P&gt;One way you could try is the following (for 8-bit registers):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define&amp;nbsp;&amp;nbsp;REGISTER_NAME&amp;nbsp;&amp;nbsp; (*((unsigned char*)&amp;nbsp;&amp;nbsp; (0xFFC0)));&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;unsigned char foo;&lt;/P&gt;&lt;P&gt;foo = REGISTER_NAME;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The definition statement simply defines "REGISTER_NAME" to point to the value at address 0xFFC0.&amp;nbsp; Then a declared variable of the same size (8-bit) can simply be assigned to the value of REGISTER_NAME.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;~belskyc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Mar 2010 03:20:40 GMT</pubDate>
    <dc:creator>belskyc</dc:creator>
    <dc:date>2010-03-31T03:20:40Z</dc:date>
    <item>
      <title>How to read specific address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-read-specific-address/m-p/183640#M13553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm only beginner using Freescale microcontrollers, so forgive me for my question. I'm sure it is trivial to most of you.&lt;/P&gt;&lt;P&gt;I'm useing MC68HC908QY4A microcontroller. I'd like to know how can i, using C-language, read specific memory address. The purpose is to store the value from that address to variable. Lets say that I vant to read FLASH memory address $FFC0 an dsore the factory set oscillator trimming value to a variable OSCTRIM. How will I do this (with C-language)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Leinmi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Mar 2010 16:02:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-read-specific-address/m-p/183640#M13553</guid>
      <dc:creator>Leinmi</dc:creator>
      <dc:date>2010-03-17T16:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to read specific address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-read-specific-address/m-p/183641#M13554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Leinmi,&lt;/P&gt;&lt;P&gt;One way you could try is the following (for 8-bit registers):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define&amp;nbsp;&amp;nbsp;REGISTER_NAME&amp;nbsp;&amp;nbsp; (*((unsigned char*)&amp;nbsp;&amp;nbsp; (0xFFC0)));&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;unsigned char foo;&lt;/P&gt;&lt;P&gt;foo = REGISTER_NAME;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The definition statement simply defines "REGISTER_NAME" to point to the value at address 0xFFC0.&amp;nbsp; Then a declared variable of the same size (8-bit) can simply be assigned to the value of REGISTER_NAME.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;~belskyc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 03:20:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-read-specific-address/m-p/183641#M13554</guid>
      <dc:creator>belskyc</dc:creator>
      <dc:date>2010-03-31T03:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to read specific address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-read-specific-address/m-p/183642#M13555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Leinmi, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also keep in mind that, if you&amp;nbsp;have&amp;nbsp;created a&amp;nbsp;CW project that will indirectly include the CW header file for the MCU (mc68hc908qy4a.h), this work has already been done for specific addresses in flash.&amp;nbsp; For the address 0xFFC0, a macro has been defined with the name &lt;FONT face="courier new,courier"&gt;Optional&lt;/FONT&gt;.&amp;nbsp; Also the control&amp;nbsp;register &lt;FONT face="courier new,courier"&gt;OSCTRIM&lt;/FONT&gt; is already defined&amp;nbsp;as the usual destination address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;OSCTRIM = Optional;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;should give the expected result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Mar 2010 22:32:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/How-to-read-specific-address/m-p/183642#M13555</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-03-31T22:32:28Z</dc:date>
    </item>
  </channel>
</rss>

