<?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>SPIS example: print decimals</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37022/spis-example-print-decimals</link><description>Hello, 
 I&amp;#39;m running the SPIS example from Keil (SDK 15.0), but I want to print out the received as the decimal value instead of as a string. If I change %s to a %d in this line: 
 the value printed is always &amp;quot;536870920&amp;quot;, regardless of what data I send</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 31 Jul 2018 17:55:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37022/spis-example-print-decimals" /><item><title>RE: SPIS example: print decimals</title><link>https://devzone.nordicsemi.com/thread/142255?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 17:55:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6391ef59-326a-4a0c-a086-b842c87cdc20</guid><dc:creator>Watermelon</dc:creator><description>&lt;p&gt;I just realized I could cast one of them as int_16, shift it and then add the other int_8.&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f648.svg" title="See no evil"&gt;&amp;#x1f648;&lt;/span&gt;&amp;nbsp;This was standard C, lol my bad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS example: print decimals</title><link>https://devzone.nordicsemi.com/thread/142239?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 15:54:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17736c09-9b0d-4823-9029-e75592d35866</guid><dc:creator>Watermelon</dc:creator><description>&lt;p&gt;I&amp;#39;m sending my data as bits from an FPGA to the nRF52832. But the data is read as ASCII on the transceiver instead as decimal, so for example 01100001&amp;nbsp;is read as &amp;quot;a&amp;quot;, but I want to print it as &amp;quot;97&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPIS example: print decimals</title><link>https://devzone.nordicsemi.com/thread/142237?ContentTypeID=1</link><pubDate>Tue, 31 Jul 2018 15:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5793e6b-a5d9-46c6-aa53-9ed2fc9dc25f</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;If the data is being sent as a string - ie ASCII-coded characters; a &amp;#39;5&amp;#39; and then a &amp;#39;3&amp;#39; and then a &amp;#39;6&amp;#39;, etc - then you will have to convert it to a number before you can handle it as a number.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is standard &amp;#39;C&amp;#39; stuff - nothing specifically to do with Keil or Nordic.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>