<?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>gets function giving problem</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/23759/gets-function-giving-problem</link><description> 
gets function giving problem 
Ameya Hardikar 

 
Dear All, 

 
I am trying to read some float values/strings from a serial port.
A VB based front end application sends me these values over a serial
port.The communication between the front end application</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: gets function giving problem</title><link>https://community.arm.com/thread/89041?ContentTypeID=1</link><pubDate>Wed, 07 May 2008 15:39:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:137bf9e3-9772-44d1-ba7f-597f427f4138</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;Are you trying to process data in the interupt? If not you
need to.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;No!&lt;/b&gt;&lt;br /&gt;
You should not try to &lt;i&gt;&lt;b&gt;process&lt;/b&gt;&lt;/i&gt; it in the interrupt!&lt;/p&gt;

&lt;p&gt;
The interrupt should do just the minimum to snatch it from the
UART and put it into a buffer - the actual &lt;i&gt;&lt;b&gt;processing&lt;/b&gt;&lt;/i&gt;
should be done in the main code...&lt;/p&gt;

&lt;p&gt;
This is well illustrated in the interrupt-driven serial examples
provided by Keil; eg, &lt;a href="http://www.keil.com/download/docs/200.asp"&gt;http://www.keil.com/download/docs/200.asp&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gets function giving problem</title><link>https://community.arm.com/thread/49850?ContentTypeID=1</link><pubDate>Wed, 07 May 2008 14:35:12 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3492e513-393e-498a-886e-c00e0afcc1ba</guid><dc:creator>Neil Kurzmam</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;Ameya&amp;quot; then only &amp;quot;mey&amp;quot; That sound like your code. I doubt a baud
rate error would kill the first two bytes. How are you receiving the
data are you using the serial interrupt? Are you trying to process
data in the interupt? If not you need to. Try setting the
inter-charter delay in VB. If that solves it you code is too
slow.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gets function giving problem</title><link>https://community.arm.com/thread/113901?ContentTypeID=1</link><pubDate>Wed, 07 May 2008 04:32:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:69214635-d499-47a9-bb56-c3cbf791581b</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
That&amp;#39;s all down to the transceiver hardware - so not really any
concern for the software.&lt;/p&gt;

&lt;p&gt;
For an discussion on the effect of baud rate errors, see:
&lt;a target="_blank" href="http://www.8052.com/forum/read.phtml?id=91004"&gt;www.8052.com/.../read.phtml&lt;/a&gt;
and follow the replies!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gets function giving problem</title><link>https://community.arm.com/thread/100622?ContentTypeID=1</link><pubDate>Wed, 07 May 2008 03:46:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:333063a3-d90c-41dd-a9df-f89964477a1f</guid><dc:creator>Catcus Blip</dc:creator><description>&lt;p&gt;&lt;p&gt;
Andy, I think I almost gave you a heart attack, sorry for
that...let me try to redeem my sin :)&lt;/p&gt;

&lt;pre&gt;
&amp;quot;Besides having a maximum switching speed, RS-232 drivers must also meet
minimum standards to ensure that signals dont linger in the undefined region
between logic states when switching. For control signals and other signals at 40
bps and lower, the line must spend no more than 1 ms in the transition region
between a valid logic 0 and logic 1. For other data and timing signals, the limit
is 4% of a bit width, which works out to 2 &amp;Icirc;&amp;frac14;s at 20 kbps or 0.33 &amp;Icirc;&amp;frac14;s at 120 kbps.
An output that switches between -5V and +5V in 0.33 &amp;Icirc;&amp;frac14;s is changing at the
specified upper (fastest) limit for the slew rate. The signals&amp;acirc;&amp;euro;&amp;trade; rise and fall times
should also be as nearly equal as possible&amp;quot;
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gets function giving problem</title><link>https://community.arm.com/thread/89039?ContentTypeID=1</link><pubDate>Wed, 07 May 2008 02:57:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e36cd847-743c-431d-85b3-187cb57e9cc1</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
It&amp;#39;s the &lt;b&gt;Baud rates&lt;/b&gt; that need to be closely matched - not
the clocks.&lt;/p&gt;

&lt;p&gt;
And they need to be &lt;i&gt;&lt;b&gt;much&lt;/b&gt;&lt;/i&gt; closer than 15%!!&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;=:0&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/c51/baudrate.asp"&gt;http://www.keil.com/c51/baudrate.asp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;For best results, choose baud rates that are accurate to +/-1%
or better.&amp;quot;&lt;/i&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gets function giving problem</title><link>https://community.arm.com/thread/49851?ContentTypeID=1</link><pubDate>Wed, 07 May 2008 02:44:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bc37fd2d-b9fd-4e8f-938b-d0d6ab317d59</guid><dc:creator>Catcus Blip</dc:creator><description>&lt;p&gt;&lt;p&gt;
are you sure you don&amp;#39;t suffer from time drift of some kind? if I
remember correctly, RS232 clocks must be within 15% from each other
in order to deliver their payload.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: gets function giving problem</title><link>https://community.arm.com/thread/49849?ContentTypeID=1</link><pubDate>Wed, 07 May 2008 02:13:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:1a809bc4-3663-4ddc-9c6c-875e9c29d4e7</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://www.keil.com/forum/docs/thread12377.asp"&gt;http://www.keil.com/forum/docs/thread12377.asp&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>