<?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>LPCXpresso IDEのトピックRe: 25MHz pin toggle - LPC178x</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579032#M23933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Tue Sep 27 09:18:57 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;No, it doesn't :) We are talking about 100MHz already :mad:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: If it would be possible to use match values like 4 to [B][COLOR=Red]toggle[/COLOR][/B] a signal, that would be 100MHz / 2 / 4 = 12.5 MHz&amp;nbsp; :eek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:02:57 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:02:57Z</dc:date>
    <item>
      <title>25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579023#M23924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Sat Sep 24 09:18:21 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to generate a 25MHz frequency on a pin, from what I read this may be doable as follows&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set PCLK to 100MHz&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set timer match to 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set timer prescale to 0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set timer MAT pin to toggle&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is that correct?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;______&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579023#M23924</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579024#M23925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat Sep 24 09:37:27 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What about using CLKOUT?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579024#M23925</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579025#M23926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ktownsend on Sat Sep 24 14:27:02 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You don't mention the crystal that you're using on your board, since this will be the biggest factor to determine if you can generate a 25MHz output or not (since you'll need to have something you can multiply and divide and arrive at exactly 25MHz within the limits of the PLL, etc.).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd agree with Zero that using the CLKOUT would probably be the easiest.&amp;nbsp; You can use a timer as well, but because 25MHz output only allows 4 ticks you probably want to make sure there are no interrupts that might throw your timing off, etc.&amp;nbsp; If all you need is a 25MHz output there are far cheaper ways to get it than dedicating a $10 MCU to that task.&amp;nbsp; But ... maybe it's just for a specific duration?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579025#M23926</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579026#M23927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Polux rsv on Sat Sep 24 14:31:59 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Should this 25Mhz be generated continously ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And what else should your application do at the same time? Any interrupt routine ?:rolleyes::D&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Angelo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579026#M23927</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579027#M23928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Sat Sep 24 15:14:45 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Oops, forgotten to mention: No, it's not possible :mad:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although you calculation seems to be correct, don't forget that a timer needs a few clock cycles to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So setting a match register to 1 is a very optimistic wish :), but will not generate the calculated signal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In fact you will end somewhere at a few MHz...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579027#M23928</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579028#M23929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Mon Sep 26 05:49:46 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for not responding, I thought I'd selected to get an email notification but obviously not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;What about using CLKOUT?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes I thought of that and as I'm not using USB I could route the USB clock to that pin. With a 10MHz XTAL there is a valid combination of M and P to get 25MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;You can use a timer as well, but because 25MHz output only allows 4 ticks you probably want to make sure there are no interrupts that might throw your timing off,&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Surely interrupts won't affect the timer outputs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;If all you need is a 25MHz output there are far cheaper ways to get it than dedicating a $10 MCU to that task.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Very true, but see below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;Should this 25Mhz be generated continously ?&lt;BR /&gt;And what else should your application do at the same time? Any interrupt routine ?&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For a given period that may vary from uS to seconds. I can if necessary cease all other activity and in fact will have to sit in a very tight ASM loop, if possible tight enough to fit into the 40nS cycle time (probably not likely but maybe).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: &lt;/STRONG&gt;&lt;BR /&gt;So setting a match register to 1 is a very optimistic wish&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's one thing that worries me. However before being reset the timer is supposed to stay at the match value for one PCLK cycle. The match value is 1 so we should get two counter values (0 and 1) ie PCLK/2 or 50MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following from that, with a MAT pin set to toggle we should get the timer freq (50MHz) /2 or 25MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've attached a pic that shows how I think it should work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Going back to basics I'll tell you what I'm trying to do.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In a nutshell I want to sample 16 pins as fast as possible and store the values in RAM, at least at 20MHz but 25 would be better. This is a logic analyzer and storage scope application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The above match event is supposed to do two things&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a) Request a DMA transfer from the port to RAM&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) Provide a clock pulse for external latches.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the two events should be synchronized otherwise I'd just use an external oscillator for the latches.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a better method?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm new to LPCs and am prepared to be told that I'm dreaming and this can't be done :)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;______&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579028#M23929</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579029#M23930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Mon Sep 26 06:07:08 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: graynomad&lt;/STRONG&gt;&lt;BR /&gt;Yes I thought of that and as I'm not using USB I could route the USB clock to that pin. With a 10MHz XTAL there is a valid combination of M and P to get 25MHz.&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just use main clock and&amp;nbsp; clkout divider (CLKOUTDIV=3) =&amp;nbsp; 100MHz /4 :eek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579029#M23930</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579030#M23931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Mon Sep 26 06:21:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;So pll_clk is 100MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;CLKOUT pin = pll_clk /4 = 25MHz.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pclk = pll_clk /4 = 25MHz as well&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The two signals will be synchronized because they are both derived from the same source, so far so good.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But they have a high chance of being out of phase because you can't write to PCLKSEL and CLKOUTCFG at the same time. This could be made pretty deterministic with some tight ASM code though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not even sure that's a bad thing because I don't know exactly then the DMA will do the read anyway.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess there will never be a way to know if the external latch and the DMA read are synched. Maybe it doesn't matter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;______&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579030#M23931</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579031#M23932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TommyBurger on Tue Sep 27 09:08:23 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;It might help to route 100 MHz to the timer. Then your match value is 4. Look at the peripheral clock registers PCLKSEL. LPC17xx errata says to set these registers before setting up the CCLK.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579031#M23932</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579032#M23933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ex-Zero on Tue Sep 27 09:18:57 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;No, it doesn't :) We are talking about 100MHz already :mad:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: If it would be possible to use match values like 4 to [B][COLOR=Red]toggle[/COLOR][/B] a signal, that would be 100MHz / 2 / 4 = 12.5 MHz&amp;nbsp; :eek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579032#M23933</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579033#M23934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Tue Sep 27 15:39:00 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help guys.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think what I want to do is right on the edge so I'm researching into taking it all off-chip with an FPGA and external RAM. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I do this everything is more straightforward, I can go to 50MHz, and I can get 512k words or more of storage. This would add about $20 to the cost but that would be worth it I think to get the extra capabilities. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now I have two new (to me) technologies to learn, LPC and FPGA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;______&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579033#M23934</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579034#M23935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ktownsend on Wed Sep 28 13:25:28 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you're going to do something off board have a look at XMOS.&amp;nbsp; The learning curve isn't as steep as with an FPGA (you can program in C, etc.) but you keep a lot of the advantages of parallel processing within reason.&amp;nbsp; You are limited to 100MHz per thread, 4 threads per core ... though they have a higher speed version with 125/500MHz as well.&amp;nbsp; But you should have no problem generating 25MHz output with that, and can use another thread to integrate with the LPC via any common bus like SPI that's easy to do in SW.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Significantly less troublesome and cheaper than an FPGA for something like what you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579034#M23935</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579035#M23936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by graynomad on Thu Sep 29 02:07:27 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I've looked at XMOS a few times but still don't quite get it. There doesn't appear to be any peripheral devices, do you bit bang everything?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can see it being good for my trigger state machine, or something simple and fast, but not suitable for a main processor because of the limited memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you use assembler?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use external hardware I should be able to get 50MHz, but let's stay with the original brief of 25MHz. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The fastest loop I can think of (outside using ASM) is something like this&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;while (1) output_pin = 1;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On an AVR that will toggle the pin every time and the loop will take maybe 2-3 cycles. But obviously absolutely nothing else can happen including interrupts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With hardware timers such as on the LPC I'm reasonably happy I can get 25MHz but with all the other stuff that needs doing and the indeterminate DMA timing I've now decided that external hardware is the way to go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Essentially I need to do two things&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a) 19-bit synchronous counter for external RAM address&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) 24-bit magnitude/equality comparator and state machine for triggering&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The counter would be a no-brainer with a CPLD/FPGA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The trigger comparator and state machine will be a challenge with any technology if high speed is required. With hardware of course the comparison and state machine stuff will be lightning fast but my brain hurts just thinking about the FPGA design.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the other hand I can see it would not be too difficult in software.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Presently I'm considering dedicating an LPC111x to this job. At 50MHz I reckon I can do the job in 1uS or less, in which case I just state in the manual that when using complex triggers the trigger state has to be stable for at least 1uS.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now using the XMOS I get 2x the raw speed plus multiple threads as well. So can one thread look at the 24 bits and do the magnitude comparison on 12 of them. Another thread looks at the other 12 bits and does an equality comparison. They both set flags on common memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A third thread reads these flags and starts a timer when both are true.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the timer times out and the flags are still both true we have trigger event.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With 2x the clock and 2 threads at the sharp end maybe I can detect an event with 250nS resolution which is 4x what I could do with an LPC111x.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it worth learning a new processor architecture for that? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Probably not if that's all I get, but if the XMOS can replace all the other hardware MUXes, counters etc and save me from using CPLD/FPGAs then maybe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you point me to some proper documentation, I can find nothing that resembles a normal data sheet on the XMOS site.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;______&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rob&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579035#M23936</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: 25MHz pin toggle - LPC178x</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579036#M23937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by ktownsend on Thu Sep 29 05:55:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;XMOS isn't a replacement for a general-purpose MCU like the LPC17xx etc. ... it's just a useful compliment if you need a lot of high-speed raw IO cheaper than an FPGA and without the same steep learning curve (Verilog/VHDL, etc.).&amp;nbsp; I've only played with them briefly myself, but they sound perfect for reliably generating high-speed timing signals without spending $30 on an FPGA and learning the tools that go with it.&amp;nbsp; Under $10 and a few days effort tops.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It's not going to replace your main MCU, though, and neither is an FPGA (unless you have a LOT of time on your hands).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:02:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/25MHz-pin-toggle-LPC178x/m-p/579036#M23937</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:02:59Z</dc:date>
    </item>
  </channel>
</rss>

