<?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 How to Read MISO Data in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1292786#M45484</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using an external ADC (EVAL-AD7984-PMDZ) with my NXP board (LPC55S06-EVK) via the PMOD connector (J18). I have been trying, for a while now, to use the SPI protocol to pass data from my EVAL board to the microcontroller but to no avail.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ADC does not have any registers on-board -- data just freely flows out (but to where?). I have initialized the master and slave settings in my code, but I am just confused as to where the ADC data goes and how to read it.&lt;/P&gt;&lt;P&gt;I have attached screenshots of the relevant information below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_0-1623789812999.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147135i8330FD16BE5CAFD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_0-1623789812999.png" alt="caden013_0-1623789812999.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;EVAL-AD7984-PMDZ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_6-1623790034012.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147141i33D1B82FC2DAC266/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_6-1623790034012.png" alt="caden013_6-1623790034012.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_3-1623789885870.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147138i4CF1EE3B71AD6725/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_3-1623789885870.png" alt="caden013_3-1623789885870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_4-1623789927569.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147139i1FF55BA9A30EBE79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_4-1623789927569.png" alt="caden013_4-1623789927569.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_5-1623789963561.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147140iD235BC82E8AD0DB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_5-1623789963561.png" alt="caden013_5-1623789963561.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;LPC5SS06-EVK board&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jun 2021 20:48:43 GMT</pubDate>
    <dc:creator>caden013</dc:creator>
    <dc:date>2021-06-15T20:48:43Z</dc:date>
    <item>
      <title>How to Read MISO Data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1292786#M45484</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using an external ADC (EVAL-AD7984-PMDZ) with my NXP board (LPC55S06-EVK) via the PMOD connector (J18). I have been trying, for a while now, to use the SPI protocol to pass data from my EVAL board to the microcontroller but to no avail.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ADC does not have any registers on-board -- data just freely flows out (but to where?). I have initialized the master and slave settings in my code, but I am just confused as to where the ADC data goes and how to read it.&lt;/P&gt;&lt;P&gt;I have attached screenshots of the relevant information below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_0-1623789812999.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147135i8330FD16BE5CAFD7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_0-1623789812999.png" alt="caden013_0-1623789812999.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;EVAL-AD7984-PMDZ&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_6-1623790034012.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147141i33D1B82FC2DAC266/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_6-1623790034012.png" alt="caden013_6-1623790034012.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_3-1623789885870.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147138i4CF1EE3B71AD6725/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_3-1623789885870.png" alt="caden013_3-1623789885870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_4-1623789927569.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147139i1FF55BA9A30EBE79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_4-1623789927569.png" alt="caden013_4-1623789927569.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="caden013_5-1623789963561.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/147140iD235BC82E8AD0DB4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="caden013_5-1623789963561.png" alt="caden013_5-1623789963561.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;LPC5SS06-EVK board&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 20:48:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1292786#M45484</guid>
      <dc:creator>caden013</dc:creator>
      <dc:date>2021-06-15T20:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read MISO Data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1292944#M45487</link>
      <description>&lt;P&gt;SPI is a synchronous protocol, which you could basically envisage as shift registers.&lt;/P&gt;&lt;P&gt;The clock signal from the master shifts MOSI data out (master-out-slave-in), and MISO data in (master-in-slave-out) at the same time. The signal names apply from the master's view.&lt;/P&gt;&lt;P&gt;Since the ADC has no internal SPI-accessible register (and thus no real read implemented), it will probably return ADC results immediately.&lt;/P&gt;&lt;P&gt;But as mentioned in another thread of yours, I am not sure if the&amp;nbsp;&lt;SPAN&gt;LPC55S06 supports 18 bit transfers for the SPI peripheral. On a superficial glance, this MCU does not support it directly, and you would need to find a workaround. Check chapter 35 of the user manual (UM11424).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 04:59:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1292944#M45487</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-06-16T04:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read MISO Data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1293426#M45495</link>
      <description>&lt;P&gt;&lt;EM&gt;"&lt;SPAN&gt;There are no registers internal to the PulSAR ADC's, so there is no need for a data input line, the data just streams out using the CNVST pin" (from Analog Device's website).&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this external ADC does not accept any MOSI data, where does the MISO data go. How do I read it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;"Since the ADC has no internal SPI-accessible register (and thus no real read implemented), it will probably return ADC results immediately."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So how do I output these values? I want to use the printf function to output these values onto the screen.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"&lt;EM&gt;Check chapter 35 of the user manual (UM11424)."&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I will look into this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 16:00:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1293426#M45495</guid>
      <dc:creator>caden013</dc:creator>
      <dc:date>2021-06-16T16:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Read MISO Data</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1293854#M45508</link>
      <description>&lt;P&gt;As said, SPI is synchronous and full duplex. In your case, you would need to send dummy data. Actual content would not matter.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; So how do I output these values? I want to use the printf function to output these values onto the screen.&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You would get the ADC results via a SPI transfer. Consult the SDK code for ways to access SPI on your MCU.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, check the ADC datasheet on how to start the conversion, and the sampling/conversion times. You might need to consider this timing requirements for your solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For "printing onto the screen", just enable the semihosting feature of the IDE, and use printf.&amp;nbsp; But keep in mind that the semihosting output rate is limited.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And, I think the SPI transfer size of 18 bit for this ADC is still a question to solve.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 07:11:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/How-to-Read-MISO-Data/m-p/1293854#M45508</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-06-17T07:11:37Z</dc:date>
    </item>
  </channel>
</rss>

