<?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>8-bit MicrocontrollersのトピックRe: DEMOQE ADC pin selection?</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/DEMOQE-ADC-pin-selection/m-p/164293#M10233</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Yup that was my problem, I was trying to feed it 5V when the MCU is running at 3V.&amp;nbsp; Also found out I needed to tie the ground of the DEMOQE board to the ground on the breadboard.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Mar 2009 03:35:24 GMT</pubDate>
    <dc:creator>trav</dc:creator>
    <dc:date>2009-03-22T03:35:24Z</dc:date>
    <item>
      <title>DEMOQE ADC pin selection?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/DEMOQE-ADC-pin-selection/m-p/164291#M10231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using a DEMOQE board and trying to setup the ADC on pin 18 of the header which is PTF0/ADP10.&amp;nbsp; I believe I have it setup right, but it reads a voltage of around 1.3V on that pin.&amp;nbsp; If I overdrive it to ground, my adc value will be 0, if I put voltage to it, it sources current like I'm shorting it.&amp;nbsp; Why is it doing this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is how I'm setting up the adc..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void InitADC(void) {&amp;nbsp;&amp;nbsp;&amp;nbsp; byte done = 0x00;&amp;nbsp; ADCSC1 = 0x0A;&amp;nbsp; ADCSC2 = 0x00;&amp;nbsp; ADCCFG = 0x04;&amp;nbsp;&amp;nbsp;&amp;nbsp; APCTL2 = 0x04; } void SetADC(byte adc_channel, byte aien_value) {&amp;nbsp; ADCSC1_AIEN = aien_value&amp;amp;0x01;&amp;nbsp; ADCSC1_ADCH = adc_channel;} //end SetADC&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Then my main looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;
void main(void) {&amp;nbsp; initSystems();&amp;nbsp; InitADC();&amp;nbsp; initLCD();&amp;nbsp; SetADC(0x0A,0x01);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // ADC10, enable interrupt&amp;nbsp; EnableInterrupts;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* enable interrupts */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ADCSC1 = 0x6A;//triggers adc&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Travis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:10:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/DEMOQE-ADC-pin-selection/m-p/164291#M10231</guid>
      <dc:creator>trav</dc:creator>
      <dc:date>2020-10-29T09:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: DEMOQE ADC pin selection?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/DEMOQE-ADC-pin-selection/m-p/164292#M10232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Travis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What level of external voltage are you applying?&amp;nbsp; If it should exceed the Vdd voltage for the MCU, a substantial current may flow into the pin, with the potential to permanently damage the MCU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At each I/O pin there is an intrinsic diode between the pin and Vdd, and it is this diode that conducts under these circumstances.&amp;nbsp; The pin current must not exceed the injection current limit specified in the datasheet. It is also possible for this current to raise the Vdd voltage level, above the maximum allowable limit.&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>Thu, 19 Mar 2009 12:02:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/DEMOQE-ADC-pin-selection/m-p/164292#M10232</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-03-19T12:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: DEMOQE ADC pin selection?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/DEMOQE-ADC-pin-selection/m-p/164293#M10233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Yup that was my problem, I was trying to feed it 5V when the MCU is running at 3V.&amp;nbsp; Also found out I needed to tie the ground of the DEMOQE board to the ground on the breadboard.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Mar 2009 03:35:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/DEMOQE-ADC-pin-selection/m-p/164293#M10233</guid>
      <dc:creator>trav</dc:creator>
      <dc:date>2009-03-22T03:35:24Z</dc:date>
    </item>
  </channel>
</rss>

