<?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; deepak.jaiswal</title>
	<atom:link href="https://www.emblogic.com/blog/author/deepak-jaiswal/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>An introduction to Parallel port</title>
		<link>https://www.emblogic.com/blog/12/an-introduction-to-parallel-port/</link>
		<comments>https://www.emblogic.com/blog/12/an-introduction-to-parallel-port/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 08:34:04 +0000</pubDate>
		<dc:creator><![CDATA[deepak.jaiswal]]></dc:creator>
				<category><![CDATA[Parallel Port Driver]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7937</guid>
		<description><![CDATA[An Introduction to parallel port A parallel interface for connecting an external device. Parallel port is basically used to transfer data parallely . 8 bits of data is transmitted at a time in parallel port.On PCs, the parallel port uses &#8230; <a href="https://www.emblogic.com/blog/12/an-introduction-to-parallel-port/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>An Introduction to parallel port</p>
<p>A parallel interface for connecting an external device. Parallel port is basically used to transfer data parallely . 8 bits of data is transmitted at a time in parallel port.On PCs, the parallel port uses a 25-pin connector (type DB-25) and is used to connect printers, computers and other devices that need relatively high bandwidth. It is often called a Centronics interface after the company that designed the original standard for parallel communication between a computer and printer. (The modern parallel interface is based on a design by Epson.) A newer type of parallel port, which supports the same connectors as the Centronics interface, is the EPP (Enhanced Parallel Port) or ECP (Extended Capabilities Port). Both of these parallel ports support bi-directional communication and transfer rates ten times as fast as the Centronics port.</p>
<p>There are 5 modes of transferring data using parallel port :-</p>
<p>1- compatibility mode or centronic  mode<br />
2- nibble mode<br />
3-byte mode</p>
<p>4-ECP mode<br />
5- EPP mode</p>
<p>compatibility mode :- The Centronics interface is a standard input/output (I/O) interface designed in the 1970s for connecting printers and other devices. It was developed by the Centronics printer company which is now defunct. The Centronics interface, also known as a Parallel Port, became the standard means of connecting printers to personal computers for decades.</p>
<p>The technology that the Centronics interface developed into included a number of incarnations of the Parallel interface including the ECP (Entended Capabilities Parallel) and EPP (Enhanced Parallel Port) versions. The technology required a 25 way connector of which up to 17 wires were used in the specification and bi-directional communications became possible in the enhanced versions like ECP and EPP.</p>
<p>Today, the Centronics interface has been largely replaced by the universal serial bus (USB). For the most part, many manufactures have entirely omitted the parallel interface. However, a USB-to-parallel port adapter is available for PCs without a parallel port. These can be used for parallel printers and other peripheral devices that have a parallel interface.</p>
<p>Nibble mode :-The Nibble mode is the most common way to get reverse channel data from a printer or peripheral. This mode is usually combined with the Compatibility mode or a proprietary forward channel mode to create a complete bi-directional channel.<br />
All of the standard parallel ports provide 5 lines from the peripheral to the PC to be used for external status indications. Using these lines, a peripheral can send a byte of data (8-bits) by sending 2 nibbles (4-bits) of information to the PC in two data transfer cycles. Unfortunately, since the nACK line is generally used to provide a peripheral interrupt, the bits used to transfer a nibble are not conveniently packed into the byte defined by the Status register. For this reason, the software must read the status byte and then manipulate the bits in order to get a correct byte.</p>
<p>1. Host signals ability to take data by asserting HostBusy low<br />
2. Peripheral responds by placing first nibble on status lines<br />
3. Peripheral signals valid nibble by asserting PtrClk low<br />
4. Host sets HostBusy high to indicate that it has received the nibble and is not yet ready for another nibble.<br />
5. Peripheral sets PtrClk high to acknowledge host<br />
6. States 1 through 5 repeat for the second nibble.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/12/an-introduction-to-parallel-port/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ipc mechanism (pipe and fifo)</title>
		<link>https://www.emblogic.com/blog/11/ipc-mechanism-pipe-and-fifo/</link>
		<comments>https://www.emblogic.com/blog/11/ipc-mechanism-pipe-and-fifo/#comments</comments>
		<pubDate>Tue, 26 Nov 2013 04:21:01 +0000</pubDate>
		<dc:creator><![CDATA[deepak.jaiswal]]></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=7434</guid>
		<description><![CDATA[IPC MECHANISM The acronym of IPC is inter process communication. Before we talk about ipc,it is necessary to know about process. Process is defined as,”when one or more than one thread are executing with an address space” IPC mechanism is &#8230; <a href="https://www.emblogic.com/blog/11/ipc-mechanism-pipe-and-fifo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: center"><strong>IPC MECHANISM</strong></p>
<p>The acronym of IPC is inter process communication. Before we talk about ipc,it is necessary to know about process. Process is defined as,”when one or more than one thread are executing with an address space”<br />
IPC mechanism is a set of methods to exchanging the data between multiple threads in one or more process.There are various methods of IPC just like pipes, fifo, message queue and shared memory.Every mechanism has its own properties.But here I am going to discuss about pipes and fifo only.</p>
<p><strong>Pipe</strong> :- A pipe is a mechanism for inter process communication in which data is written to the pipe by one process and read by another process.pipe has no name thatswhy it is known as unnamed process. In pipe data always send in buffer.In pipe data<br />
send in unidirectional.<br />
In pipes when we use fork ( ) it creates a process like a duplicate of main. That means when we use fork there are two processes are generated one is known as parent process and another one is known as child process. Fork returns -1 when forking is failed.when it returns 0 that mean its a child process and when fork return positive value that it is a parent process.<br />
If child process exit before parent process its known as zombie process . If parent process exit before child process then it is known as orphan process . In this case child is managed by Init process.pipe function is declared in header file #include.<br />
<strong>three client server program using pipes :-</strong> here I have done three client server program using pipes.in which there are three clients and one server and three processing unit.<br />
From clients I sent data using buffer and data sent from client to server using pipe. Then execl function is used in child process of server. And data read from client to server using a file descriptor. Which is send to processing unit by server using write operation by another file descriptor. Then again forking is done in server program and processing unit is called using execl function. In processing unit data transmitted by server is in the form of string thats why we have to use sscanf in processing side to convert data in respective integer and character type.after processing the data result is again converted in the form of string and sent to server using write operation using file descriptor.<br />
Then data read by server using read operation and result sent by server to client using write operation with the help of file descriptor in between client and server.<br />
For the synchronization we can use sleep or wait function.<br />
Same process is done for rest of two clients.we can do this program by using only two pipes , one is used in between client and server and another one is used in between server and processing unit.<br />
<strong>FIFO</strong> :- The acronym for fifo is first in first out. fifo is also known is named pipe. fifo is a related process.processes open in the fifo by name in order to communicate through it.<br />
The name allows unrelated processes to communicate through it.Multiple processes can open(), write() and read() from the FIFO. open for writing blocks until someone opens for reading .when data write from one side ,it will go on &#8216;block on write&#8217; if there will be reader in another side and same thing happened if reader tries to read and there is no writer in another side then reader will go on &#8216;block on read&#8217;.<br />
<strong>Creating a FIFO</strong>:<br />
int mkfifo(const char *path, mode_t mode);<br />
before creating a fifo using mkfifo we use access( fifo_name,flag) to check that the same name of fifo is already created or not. After creating fifo the second step is open the fifo<br />
in write only (O_WRONLY) or read only (O_RDONLY).which returns file descriptor fd. Then read or write operation is perform using this file descriptor.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/11/ipc-mechanism-pipe-and-fifo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
