<?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>How to write to COM port with Cx51</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/19941/how-to-write-to-com-port-with-cx51</link><description> Does anyone know how I can write to the COM port on the 8051? I know how to do so in Visual C++ but I&amp;#39;m not sure if its the same way. In Visual C++, I would use the following code: 
 
HANDLE hSerial; 
BOOL w_ret; 
DWORD write = 19; 
char buf[20] = {0</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: How to write to COM port with Cx51</title><link>https://community.arm.com/thread/97997?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2006 22:13:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a4feee9a-b949-4b46-bbd0-e02d452a5007</guid><dc:creator>Neil Kurzmam</dc:creator><description>&lt;p&gt;In The sample folder where you installed Keil.&lt;br /&gt;
&lt;br /&gt;
1 -  the 8052 and windows programming are different. None of the windows APIs will work.  In general Windows APIs are unique to windows.&lt;br /&gt;
2 - C and C++ are not the same languge&lt;br /&gt;
3 - the 8052 has very limit RAM and ROM  Take care or run out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write to COM port with Cx51</title><link>https://community.arm.com/thread/98007?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2006 17:58:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8adf037b-82ee-45fe-b44b-35d2ef367825</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;Thanks....where can I find that sample?&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
If you need to ask, then you need to start with the uVision &lt;i&gt;Getting Started&lt;/i&gt; guide - it&amp;#39;ll be in the uVision &amp;#39;Books&amp;#39; tab, or see the &amp;#39;Help&amp;#39; menu.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write to COM port with Cx51</title><link>https://community.arm.com/thread/73969?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2006 17:51:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c496bd39-aba0-40b2-830f-47c4f94a27f6</guid><dc:creator>Shannon Smith</dc:creator><description>&lt;p&gt;Thanks....where can I find that sample?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write to COM port with Cx51</title><link>https://community.arm.com/thread/45904?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2006 17:48:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8574f003-0dc4-418c-bd24-9bee411216a5</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;pre&gt;HANDLE hSerial;
BOOL w_ret;
DWORD write = 19;&lt;/pre&gt;Aha! - hence the question about HANDLE and DWORD, eh? &lt;a href="http://www.keil.com/forum/docs/thread7588.asp#msg35078"&gt;http://www.keil.com/forum/docs/thread7588.asp#msg35078&lt;/a&gt; Forget it!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to write to COM port with Cx51</title><link>https://community.arm.com/thread/45898?ContentTypeID=1</link><pubDate>Mon, 17 Apr 2006 17:43:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b01043ac-6e8b-47b4-8392-40dfda29d53c</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;i&gt;&amp;quot;Does anyone know how I can write to the COM port on the 8051?&amp;quot;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
An 8051 does not have a &amp;quot;COM Port&amp;quot; - that is an IBM-PC term.&lt;br /&gt;
&lt;br /&gt;
On an 8051, you have to deal directly with the UART - that&amp;#39;s the hardware that does asynchronous serial comms (which is what a &amp;quot;COM Port&amp;quot; does on a PC).&lt;br /&gt;
&lt;br /&gt;
In fact, almost everything on an 8051 will require you to deal directly with the hardware - you do not have a massive Operating System, Object Frameworks, Foundation Classes, etc, etc...&lt;br /&gt;
Just the good ol&amp;#39; ANSI &amp;#39;C&amp;#39; standard library.&lt;br /&gt;
(well, most of it).&lt;br /&gt;
&lt;br /&gt;
Look at the &amp;quot;Hello, World&amp;quot; sample Project - it writes &amp;quot;Hello, World&amp;quot; to the 8051 serial port.&lt;br /&gt;
&lt;br /&gt;
The uVision &lt;i&gt;Getting Started&lt;/i&gt; guide takes you through the project step-by-step.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>