<?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: RS485 using LPC1857 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664390#M26537</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NELVI JOHN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What the board you are using now?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Your own board or the official board?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Mar 2017 10:02:46 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2017-03-21T10:02:46Z</dc:date>
    <item>
      <title>RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664387#M26534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am a beginner to MDK5 from Keil. This is the first time I am working on LPC1857. I have created a web page using the HTTP server sample code from Keil. Now I want to receive values using RS485. So, I am using Uart3 of my LPC1857 for this purpose. The code I have written is given below.&lt;/P&gt;&lt;PRE style="color: #000000; background: #f3f3f3; border: 1px solid #cccccc; font-size: 12px; margin: 8px 0px; padding: 10px;"&gt;void uart_rs485(void) { SCU_PinConfigure(2,3, SCU_CFG_MODE_FUNC2); SCU_PinConfigure(2,4, SCU_CFG_MODE_FUNC2); GPIO_SetDir(4,11,GPIO_DIR_OUTPUT); LPC_USART3-&amp;gt;LCR = 0x83; LPC_USART3-&amp;gt;FCR =0x07; LPC_USART3-&amp;gt;FDR =0; LPC_USART3-&amp;gt;DLM =0; LPC_USART3-&amp;gt;DLL =98; LPC_USART3-&amp;gt;LCR =0x03;&amp;nbsp; } void uart_rs485_transmit(void) { GPIO_PinWrite(4,11,1);//Making Transmit Enable high if(LPC_USART3-&amp;gt;LSR &amp;amp; 0x20) { LPC_USART3-&amp;gt;THR = 83; } }&amp;nbsp; void uart_rs485_receive(void) { 
GPIO_PinWrite(4,11,0);//Receive Enable a = LPC_USART3-&amp;gt;RBR; }&lt;/PRE&gt;&lt;P&gt;While debugging I came to know that FCR is not loading its value. What might be the reason. Besides, is it require to provide power to the uart unit? Is there any sample code for that? Please help me in this flow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2017 17:19:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664387#M26534</guid>
      <dc:creator>nelvijohn</dc:creator>
      <dc:date>2017-03-17T17:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664388#M26535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NELVI JOHN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Of course, you need to power on the UART3 module.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/17200i280BEEC0E5E129CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the basic configuration.&lt;/P&gt;&lt;P&gt;But about the 485 code for LPC1857, I don't have the direct project now, you can refer to this post for LPX1765.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/message/770119?commentID=770119#comment-770119" title="https://community.nxp.com/message/770119?commentID=770119#comment-770119"&gt;https://community.nxp.com/message/770119?commentID=770119#comment-770119&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer to the 485 code to configuration your LPC1857 at first.&lt;/P&gt;&lt;P&gt;If you still have question, just let me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 06:46:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664388#M26535</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-03-20T06:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664389#M26536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Thank you for your response. I have read the power and clocking information in the user manual. But I dont know how to learnt it and provide the clock using the IDE MDK5. Could you help me in this. I dont even understand what is the default value of PCLK. Let me know about how to learnt the user manual for getting the required clock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 16:41:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664389#M26536</guid>
      <dc:creator>nelvijohn</dc:creator>
      <dc:date>2017-03-20T16:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664390#M26537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NELVI JOHN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; What the board you are using now?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Your own board or the official board?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 10:02:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664390#M26537</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-03-21T10:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664391#M26538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;My board is based on MCB1800. But some pins are customized as well. But it is following the standard of MCB1800.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:38:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664391#M26538</guid>
      <dc:creator>nelvijohn</dc:creator>
      <dc:date>2017-03-21T15:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664392#M26539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NELVI JOHN,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please download the MCB1857 lpcopen code from this link:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/assets/downloads/data/en/software/lpcopen_2_20_keil_iar_keil_mcb_1857.zip" title="http://www.nxp.com/assets/downloads/data/en/software/lpcopen_2_20_keil_iar_keil_mcb_1857.zip"&gt;http://www.nxp.com/assets/downloads/data/en/software/lpcopen_2_20_keil_iar_keil_mcb_1857.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Then open periph_examples in folder:lpcopen_2_20_keil_iar_keil_mcb_1857\applications\lpc18xx_43xx\keil\keil_mcb_1857&lt;/P&gt;&lt;P&gt;&amp;nbsp; You will can find the uart initialization code in uart_18xx_43xx.c.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/15916iDAB2E3D8BFB89479/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; About the clock, you can debug it to get it, this is also one way to learn it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 06:24:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664392#M26539</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-03-22T06:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664393#M26540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;&amp;nbsp;Let me know about the the PCLK value at which the UART of LPc1857 is working? I am using Keil MDK5. Is there any window available during debugging to know the available clocks like PCLK and their values loaded? How we can know the activated Baud rate corresponding to the DLL and DLM loaded by us in MDK5?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 17:37:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664393#M26540</guid>
      <dc:creator>nelvijohn</dc:creator>
      <dc:date>2017-03-22T17:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664394#M26541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NELVI JOHN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please check this MDK IDE debug result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/16116iA91F3E70BF546CF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Mar 2017 06:53:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664394#M26541</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-03-23T06:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664395#M26542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; I have configured clock to USART3 by software. the code is as below:&lt;/P&gt;&lt;PRE style="color: #000000; background: #f3f3f3; border: 1px solid #cccccc; font-size: 12px; margin: 8px 0px; padding: 10px;"&gt;void SCI_PortClock (uint32_t clock) {&amp;nbsp;&amp;nbsp; if (clock) {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_CCU1-&amp;gt;CLK_M3_UART1_CFG |= 3;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!(LPC_CCU1-&amp;gt;CLK_M3_UART1_STAT &amp;amp; 1));&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; else {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_CCU1-&amp;gt;CLK_M3_UART1_CFG&amp;nbsp;&amp;nbsp; &amp;amp;= ~(3);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (LPC_CCU1-&amp;gt;CLK_M3_UART1_STAT &amp;amp; 1);&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;P&gt;I haven't configured PCLK separately. So, is it there is any fault in being the conclusion that the PCLK is default 12MHz.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Mar 2017 03:52:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664395#M26542</guid>
      <dc:creator>nelvijohn</dc:creator>
      <dc:date>2017-03-24T03:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: RS485 using LPC1857</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664396#M26543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi NELVI JOHN,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you don't configure it, just enable the UART3 clock to RUN, yes, the default clock is IRC12MHZ.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; You can find it from these pictures:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/17069i8914BB73A9EF71F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/17113iE94CBE4B01702C51/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;/P&gt;&lt;P&gt;Kerry&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 07:26:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/RS485-using-LPC1857/m-p/664396#M26543</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-03-27T07:26:56Z</dc:date>
    </item>
  </channel>
</rss>

