<?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>CodeWarrior for MCUのトピックHow to read ADC Vrefh with bean</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-read-ADC-Vrefh-with-bean/m-p/169624#M5145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using CW 6.1 with the 08QG16 processor. I wanted to use the internal temperature sensor but when I went to configure the ADC bean I only get the IntTemp, IntBandgap but no Vrefh ADCH 11101 channel. I wanted to read the internal vrefh / vdd to have the most accurate readings. The bean does not seem to know about or allow this channel (bean v.141). I can look at the generated code and see where there is a Channels structure with the ADC channel numbers but cannot modify it directly since it is a read only bean. Has anyone else ever read the internal voltage referece / vdd ADC channel?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;James&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Dec 2007 21:30:09 GMT</pubDate>
    <dc:creator>jamesarm97</dc:creator>
    <dc:date>2007-12-03T21:30:09Z</dc:date>
    <item>
      <title>How to read ADC Vrefh with bean</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-read-ADC-Vrefh-with-bean/m-p/169624#M5145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using CW 6.1 with the 08QG16 processor. I wanted to use the internal temperature sensor but when I went to configure the ADC bean I only get the IntTemp, IntBandgap but no Vrefh ADCH 11101 channel. I wanted to read the internal vrefh / vdd to have the most accurate readings. The bean does not seem to know about or allow this channel (bean v.141). I can look at the generated code and see where there is a Channels structure with the ADC channel numbers but cannot modify it directly since it is a read only bean. Has anyone else ever read the internal voltage referece / vdd ADC channel?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;James&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2007 21:30:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-read-ADC-Vrefh-with-bean/m-p/169624#M5145</guid>
      <dc:creator>jamesarm97</dc:creator>
      <dc:date>2007-12-03T21:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to read ADC Vrefh with bean</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-read-ADC-Vrefh-with-bean/m-p/169625#M5146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT face="Helv" size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;We are aware of this issue and it will be fixed it in the next release of ProcessorExpert.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Helv" size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;The following steps can be used to workaround the problem:&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Helv" size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;- Configure all properties of the the ADC bean as you need (without the channel 29 for now)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;- Click on the 'Add channel' to add one more channel, select any unused pin (the best would be the PTA0_... if you haven't already used it)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;- Generate the code using the menu command Processor Expert / Generate Code '...'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;- Disable the generation for the ADC bean (click on the bean with right button and select Code Genearation / Don't write generated bean module&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;- Open the generated module of the ADC bean {bean_name}.c - probably ADC1.c and find the line that looks like&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;static const byte Channels[2] = {0x47,0x40}; /* Contents for the devicecontrol register */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;The number of channels and values may be different depending on what have youset.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;- Change the last value in the way that the lower 5 bits of this value will be the channel number = 29. In our example it will be 0x40 + (29 to hex) = 0x5D.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;static const byte Channels[2] = {0x47,0x5D}; /* Contents for the devicecontrol register */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;and save the file.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;- Compile the project and the channel 29 will be measured as the last channel instead of what is configured in the instpector.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;Please note that the changes in ADC bean instpector won't affect the codefrom now, because the code won't be re-generated for the ADC bean.&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Helv" size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;Best Regards&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;Vojtech Filip&lt;/FONT&gt;&lt;/P&gt;&lt;FONT face="Helv" size="2"&gt;&lt;FONT face="Helv" size="2"&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Helv" size="2"&gt;&lt;FONT face="Helv" size="2"&gt;Processor Expert Support Team&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2007 21:45:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-read-ADC-Vrefh-with-bean/m-p/169625#M5146</guid>
      <dc:creator>ProcessorExpert</dc:creator>
      <dc:date>2007-12-04T21:45:11Z</dc:date>
    </item>
  </channel>
</rss>

