<?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>serial data cannot be read...</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/31679/serial-data-cannot-be-read</link><description> 
hello, 
im working on a project that reads serial data from RFID
scanner...... 
Now the problem is the serial data is unable to be fetched..... 
im using at89s52 microcontroller... 
the instruction 

 
MOV A,SBUF 

 
doesnt copy the sbuf data to the</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/68610?ContentTypeID=1</link><pubDate>Mon, 07 Apr 2014 14:42:33 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:4734caf1-1601-4122-8c63-cf2b8608c118</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Are you sure that the &amp;quot;serial data&amp;quot; from this unspecified &amp;quot;RFID
scanner&amp;quot; is actually in a format compatible with the 8051
UART...?&lt;/p&gt;

&lt;p&gt;
Not everything &amp;quot;serial&amp;quot; works with a UART...&lt;/p&gt;

&lt;p&gt;
eg, &lt;a href="http://www.proxclone.com/wiegand.html"&gt;www.proxclone.com/wiegand.html&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/107610?ContentTypeID=1</link><pubDate>Mon, 07 Apr 2014 00:55:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:edc18cd7-6289-41d1-8b5c-e18c93280767</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;the mov a,sbuf instruction is not being executed....&amp;quot;&lt;/p&gt;

&lt;p&gt;
The only way the mov a,sbuf instruction isn&amp;#39;t being executed is if
it isn&amp;#39;t &amp;quot;hidden&amp;quot; behind some conditional expression.&lt;/p&gt;

&lt;p&gt;
But if the processor do reach that instruction, then the processor
has no option but to execute it.&lt;/p&gt;

&lt;p&gt;
If you don&amp;#39;t get the expected result in A, then that is because
SBUF doesn&amp;#39;t contain what you expect it to contain.&lt;/p&gt;

&lt;p&gt;
About baudrate - always verify your baudrate by _sending_ data and
checking the baudrate of the transmitted data using an
oscilloscope.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/140706?ContentTypeID=1</link><pubDate>Sun, 06 Apr 2014 23:36:20 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:119e0cbe-a37e-4054-9d67-542e3fedb3ec</guid><dc:creator>Davanki Myhanki</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;But there&amp;#39;s something useful that came of it, too ...&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I would respond in the same way to any such post that I happen to
notice.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/120290?ContentTypeID=1</link><pubDate>Sun, 06 Apr 2014 05:41:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6cfe6609-0cb5-4414-865d-acd27caa1d99</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
Some Basic questions for you to understand your code:&lt;/p&gt;

&lt;p&gt;
3) are you even checking RI&lt;br /&gt;
4) what happes if you do mov a,#77, mov a,SBUF&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/107602?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 22:11:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6eef4549-377b-4095-aeda-08849a9141c3</guid><dc:creator>Deepakraj Srinivas</dc:creator><description>&lt;p&gt;&lt;p&gt;
Some Basic questions for you to understand your code:&lt;/p&gt;

&lt;p&gt;
1. RFID baudrate is set to 9600 ??&lt;br /&gt;
2. Are you using polling or interrupt method to receive buffer??&lt;/p&gt;

&lt;p&gt;
copy the serial communication module code, so that solution
accuracy will be high.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/137117?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 13:39:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5e23edb3-6e36-4701-9569-b47caeb717eb</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
Blimey, looks like not actually having used 8051 actively in 10
years finally caught up with me. Sorry for that misinformation.&lt;/p&gt;

&lt;p&gt;
But there&amp;#39;s something useful that came of it, too: at least it
confirmed that my anonymous coward of a personal troll still has
found no better use of her time than to monitor the forum for
postings I might write.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/128545?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 12:55:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c43c74c6-4ac9-4591-bcd1-1092c19fb29b</guid><dc:creator>F BASHINI</dc:creator><description>&lt;p&gt;&lt;pre&gt;
MoV 0E0H, SBUF
&lt;/pre&gt;

&lt;p&gt;
&lt;i&gt;No such instruction in an 8051.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Really? And would you mind explaining how you arrived at
&lt;b&gt;that&lt;/b&gt; rather wild conclusion?&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://www.keil.com/support/man/docs/is51/is51_mov.htm"&gt;http://www.keil.com/support/man/docs/is51/is51_mov.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Look at the MOV dest_direct, src_direct&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/120287?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 08:42:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:00c3a0a1-33c0-4961-b3f5-a7594984a426</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;why dont u try using the address of A reg instead?&lt;/i&gt;&lt;br /&gt;
And how&amp;#39;s that supposed to make any difference?&lt;/p&gt;

&lt;pre&gt;
&lt;i&gt;MoV 0E0H, SBUF&lt;/i&gt;
&lt;/pre&gt;

&lt;p&gt;
No such instruction in an 8051.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/107604?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 08:41:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:697ec03f-8c50-4d62-ab97-b1911578eecf</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;the mov a,sbuf instruction is not being executed....&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
&amp;quot;Not being executed&amp;quot;, really? And would you mind explaining how
you arrived at &lt;b&gt;that&lt;/b&gt; rather wild conclusion?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/120289?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 07:09:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:90e22202-56ca-4074-b7bc-86bd42aa68fe</guid><dc:creator>&amp;#178;erik malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
show relevant code&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/107607?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 04:53:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:da665475-71b1-4fcb-8a01-124798376c84</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;also i hv also tried putting data on port0 yet having d &lt;b&gt;same
problem&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
Elaborate the problem. What did you get on Port?&lt;/p&gt;

&lt;p&gt;
why dont u try using the address of A reg instead?&lt;br /&gt;
Reg A address is 0x0E0&lt;/p&gt;

&lt;p&gt;
MOV A, SBUF&lt;br /&gt;
or&lt;br /&gt;
MoV 0E0H, SBUF&lt;br /&gt;
or etc..&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/81806?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 03:21:18 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c55ef4f2-5778-43f4-8f31-3a42f3f93a4c</guid><dc:creator>vaibhav gursale</dc:creator><description>&lt;p&gt;&lt;p&gt;
i hav tried as you suggested.....&lt;br /&gt;
scon as 0x50(mode2)&lt;br /&gt;
tmod as 0x20(timer1 autoreload)&lt;br /&gt;
th1 as 0xfd (9600 baud rate)&lt;/p&gt;

&lt;p&gt;
also i hv also tried putting data on port0 yet having d same
problem&lt;/p&gt;

&lt;p&gt;
the mov a,sbuf instruction is not being executed....&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial data cannot be read...</title><link>https://community.arm.com/thread/62710?ContentTypeID=1</link><pubDate>Sat, 05 Apr 2014 00:42:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:af27e43b-90f5-4ad9-b3a8-e8e21f1cac8e</guid><dc:creator>Ash J</dc:creator><description>&lt;p&gt;&lt;p&gt;
Check list&lt;/p&gt;

&lt;p&gt;
Is the port3 pin configured as input pin? (to configure port pin
as input, SETB P3.0)&lt;br /&gt;
Is the SCON register configured properly? REN bit must be high.&lt;br /&gt;
Is the baud rate correctly generated? (to generate baud rate,
configure one of the timer properly)&lt;/p&gt;

&lt;p&gt;
finally,&lt;br /&gt;
Is data being received in RxBuf?&lt;br /&gt;
to check this, just output the RxBuf data on any of the port and
check the bits on port.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>