<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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/"><channel><title>LPC 1114 UART help...</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/34306/lpc-1114-uart-help</link><description> 
Hi there Keil forums, I have a question about how my LPC 1114
responds to data over a Uart connection. 

 
This is my UART interrupt code: 

 
/* UART Data Received Interrupt */
void UART_IRQHandler(void) {
 static NetworkLayerState networkState = Network_Idle;</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: LPC 1114 UART help...</title><link>https://community.arm.com/thread/108249?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2015 00:18:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:62e7c0ce-5720-4daf-a816-6af56c133aa8</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;

&lt;a href="http://en.wikipedia.org/wiki/Universal_asynchronous_receiver/transmitter"&gt;en.wikipedia.org/.../transmitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
And, of course, be sure to study the UART section in your chip&amp;#39;s
&lt;b&gt;Datasheet&lt;/b&gt; (or &amp;quot;user manual&amp;quot; or whatever the manufacturer calls
it).&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC 1114 UART help...</title><link>https://community.arm.com/thread/93435?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2015 00:05:56 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9804ba41-41b6-482e-abbd-0be23a6930e5</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
There is a proviso there:&lt;/p&gt;

&lt;p&gt;
Some communication links may interpret certain byte values as
&amp;quot;special&amp;quot; and use them as &amp;quot;control codes&amp;quot;.&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/ASCII#ASCII_control_characters"&gt;en.wikipedia.org/.../ASCII&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
In particular:&lt;/p&gt;

&lt;p&gt;
* So-called &amp;quot;software&amp;quot; flow control uses the X-ON and X-OFF codes
to start &amp;amp; stop transmission: &lt;a href="http://en.wikipedia.org/wiki/Software_flow_control"&gt;en.wikipedia.org/.../Software_flow_control&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
* Some systems may translate &amp;quot;end-of-line&amp;quot; sequences; eg,
expanding CR to CR+LF: &lt;a href="http://en.wikipedia.org/wiki/Newline"&gt;en.wikipedia.org/.../Newline&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
This will obviously interfere with you sending your stuff as &amp;quot;raw&amp;quot;
numeric values...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC 1114 UART help...</title><link>https://community.arm.com/thread/69238?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2015 23:56:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0d4b3de8-f311-4103-97ea-3160d2744095</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
A microcontroller&amp;#39;s UART (and a PC&amp;#39;s COM port) just sends and
receives &lt;b&gt;bytes&lt;/b&gt; - it neither knows nor cares anything of the
meaning or interpretation of those bytes.&lt;/p&gt;

&lt;p&gt;
When a microcontroller&amp;#39;s UART (and a PC&amp;#39;s COM port) sends a byte,
it neither knows nor cares anything of the destination of that byte.
It just sends; the destination is irrelevant.&lt;/p&gt;

&lt;p&gt;
When a microcontroller&amp;#39;s UART (and a PC&amp;#39;s COM port) receives a
byte, it neither knows nor cares anything of the source of that byte.
It just receives; the source is irrelevant.&lt;/p&gt;

&lt;p&gt;
So it&amp;#39;s entirely up to you how you want to represent your data
over the link.&lt;/p&gt;

&lt;p&gt;
Sending a &amp;quot;1&amp;quot; is a trivial case - you can either send a single
byte with the numerical value one (0x01), or you can send a single
&lt;b&gt;character&lt;/b&gt; &amp;#39;1&amp;#39;.&lt;/p&gt;

&lt;p&gt;
Things get more interesting when you need to send stuff that can&amp;#39;t
be represented in a single byte, but you still have basically the
same choice: either send as a &amp;quot;raw&amp;quot; numerical value, or send as a
text string (a sequence of characters).&lt;/p&gt;

&lt;p&gt;
To send characters, you would encode them using &lt;b&gt;ASCII&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/ASCII"&gt;en.wikipedia.org/.../ASCII&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.asciitable.com/"&gt;http://www.asciitable.com/&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPC 1114 UART help...</title><link>https://community.arm.com/thread/69237?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2015 18:05:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dd60a1f2-6921-4893-8707-6695004e9ae6</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Basically identically the same question Anthony Serra asked:&lt;br /&gt;
&lt;a href="http://www.keil.com/forum/59814/"&gt;http://www.keil.com/forum/59814/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
You want a serial port to receive &amp;quot;1&amp;quot;?&lt;/p&gt;

&lt;p&gt;
Don&amp;#39;t you then think the most logical thing to send would be &amp;quot;1&amp;quot;?
The UART doesn&amp;#39;t do anything magic. You send three characters &amp;#39;1&amp;#39;,
&amp;#39;2&amp;#39;, &amp;#39;3&amp;#39; to it and it will receive &amp;#39;1&amp;#39;, &amp;#39;2&amp;#39;, &amp;#39;3&amp;#39; assuming the data
was sent with the correct baudrate, number of data bits etc.&lt;/p&gt;

&lt;p&gt;
And as already discussed earlier - you can use a terminal program
instead of that GUI and just send any characters you like. The UART
will then receive exactly the same characters.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>