<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; Serial Port Driver</title>
	<atom:link href="https://www.emblogic.com/blog/category/device-drivers/serial-port-driver/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Sending data using Circular buffer through IEEE EIA/TIA – 232E specification and associated serial port device driver(Implementing RS 232 Protocol)</title>
		<link>https://www.emblogic.com/blog/11/sending-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/</link>
		<comments>https://www.emblogic.com/blog/11/sending-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/#comments</comments>
		<pubDate>Tue, 25 Nov 2014 07:03:35 +0000</pubDate>
		<dc:creator><![CDATA[Sachin Sharma]]></dc:creator>
				<category><![CDATA[Device Drivers]]></category>
		<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11886</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Implementing —————————- revision 1.1 locked by: root; date: 2014/11/25 06:17:53; author: root; state: &#8230; <a href="https://www.emblogic.com/blog/11/sending-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div class="entry-content">
<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
Implementing<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:17:53; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: declaration.h,v<br />
Working file: declaration.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:18:56; author: root; state: Exp;<br />
Initial revision<br />
============================================================================<br />
RCS file: dev_open.c,v<br />
Working file: dev_open.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
open the device<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:20:22; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_release.c,v<br />
Working file: dev_release.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
Release the device.<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:22:30; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: initilization.c,v<br />
Working file: initilization.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
Implemented check_region(), release_region() and request_region().<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:28:58; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: cleanup.c,v<br />
Working file: cleanup.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
Implemented release_region().<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:30:56; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_write.c,v<br />
Working file: dev_write.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
Written 100k byte data serially implementing RS 232 protocol.<br />
Data written through circular Buffer. Data Transfered by following proper handshaking Mechanism by Using LSR, and MCR and MSR registers.</p>
<p>It took 1.53 min to read the data<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:27:06; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_read.c,v<br />
Working file: dev_read.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
Read 100k byte data serially.</p>
<p>Data Recieved by following proper handshaking Mechanism by Using LSR, and MCR and MSR registers.</p>
<p>—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:33:55; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: file_op.h,v<br />
Working file: file_op.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1; selected revisions: 1<br />
description:<br />
—————————-<br />
revision 1.1 locked by: root;<br />
date: 2014/11/25 06:35:37; author: root; state: Exp;<br />
Initial revision<br />
=============================================================================</p>
</div>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/sending-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending 100k data using Circular buffer through IEEE EIA/TIA – 232E specification and associated serial port device driver(Implementing RS 232 Protocol)</title>
		<link>https://www.emblogic.com/blog/11/sending-100k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/</link>
		<comments>https://www.emblogic.com/blog/11/sending-100k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/#comments</comments>
		<pubDate>Tue, 25 Nov 2014 06:37:11 +0000</pubDate>
		<dc:creator><![CDATA[Amit Prakash]]></dc:creator>
				<category><![CDATA[Device Drivers]]></category>
		<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11881</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: Implementing &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.1 locked by: root; date: 2014/11/25 06:17:53; author: root; state: &#8230; <a href="https://www.emblogic.com/blog/11/sending-100k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Implementing<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:17:53;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: declaration.h,v<br />
