<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30869/how-to-display-integer-value-on-putty-using-uart</link><description>i was using the serial example in examples/peripheral/serial and i Want to display integer value int i=1234 on the serial terminal(putty).I want to convert the int value to string.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Feb 2018 09:22:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30869/how-to-display-integer-value-on-putty-using-uart" /><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/122072?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2018 09:22:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa91785e-ed0a-42c0-a941-755631079bee</guid><dc:creator>norin saiyed</dc:creator><description>&lt;p&gt;is there any specific requirement of using serial example?? or else you can use uart example to print data on terminal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/122070?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2018 09:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58526122-42b5-4a74-9114-c48e952f5529</guid><dc:creator>Liverpool007</dc:creator><description>&lt;p&gt;i was using the&lt;strong&gt; serial&lt;/strong&gt; example&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/122066?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2018 09:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04989bbc-6612-4783-a61e-b76f5c3d9b82</guid><dc:creator>norin saiyed</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4628.main.c"&gt;devzone.nordicsemi.com/.../4628.main.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/122065?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2018 09:11:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf56c431-6c13-49e8-9723-8c503c2643d8</guid><dc:creator>norin saiyed</dc:creator><description>&lt;p&gt;it is working perfectly fine..i have checked it..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/122046?ContentTypeID=1</link><pubDate>Tue, 27 Feb 2018 07:09:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c726d3bf-355c-4311-812b-7f7575766c4b</guid><dc:creator>Liverpool007</dc:creator><description>&lt;p&gt;sdk 14.2.0&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/121949?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 11:47:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a08d12d4-1afe-47e1-bdda-f39b25282c5c</guid><dc:creator>norin saiyed</dc:creator><description>&lt;p&gt;which sdk version you are using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/121948?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 11:46:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd46dc38-4814-4e0d-a5b8-4f13bc08e5b8</guid><dc:creator>Liverpool007</dc:creator><description>&lt;p&gt;if i use it in the serial program it is not working.&lt;/p&gt;
&lt;p&gt;.&lt;pre class="ui-code" data-mode="text"&gt;int main(void)
{
    ret_code_t ret;
    ret_code_t ret1;
    

    ret = nrf_drv_clock_init();
    APP_ERROR_CHECK(ret);
    ret = nrf_drv_power_init(NULL);
    APP_ERROR_CHECK(ret);

    nrf_drv_clock_lfclk_request(NULL);
    ret = app_timer_init();
    APP_ERROR_CHECK(ret);

    bsp_board_leds_init();
    bsp_board_buttons_init();

    ret = nrf_serial_init(&amp;amp;serial_uart, &amp;amp;m_uart0_drv_config, &amp;amp;serial_config);
    APP_ERROR_CHECK(ret);

     char *tx_message ;
     int i = 12345;
    tx_message = change(i);

    ret = nrf_serial_write(&amp;amp;serial_uart,
                           tx_message,
                           strlen(tx_message),
                           NULL,
                           NRF_SERIAL_MAX_TIMEOUT);
    printf(&amp;quot;%d&amp;quot;,i);
    APP_ERROR_CHECK(ret);
   
   

   

    while (true)
    {
/*        char c;
        ret = nrf_serial_read(&amp;amp;serial_uart, &amp;amp;c, sizeof(c), NULL, 1000);
        if (ret != NRF_SUCCESS)
        {
            continue;
        }
        (void)nrf_serial_write(&amp;amp;serial_uart, &amp;amp;c, sizeof(c), NULL, 0);
        (void)nrf_serial_flush(&amp;amp;serial_uart, 0);

*/    ret = nrf_serial_write(&amp;amp;serial_uart,
                           tx_message,
                           strlen(tx_message),
                           NULL,
                           NRF_SERIAL_MAX_TIMEOUT);
    // printf(&amp;quot;%d&amp;quot;,i);
     ret = nrf_serial_write(&amp;amp;serial_uart,
                           &amp;quot;\n\r&amp;quot;,
                           strlen(tx_message),
                           NULL,
                           NRF_SERIAL_MAX_TIMEOUT);
     (void)nrf_serial_flush(&amp;amp;serial_uart, 0);
      
      nrf_delay_ms(2000);
     APP_ERROR_CHECK(ret);
    }
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to display integer value on putty using uart?</title><link>https://devzone.nordicsemi.com/thread/121946?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 11:28:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:742aecda-032b-4bbf-af88-9d75867e72fc</guid><dc:creator>norin saiyed</dc:creator><description>&lt;p&gt;printf(&amp;quot;%d&amp;quot;,i);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>