Working file: declaration.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:18:56;  author: root;  state: Exp;<br />
Initial revision<br />
============================================================================<br />
RCS file: dev_open.c,v<br />
Working file: dev_open.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
open the device<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:20:22;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_release.c,v<br />
Working file: dev_release.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Release the device.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:22:30;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: initilization.c,v<br />
Working file: initilization.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Implemented check_region(), release_region() and request_region().<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:28:58;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: cleanup.c,v<br />
Working file: cleanup.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Implemented release_region().<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:30:56;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_write.c,v<br />
Working file: dev_write.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Written 100k byte data serially implementing RS 232 protocol.<br />
Data written through circular buffer. Implementing handshaking using CTS and RTS pins connected of serial port. Set the MCR bit-1 on writer side and also check the MSR bit-4 is set or not.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:27:06;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_read.c,v<br />
Working file: dev_read.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Read 100k byte data serially.Implementing handshaking using CTS and RTS pins connected of serial port. Set the MCR bit-1 on writer side and also check the MSR bit-4 is set or not.<br />
It took 1.53 min to read the data.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:33:55;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: file_op.h,v<br />
Working file: file_op.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/25 06:35:37;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/sending-100k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-rs-232-protocol/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EIA/TIA RS 232 -E specification for data transfer over serial channel( Sending large amount of data ~7MB)</title>
		<link>https://www.emblogic.com/blog/11/eiatia-rs-232-e-specification-for-data-transfer-over-serial-channel-sending-large-amount-of-data-7mb/</link>
		<comments>https://www.emblogic.com/blog/11/eiatia-rs-232-e-specification-for-data-transfer-over-serial-channel-sending-large-amount-of-data-7mb/#comments</comments>
		<pubDate>Fri, 21 Nov 2014 09:19:45 +0000</pubDate>
		<dc:creator><![CDATA[Abhishek Choubey]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11832</guid>
		<description><![CDATA[Summary : - Successful hand shaking as per RS 232 protocol between the DTE and DCE. - ~7MB of data transferred in 13 min. 7 sec. - Data transfer rate is approximately 900 bytes per second. - Circular buffer implemented &#8230; <a href="https://www.emblogic.com/blog/11/eiatia-rs-232-e-specification-for-data-transfer-over-serial-channel-sending-large-amount-of-data-7mb/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Summary :<br />
- Successful hand shaking as per RS 232 protocol between<br />
  the DTE and DCE.<br />
- ~7MB of data transferred in 13 min. 7 sec.<br />
- Data transfer rate is approximately 900 bytes per<br />
  second.<br />
- Circular buffer implemented in writer module of DTE.</p>
<p>log files :&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&gt;&gt; read :<br />
  2 RCS file: dev_read.c,v<br />
  3 Working file: dev_read.c<br />
  4 head: 1.3<br />
  5 branch:<br />
  6 locks: strict<br />
  7         root: 1.3<br />
  8 access list:<br />
  9 symbolic names:<br />
 10 keyword substitution: kv<br />
 11 total revisions: 3;     selected revisions: 3<br />
 12 description:<br />
 13 read module for transfering 7 mb of data over the serial channel using RS-232 protocol.<br />
 14 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 15 revision 1.3    locked by: root;<br />
 16 date: 2014/11/21 19:28:25;  author: root;  state: Exp;  lines: +0 -2<br />
 17 removed debugging symbols.<br />
 18 driver in release mode<br />
 19 successful implementation of the read module.<br />
 20 7 MB of data successfully received.<br />
 21<br />
 22<br />
 23 The reader has no way of knowing when the writer will stop sending data, thus to overcome this the application on the<br />
 24 DCE end is to know(explicitly) how musch data is to be send by the DTE.<br />
 25 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 26 revision 1.2<br />
 27 date: 2014/11/21 19:26:21;  author: root;  state: Exp;  lines: +2 -18<br />
 28 successfully implemented the reader module for the DCE.<br />
 29 able to receive 7MB of data.<br />
 30 time taken to transfer 7MB is 13 minutes.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&gt;&gt; write : </p>
<p>  2 RCS file: dev_write.c,v<br />
  3 Working file: dev_write.c<br />
  4 head: 1.3<br />
  5 branch:<br />
  6 locks: strict<br />
  7 access list:<br />
  8 symbolic names:<br />
  9 keyword substitution: kv<br />
 10 total revisions: 3;     selected revisions: 3<br />
 11 description:<br />
 12 Sending a file of 7 mb on a serial channel, using the RS 232 protocol.<br />
 13 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 14 revision 1.3<br />
 15 date: 2014/11/21 19:21:46;  author: root;  state: Exp;  lines: +1 -7<br />
 16 Removed the comments.<br />
 17 write module ready for release.<br />
 18 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 19 revision 1.2<br />
 20 date: 2014/11/21 19:15:27;  author: root;  state: Exp;  lines: +3 -5<br />
 21 Implemented hand shaking between the DTE and DCE.<br />
 22 DTE has a circular buffer (max size of buffer = 4k bytes).<br />
 23 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/eiatia-rs-232-e-specification-for-data-transfer-over-serial-channel-sending-large-amount-of-data-7mb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sending 4k data using Circular buffer through IEEE EIA/TIA – 232E specification and associated serial port device driver(Implementing RS 232 Protocol)</title>
		<link>https://www.emblogic.com/blog/11/sending-4k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/</link>
		<comments>https://www.emblogic.com/blog/11/sending-4k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/#comments</comments>
		<pubDate>Thu, 20 Nov 2014 05:08:11 +0000</pubDate>
		<dc:creator><![CDATA[Amit Prakash]]></dc:creator>
				<category><![CDATA[Device Drivers]]></category>
		<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11818</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.1 locked by: root; date: 2014/11/20 04:42:02; author: root; state: Exp; &#8230; <a href="https://www.emblogic.com/blog/11/sending-4k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:42:02;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: declaration.h,v<br />
Working file: declaration.h<br />
head:<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 0<br />
description:<br />
=============================================================================<br />
RCS file: initilization.c,v<br />
Working file: initilization.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Implemented check_region(), release_region() and request_region()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:45:10;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: cleanup.c,v<br />
Working file: cleanup.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Implemented release_region()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:46:32;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_open.c,v<br />
Working file: dev_open.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:47:34;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_release.c,v<br />
Working file: dev_release.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:48:34;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_write.c,v<br />
Working file: dev_write.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Made One Scull_dev and one qset_array.<br />
Implemented circular buffer<br />
Written data on circular buffer and outb() data serially.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:52:21;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_read.c,v<br />
Working file: dev_read.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Retrieve data serially from circular buffer<br />
implemented inb() to read data serially<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:54:00;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: file_op.h,v<br />
Working file: file_op.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/20 04:54:47;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
Write synopsis:<br />
Here Implementing Circular buffer. noq is the no .of quantum written to the circular buffer.<br />
label:</p>
<p>         for(i=0;i&lt;noq;i++)<br />
         {</p>
<p>                 if(idata[i],ubuff(lv*QUANTUM_SIZE),QUANTUM_SIZE);<br />
                         for(j=0;j&lt;8;j++)<br />
                          {<br />
                                 printk(KERN_INFO &quot;data[%d] = %c\n&quot;,i,ch1);<br />
                                 while((inb(0x3f8+5)&amp;0&#215;60)!=0&#215;60);<br />
                                 outb(ch1,0x3f8);<br />
                           }<br />
                 lv++;<br />
                 }</p>
<p>                 printk(KERN_INFO &quot;noq = %d\n&quot;,noq);<br />
                 printk(KERN_INFO &quot;QUANTUM_SIZE =%d, i = %d\n&quot;,QUANTUM_SIZE,i);<br />
                 if(i&lt;QUANTUM_SIZE-1)<br />
                 {<br />
                         printk(KERN_INFO &quot;Inside if for next quantum\n&quot;);<br />
                         noq = noq- QUANTUM_SIZE;<br />
                         i = 0;<br />
                         goto label;<br />
                 }<br />
         }</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/sending-4k-data-using-circular-buffer-through-ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IEEE EIA/TIA &#8211; 232E specification and associated serial port device driver(Implementing NULL MODEM)</title>
		<link>https://www.emblogic.com/blog/11/ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/</link>
		<comments>https://www.emblogic.com/blog/11/ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/#comments</comments>
		<pubDate>Mon, 17 Nov 2014 04:21:22 +0000</pubDate>
		<dc:creator><![CDATA[Amit Prakash]]></dc:creator>
				<category><![CDATA[Device Drivers]]></category>
		<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11814</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: included linux/ioport.h header file &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.1 locked by: root; date: 2014/11/17 04:02:27; &#8230; <a href="https://www.emblogic.com/blog/11/ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
included linux/ioport.h header file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/17 04:02:27;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: declaration.h,v<br />
Working file: declaration.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/17 04:02:50;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: initilization.c,v<br />
Working file: initilization.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
	root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;	selected revisions: 2<br />
description:<br />
Implemented check_region(), release_region() and request_region()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2	locked by: root;<br />
date: 2014/11/17 04:04:26;  author: root;  state: Exp;  lines: +1 -1<br />
Set the 7th bit(DLAB) of LCR register for baud setting.<br />
sent 0x0c to THR register for 9600.<br />
Now send 0&#215;03 to LCR register for 8-bit data transfer.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/11/17 04:03:33;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: cleanup.c,v<br />
Working file: cleanup.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
	root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;	selected revisions: 2<br />
description:<br />
Implemented release_region()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2	locked by: root;<br />
date: 2014/11/17 04:13:19;  author: root;  state: Exp;  lines: +1 -1<br />
******<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/11/17 04:11:07;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_open.c,v<br />
Working file: dev_open.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/17 04:11:28;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_release.c,v<br />
Working file: dev_release.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/17 04:11:46;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_write.c,v<br />
Working file: dev_write.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Write data serially using null modem<br />
Sent single character through null modem<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/17 04:12:07;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: dev_read.c,v<br />
Working file: dev_read.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
Receive the serial data successfully<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/17 04:12:21;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================<br />
RCS file: file_op.h,v<br />
Working file: file_op.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
	root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;	selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1	locked by: root;<br />
date: 2014/11/17 04:12:38;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/ieee-eiatia-232e-specification-and-associated-serial-port-device-driverimplementing-null-modem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IEEE EIA/TIA-232-E specification and associated serial port device driver</title>
		<link>https://www.emblogic.com/blog/11/ieee-eiatia-232-e-specification-and-associated-serial-port-device-driver/</link>
		<comments>https://www.emblogic.com/blog/11/ieee-eiatia-232-e-specification-and-associated-serial-port-device-driver/#comments</comments>
		<pubDate>Sat, 15 Nov 2014 05:41:32 +0000</pubDate>
		<dc:creator><![CDATA[Abhishek Choubey]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11797</guid>
		<description><![CDATA[Summary : The project uses RS 232 protocol to transfer a single byte of data between two host systems over a serial communication channel. Following are the rcs files : 1. Intialization module : RCS file: ./initialization.c,v Working file: initialization.c &#8230; <a href="https://www.emblogic.com/blog/11/ieee-eiatia-232-e-specification-and-associated-serial-port-device-driver/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Summary :<br />
The project uses RS 232 protocol to transfer a single byte of data between two host systems over a serial communication channel.<br />
Following are the rcs files :<br />
1. Intialization module :<br />
RCS file: ./initialization.c,v<br />
Working file: initialization.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
        root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;     selected revisions: 2<br />
description:<br />
Following operations have been performed successfully.<br />
&#8211;Driver successfully registered and removed.<br />
&#8211; Range of addresses from 0x3f8 to 0x3ff, acquired and release successfully.<br />
&#8211; Baud rate set by manipulating the Line control register.<br />
&#8211; Number of message bits set, by setting the bits 0 and 1 of the LCR resigter.<br />
&#8211; Driver successfully added to the kernel table.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2014/11/13 15:41:05;  author: root;  state: Exp;  lines: +1 -6<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/11/13 15:35:18;  author: root;  state: Exp;<br />
Initial revision<br />
========================================================<br />
2. write module :<br />
RCS file: dev_write.c,v<br />
Working file: dev_write.c<br />
head:<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 0<br />
description:<br />
write module :<br />
&#8211; write data to the serial port.<br />
&#8211; data read successfully from the user application.<br />
&#8211; data successfully written to the 0x3f8 or the THR ( Transmitter holding Register )<br />
==========================================================<br />
3. read module :<br />
RCS file: dev_read.c,v<br />
Working file: dev_read.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
        root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;     selected revisions: 2<br />
description:<br />
read module :<br />
&#8211; read the data from the serial port at address 0x03f8 ( Receiver Buffer Register ).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2014/11/13 15:55:54;  author: root;  state: Exp;  lines: +2 -0<br />
Data read successfully from the port and sent to user application.<br />
Single byte of data received successfully.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2014/11/13 15:55:20;  author: root;  state: Exp;<br />
Initial revision<br />
==========================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/ieee-eiatia-232-e-specification-and-associated-serial-port-device-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understand RS232 Connection &amp; Signals</title>
		<link>https://www.emblogic.com/blog/11/understand-rs232-connection-signals-2/</link>
		<comments>https://www.emblogic.com/blog/11/understand-rs232-connection-signals-2/#comments</comments>
		<pubDate>Mon, 03 Nov 2014 10:13:18 +0000</pubDate>
		<dc:creator><![CDATA[Amit Prakash]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11677</guid>
		<description><![CDATA[RS-232C, EIA RS-232, or simply RS-232, refers to the same standard defined by the Electronic Industries Association in 1969 for serial communication. RS-232 is a standard for serial communication transmission of data. It formally defines the signals connecting between a &#8230; <a href="https://www.emblogic.com/blog/11/understand-rs232-connection-signals-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RS-232C, EIA RS-232, or simply RS-232, refers to the same standard defined by the Electronic Industries Association in 1969 for serial communication.</p>
<p><b>RS-232 </b>is a standard for serial communication transmission of data. It formally defines the signals connecting between a <i>DTE</i> (<i>Data terminal equipment</i>) such as a computer, and a <i>DCE</i> (<i>Data communication equipment</i>), such as a modem.</p>
<p>A straight-through cable is used to connect a DTE (e.g. computer) to a DCE (e.g. modem), all signals in one side connected to the corresponding signals in the other side in a one-to-one basis. A crossover (null-modem) cable is used to connect two DTE directly, without a modem in between.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/understand-rs232-connection-signals-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find chipset mounted on your motherboard?????</title>
		<link>https://www.emblogic.com/blog/07/how-to-find-chipset-mounted-on-your-motherboard/</link>
		<comments>https://www.emblogic.com/blog/07/how-to-find-chipset-mounted-on-your-motherboard/#comments</comments>
		<pubDate>Fri, 18 Jul 2014 18:07:08 +0000</pubDate>
		<dc:creator><![CDATA[kashishgarg1992]]></dc:creator>
				<category><![CDATA[Character Driver]]></category>
		<category><![CDATA[Parallel Port Driver]]></category>
		<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=11162</guid>
		<description><![CDATA[You can find the chipset mounted on your motherboard . using coomand ==lspci on the terminal will give ou list of all chipset for audio card , usb ,serial, parallel ,vga &#8230;&#8230;.etc]]></description>
				<content:encoded><![CDATA[<p>You can find the chipset mounted on your motherboard .</p>
<p>using coomand ==lspci on the terminal will give ou list of all chipset for audio card , usb ,serial, parallel ,vga &#8230;&#8230;.etc</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/07/how-to-find-chipset-mounted-on-your-motherboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SERIAL COMMUNICATION</title>
		<link>https://www.emblogic.com/blog/12/serial-communication-4/</link>
		<comments>https://www.emblogic.com/blog/12/serial-communication-4/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 08:51:15 +0000</pubDate>
		<dc:creator><![CDATA[harsh.verma]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7946</guid>
		<description><![CDATA[SERIAL COMMUNICATION The serial port on your PC is a full-duplex device meaning that it can send and receive data at the same time. In order to be able to do this, it uses separate lines for transmitting and receiving &#8230; <a href="https://www.emblogic.com/blog/12/serial-communication-4/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p align="JUSTIFY"><span style="font-size: medium"><strong>SERIAL COMMUNICATION</strong></span></p>
<p align="JUSTIFY"><span style="font-size: medium"><span style="font-size: small">The serial port on your PC is a full-duplex device meaning that it can send and receive data at the same time. In order to be able to do this, it uses separate lines for transmitting and receiving data. Some types of serial devices support only one-way communications and therefore use only two wires in the cable &#8211; the transmit line and the signal ground.</span></span></p>
<p align="JUSTIFY"> <span style="font-size: medium"><strong>Communicating by Bits</strong></span></p>
<p>Once the start bit has been sent, the transmitter sends the actual data bits. There may either be 5, 6, 7, or 8 data bits, depending on the number you have selected. Both receiver and the transmitter must agree on the number of data bits, as well as the baud rate. Start and stop bit is send before and after the data has send.</p>
<p><span style="font-size: medium"><strong>The Parity Bit</strong></span></p>
<p>Besides the synchronization provided by the use of start and stop bits, an additional bit called a parity bit transmitted along with the data. A parity bit provide a small amount of error checking, to help detect data corruption that might occur during transmission. You can choose either even parity, odd parity. When even or odd parity is being used, the number of marks (logical 1 bits) in each data byte are counted, and a single bit is transmitted following the data bits to indicate whether the number of 1 bits just sent is even or odd.</p>
<p align="JUSTIFY"><strong><span style="font-size: medium">RS-232 Protocol</span></strong></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">RS-232 is the name for a standards for serial binary single-ended data and control signals connecting between </span><span style="font-family: Liberation Serif,serif"><span style="font-size: small">data terminal equipment and data circuit-terminating equipment. It is commonly used in computer serial ports. T</span></span><span style="font-size: small">he standard defines the electrical characteristics and signals timing, size and pin-out of connectors. This protocol defines the maximum open-circuit voltage of +/- 25 volts. Valid signals are in the range of +3 to +15 volts or the range -3 to -15 volts with respect to the ground. The range between -3 to +3 volts is not a valid RS-232 level. For data transmission lines (TxD, RxD etc.) logic one is defined as a negative voltage and the condition is called </span><strong><span style="font-size: small">mark</span></strong><span style="font-size: small">. Logic zero is +ve and the signal condition is termed space. Control signals have the opposite polarity: the active state is positive voltage and the inactive state is negative voltage.</span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/serial-communication-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serial Port Communication</title>
		<link>https://www.emblogic.com/blog/12/serial-port-communication/</link>
		<comments>https://www.emblogic.com/blog/12/serial-port-communication/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 08:32:42 +0000</pubDate>
		<dc:creator><![CDATA[Ashish Mishra]]></dc:creator>
				<category><![CDATA[Device Drivers]]></category>
		<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7934</guid>
		<description><![CDATA[Serial Port Communication &#160; Serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus where as in case of parallel communication, where several bits are sent as a whole, &#8230; <a href="https://www.emblogic.com/blog/12/serial-port-communication/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p align="CENTER"><span style="font-size: medium"><strong>Serial Port Communication</strong></span></p>
<p>&nbsp;</p>
<p align="JUSTIFY">Serial communication is the process of sending data one bit at a time, sequentially, over a communication channel or computer bus where as in case of parallel communication, where several bits are sent as a whole, on a link with several parallel channels. Serial communication is used for all long distance communication and most computer networks, where the difficulties like cost and synchronization make parallel communication difficult. Serial communication mostly refers to the RS-232 communication protocol where 9 pin connectors used for communication between 2 devices.</p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-size: medium"><strong>RS-232 Protocol:</strong></span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> RS-232 is the name for a standards for serial binary single-ended data and control signals connecting between </span><span style="font-family: Liberation Serif,serif"><span style="font-size: small">data terminal equipment and data circuit-terminating equipment. It is commonly used in computer serial ports. T</span></span><span style="font-size: small">he standard defines the electrical characteristics and signals timing, size and pin-out of connectors. This protocol defines the maximum open-circuit voltage of +/- 25 volts. Valid signals are in the range of +3 to +15 volts or the range ?3 to ?15 volts with respect to the ground. The range between ?3 to +3 volts is not a valid RS-232 level. For data transmission lines (TxD, RxD etc.) logic one is defined as a negative voltage and the condition is called </span><span style="font-size: small"><strong>mark</strong></span><span style="font-size: small">. Logic zero is +ve and the signal condition is termed space. Control signals have the opposite polarity: the active state is positive voltage and the inactive state is negative voltage.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><a name="cite_ref-9"></a><span style="font-size: small">The following is commonly used RS-232 signals and pin:</span></p>
<ul>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 1 = CT (Carrier Detect)</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 2 = RxD (Received Data)</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 3 = TxD (Transmitted Data)</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 4 = DTR (Data Terminal Ready)</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 5 = Ground</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 6 = DSR (Data Set Ready)</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 7 = RTS (Request To Send)</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 8 = CTS (Clear To Send)</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-size: small">Pin 9 = RI (Ring Indicator)</span></p>
</li>
</ul>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">Serial Port base Address and IRQ Number:</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Serial Port has following base addresses and IRQ number associated with it:</span></p>
<ol>
<ol>
<ol>
<li>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">3F8 4</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">2F8 3</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">3E8 4</span></p>
</li>
<li>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">2E8 3</span></p>
</li>
</ol>
</ol>
</ol>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">The most commonly used UART IC in personal computers is pc16550D. It has 8 registers which are used for controlling the data transmission. They are:</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 0: Receiver Buffer Register(Read Only) &amp; Transmitter Register(Write Only). </span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> These buffer are used for receiving and transmitting data between two devices.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 1: Interrupt Enable register</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> This register is used to enabling the interrupts. Setting bit 0-3 will enable Receive Data Available, Transmitter empty, Line Status Interrupt and Modem Status Interrupt.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 2 : Interrupts Identification Register(R/O) &amp; FIFO Control Register (W/O)</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> IIR : If any interrupt has occurred, reading out this register will give the corresponding interrupt value.</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> FCR : This will enable the FIFO mode for UART i.e. it will store up-to 14 bytes of data before transmission.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 3 : Line Control Register :</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> This register controls the transmission pattern of data. It is also used to set the baud rate of the UART by setting bit 7 and writing value in Divisor latch buffers.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 4 : Modem Control Register:</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Used to start the handshaking mechanism between host and peripheral.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 5: Line status Register :</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> This register is used to get the line status and if data is available. It is a read only register.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 6: Modem Status Register:</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> This register shows the current state of data line when read.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Register 7: Scratch Register</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> Divisor Latch (LS) &amp; (MS) : </span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> These register together forms a 16bit register when the bit7 of LCR register is set. They hold the multiplier value, to set the baud rate of the UART at desired rate.</span></p>
<p align="JUSTIFY">
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif">Data Transmission:</span></p>
<p align="JUSTIFY"><span style="font-family: Liberation Serif,serif"> First the transmitter will indicate the receiver by setting is MCR bit0 which will notify the receiver at MSR bit5 as pin 4 of transmitter is connected to pin 6 of receiver. After receiving the signal DSR, receiver will set its MCR bit1 which is connected to transmitter&#8217;s RTS pin and will notify the transmitter that he is ready to receive data. Then transmitter will put the data in Transmitter buffer and receiver will receive the data in receiver buffer.</span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/serial-port-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PC16550D UART with FIFO</title>
		<link>https://www.emblogic.com/blog/03/pc16550d-uart-with-fifo/</link>
		<comments>https://www.emblogic.com/blog/03/pc16550d-uart-with-fifo/#comments</comments>
		<pubDate>Sat, 09 Mar 2013 10:19:45 +0000</pubDate>
		<dc:creator><![CDATA[spatlou]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=6291</guid>
		<description><![CDATA[The PC16550D is an improved version of he original 16450 USRT functionally identical to 16450 on powerup (Character Mode). The PC16550D can be put into an alternative mode, (FIFO mode) to relieve the CPU of  excessive software overhead.]]></description>
				<content:encoded><![CDATA[<p>The PC16550D is an improved version of he original 16450 USRT functionally identical to 16450 on powerup (Character Mode). The PC16550D can be put into an alternative mode, (FIFO mode) to relieve the CPU of  excessive software overhead.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/pc16550d-uart-with-fifo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Serial Port Status To Pravjot Sir</title>
		<link>https://www.emblogic.com/blog/07/serial-port-status-to-pravjot-sir/</link>
		<comments>https://www.emblogic.com/blog/07/serial-port-status-to-pravjot-sir/#comments</comments>
		<pubDate>Fri, 27 Jul 2012 03:42:25 +0000</pubDate>
		<dc:creator><![CDATA[salathia]]></dc:creator>
				<category><![CDATA[Device Drivers]]></category>
		<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=4221</guid>
		<description><![CDATA[Implemented Serial Port DD for single byte with usage of 7 pins. Implemented Serial Port DD with FIFO for multiple bytes with the usage of 7 pins &#8230;.. Reading Interrupts&#8230;&#8230;&#8230;.]]></description>
				<content:encoded><![CDATA[<ol>
<li>Implemented Serial Port DD for single byte with usage of 7 pins.</li>
<li>Implemented Serial Port DD with FIFO for multiple bytes with the usage of 7 pins &#8230;..</li>
<li>Reading Interrupts&#8230;&#8230;&#8230;.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/07/serial-port-status-to-pravjot-sir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serial port start bit and stop bit transmission</title>
		<link>https://www.emblogic.com/blog/07/serial-port-start-bit-and-stop-bit-transmission/</link>
		<comments>https://www.emblogic.com/blog/07/serial-port-start-bit-and-stop-bit-transmission/#comments</comments>
		<pubDate>Tue, 10 Jul 2012 08:46:41 +0000</pubDate>
		<dc:creator><![CDATA[Sumit]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=3854</guid>
		<description><![CDATA[As RS-232 protocol says , frame consists of start , data , parity and stop bit , How Transmitter Transmits and Reciever  recieves start , stop and parity bit if 8 bit data is sent from transmitter to reciever , &#8230; <a href="https://www.emblogic.com/blog/07/serial-port-start-bit-and-stop-bit-transmission/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As RS-232 protocol says , frame consists of start , data , parity and stop bit ,</p>
<p>How Transmitter Transmits and Reciever  recieves start , stop and parity bit if 8 bit data is sent from transmitter to reciever , as THR containes 8 bits and that should be data .</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/07/serial-port-start-bit-and-stop-bit-transmission/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doubt with LCR Register</title>
		<link>https://www.emblogic.com/blog/07/doubt-with-lcr-register/</link>
		<comments>https://www.emblogic.com/blog/07/doubt-with-lcr-register/#comments</comments>
		<pubDate>Mon, 09 Jul 2012 17:04:55 +0000</pubDate>
		<dc:creator><![CDATA[Sumit]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=3844</guid>
		<description><![CDATA[I am unable to understand , how to use stick parity and set break bit of LCR Register ? How parity error bit of LSR of Reciever machine will check the parity of data , sent by Transmitter device ,]]></description>
				<content:encoded><![CDATA[<p>I am unable to understand , how to use stick parity and set break bit of LCR Register ?</p>
<p>How parity error bit of LSR of Reciever machine will check the parity of data , sent by Transmitter device ,</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/07/doubt-with-lcr-register/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Serial Port Driver</title>
		<link>https://www.emblogic.com/blog/01/serial-port-driver/</link>
		<comments>https://www.emblogic.com/blog/01/serial-port-driver/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 08:42:11 +0000</pubDate>
		<dc:creator><![CDATA[Kamran Ali]]></dc:creator>
				<category><![CDATA[Serial Port Driver]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=1694</guid>
		<description><![CDATA[Following is the code prepared by me.Only interrupt is left working on it.It is done for a loop back process.Any mistake &#8230; leave the comments #include&#8221;header.h&#8221; static int my_proc (char * buf, char ** start,off_t off, int count) { int &#8230; <a href="https://www.emblogic.com/blog/01/serial-port-driver/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Following is the code prepared by me.Only interrupt is left working on it.It is done for a loop back process.Any mistake &#8230; leave the comments</p>
<p>#include&#8221;header.h&#8221;</p>
<p>static int my_proc (char * buf, char ** start,off_t off, int count)<br />
{<br />
	int intr_id,lsr,msr,len=0;<br />
	int baudrate,div_lacth,lcr;<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Begin : &#8216;%s&#8217;\n&#8221;,__func__);<br />
	#endif</p>
<p>	intr_id = inb(SERIAL_IIR);<br />
	lsr = inb(SERIAL_LSR);<br />
	msr = inb(SERIAL_MSR);</p>
<p>	lcr = inb(SERIAL_LCR);<br />
	outb(lcr | 0&#215;80 , SERIAL_LCR);<br />
	div_lacth = inw(SERIAL_DLL);<br />
	outb(lcr,SERIAL_LCR);</p>
<p>	baudrate = CLOCKRATE / div_lacth;</p>
<p>	len = len + sprintf(buf+len, &#8220;Baudrate = %d\n&#8221;,baudrate);<br />
	len = len + sprintf(buf+len, &#8220;Data Format = %d\n&#8221;, 5+(lcr &amp; 3));<br />
	len = len + sprintf(buf+len, &#8220;MSR = %02x\n&#8221;,msr);<br />
	len = len + sprintf(buf+len, &#8220;LSR = %02x\n&#8221;,lsr);<br />
	len = len + sprintf(buf+len, &#8220;Interrupt ID = %02x\n&#8221;,intr_id);<br />
	len = len + sprintf(buf+len, &#8220;\n&#8221;);</p>
<p>	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Exit : &#8216;%s&#8217;\n&#8221;,__func__);<br />
	#endif</p>
<p>return len;<br />
}</p>
<p>static int my_open(struct inode *inode, struct file *filp)<br />
{</p>
<p>	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Begin :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	printk(KERN_INFO &#8220;Device_Open = %d\n&#8221;,Device_Open);<br />
	#endif</p>
<p>	if(Device_Open)<br />
	{<br />
		#ifdef PRINT<br />
		printk(KERN_INFO &#8220;The driver is busy\n&#8221;);<br />
		#endif<br />
		return -EBUSY;<br />
	}<br />
	Device_Open ++;</p>
<p>	//MOD_INC_USE_COUNT(THIS_MODULE);<br />
	try_module_get(THIS_MODULE);<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Exit :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	#endif<br />
return 0;<br />
}</p>
<p>static int my_release(struct inode *inode, struct file *filp)<br />
{<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Begin :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	#endif</p>
<p>	Device_Open &#8211;;<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Decrementing the value of Device_Open, new value is %d\n&#8221;,Device_Open);<br />
	#endif</p>
<p>	//MOD_INC_COUNT(THIS_MODULE);<br />
	module_put(THIS_MODULE);<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Decrementing the count in the kernel\n&#8221;);<br />
	#endif</p>
<p>	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Exit :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	#endif<br />
return 0;<br />
}</p>
<p>int my_ioctl(struct inode *inode, struct file *filp, unsigned int request, unsigned long address)<br />
{<br />
	int lcr,div_lacth,baudrate = 0 ;<br />
	int *there = (int *) address;<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Begin :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	#endif</p>
<p>	switch(request)<br />
	{<br />
		case IOCTL_GET_BAUDRATE:<br />
			lcr = inb(SERIAL_LCR);<br />
			outb(inb(SERIAL_LCR) | 0&#215;80, SERIAL_LCR);<br />
			div_lacth = inw(SERIAL_DLL);<br />
			outb(lcr,SERIAL_LCR);</p>
<p>			if(div_lacth &gt; 0)<br />
			{<br />
				baudrate = CLOCKRATE / div_lacth;<br />
				#ifdef PRINT<br />
				printk(KERN_INFO &#8220;div_lacth = %d\n&#8221;,div_lacth);<br />
				printk(KERN_INFO &#8220;baudrate = %d\n&#8221;,baudrate);<br />
				printk(KERN_INFO &#8220;Clockrate = %d&#8221;,CLOCKRATE);<br />
				#endif<br />
			}</p>
<p>			if(copy_to_user(there, &amp;baudrate, 4))<br />
			{<br />
				#ifdef PRINT<br />
				#endif<br />
				return -EFAULT;<br />
			}<br />
		return 0;<br />
		break;</p>
<p>		case IOCTL_SET_BAUDRATE:<br />
			if(copy_from_user(&amp;baudrate, there, 4))<br />
			{<br />
				#ifdef PRINT<br />
				#endif<br />
				return -EFAULT;<br />
			}</p>
<p>			if((baudrate  CLOCKRATE))<br />
			{<br />
				#ifdef PRINT<br />
				#endif<br />
				return -EFAULT;<br />
			}</p>
<p>			div_lacth = CLOCKRATE / baudrate;<br />
			lcr = inb(SERIAL_LCR);<br />
			outb(inb(SERIAL_LCR)| 0&#215;80, SERIAL_LCR);<br />
			outw(div_lacth,SERIAL_DLL);<br />
			outb(lcr,SERIAL_LCR);<br />
			return 0;<br />
			break;<br />
	}</p>
<p>	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Exit :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	#endif<br />
return -EINVAL;<br />
}</p>
<p>ssize_t my_read(struct file *filp, char *buf, size_t len, loff_t *pos)<br />
{<br />
	unsigned char data;<br />
	int count,i,lsr;<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Begin :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	#endif</p>
<p>	lsr = inb(SERIAL_LSR);<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;The LSR status is %04x\n&#8221;,lsr);<br />
	printk(KERN_INFO &#8220;The LSR status is %04x\n&#8221;,inb(SERIAL_LSR));<br />
	#endif</p>
<p>	if((lsr &amp; 0&#215;01) == 0)<br />
	{<br />
		if(filp-&gt;f_flags &amp; O_NONBLOCK)<br />
		{<br />
			#ifdef PRINT<br />
			printk(KERN_INFO &#8220;A NONBLOCK flag is on, exiting now\n&#8221;);<br />
			#endif<br />
			return 0;<br />
		}<br />
	}</p>
<p>	count = 0;</p>
<p>	for (i=0;if_flags &amp; O_NONBLOCK)<br />
		#ifdef PRINT<br />
		printk(KERN_INFO &#8220;A NONBLOCK flag is on, exiting now\n&#8221;);<br />
		#endif<br />
		return 0;<br />
	}<br />
	count = 0;</p>
<p>	for(i=0;i&lt;len;i++)<br />
	{<br />
		if(copy_from_user(&amp;data,buf+i,1))<br />
		{<br />
			#ifdef PRINT<br />
			printk(KERN_INFO &quot;Unable to read macro failed\n&quot;);<br />
			#endif<br />
			return -EFAULT;<br />
		}</p>
<p>		while((inb(SERIAL_LSR) &amp; 0&#215;20) == 0&#215;00);<br />
		outb(data,SERIAL_TX_REG);<br />
		++count;</p>
<p>		if((inb(SERIAL_MASK) &amp; 0&#215;01) != 0&#215;01)<br />
		{<br />
			#ifdef PRINT<br />
			printk(KERN_INFO &quot;the writer is not sending data to reciver\n&quot;);<br />
			#endif<br />
			break;<br />
		}<br />
	}<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &quot;Exit :&#039;%s&#039;\n&quot;,__func__);<br />
	#endif<br />
return count;<br />
}</p>
<p>static dev_t serial_setup_cdev (struct serial_dev *ldev , int i)<br />
{<br />
	dev_t ldevno;<br />
	int result;<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &quot;Begin :&#039;%s&#039;\n&quot;,__func__);<br />
	#endif<br />
	ldevno = MKDEV(serial_major,serial_minor);<br />
	cdev_init(&amp;ldev[i].cdev,&amp;fops);<br />
	ldev[i].cdev.owner = THIS_MODULE;<br />
	ldev[i].cdev.ops = &amp;fops;<br />
	result = cdev_add(&amp;ldev[i].cdev,ldevno,ndevice);<br />
	#ifdef PRINT<br />
        printk(KERN_INFO &quot;result = %d\n&quot;,result);<br />
        printk(KERN_INFO &quot;device no : %d\t,minor number = %d\n&quot;,i,serial_minor);<br />
        #endif</p>
<p>        serial_minor++;</p>
<p>	#ifdef PRINT<br />
	printk(KERN_INFO &quot;Exit :&#039;%s&#039;\n&quot;,__func__);<br />
	#endif<br />
return 0;<br />
}</p>
<p>static int __init my_init(void)<br />
{<br />
	int ret,i;<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &quot;Begin :&#039;%s&#039;\n&quot;,__func__);<br />
	#endif</p>
<p>	#ifdef PRINT<br />
	//printk(KERN_INFO &quot;Current value of jiffies is %ld\n&quot;,j1);<br />
	printk(KERN_INFO &quot;Major = %d\tMinor = %d\n&quot;,serial_major,serial_minor);<br />
	#endif</p>
<p>	if(serial_major)<br />
	{<br />
		devno = MKDEV(serial_major,serial_minor);<br />
		ret = register_chrdev_region(devno, ndevice, device_name);<br />
	}<br />
	else<br />
	{<br />
		ret = alloc_chrdev_region(&amp;devno, serial_minor, ndevice, device_name);<br />
		serial_major = MAJOR(devno);<br />
		#ifdef PRINT<br />
		printk(KERN_INFO &quot;Major number allocated is %d\n&quot;,serial_major);<br />
		#endif<br />
	}</p>
<p>	if(ret comm,current-&gt;pid);<br />
        #endif</p>
<p>	if(serial_major)<br />
	{<br />
		serial_dev = (struct serial_dev *) kmalloc (sizeof(struct serial_dev),GFP_KERNEL);<br />
		if(!serial_dev)<br />
		{<br />
			#ifdef PRINT<br />
			printk(KERN_WARNING &#8220;Unable to allocate the memory for the device\n&#8221;);<br />
			#endif<br />
			return -ENOMEM;<br />
		}<br />
		#ifdef PRINT<br />
		printk(KERN_WARNING &#8220;allocate the memory for the device\n&#8221;);<br />
		#endif<br />
		memset(serial_dev, 0, sizeof(struct serial_dev));</p>
<p>		for(i=0;icomm,current-&gt;pid);<br />
        #endif</p>
<p>	//changing the register<br />
	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Setting the default values to the register&#8230;now\n&#8221;);<br />
	#endif</p>
<p>	outb(0&#215;00,SERIAL_IER);				//disable the IER<br />
	outb(0&#215;00,SERIAL_FIFO);				//disable the FIFO<br />
	outb(0&#215;00,SERIAL_MCR);				//MCR = 0</p>
<p>	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Setting the default values to the register done successfully\n&#8221;);<br />
	#endif</p>
<p>	#ifdef PRINT<br />
	printk(KERN_INFO &#8220;Exit :&#8217;%s&#8217;\n&#8221;,__func__);<br />
	#endif<br />
}</p>
<p>module_init(my_init);<br />
module_exit(my_exit);</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/serial-port-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
