<?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>source code | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/source-code/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Mon, 31 Jan 2011 10:28:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>C program to for Moving Car</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 09:17:14 +0000</pubDate>
				<category><![CDATA[Graphics]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[Source Codes]]></category>
		<category><![CDATA[c graphics]]></category>
		<category><![CDATA[programs]]></category>
		<category><![CDATA[cleardevice]]></category>
		<category><![CDATA[moving graphics]]></category>
		<category><![CDATA[closegraph]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=818</guid>

					<description><![CDATA[<p>line(80+i,300,90+i,270);<br />
line(90+i,270,120+i,270);<br />
line(120+i,270,160+i,240);<br />
line(160+i,240,230+i,240);<br />
line(230+i,240,275+i,270);</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/">C program to for Moving Car</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<pre lang="c" escaped="true" line="1">
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<dos.h>
#include<graphics.h>

void main()
{
	int gd=DETECT,gm;
	int i=0,m=0;
	initgraph(&gd,&gm,"..\\bgi");
	while(!kbhit())
	{
		cleardevice();
		i++;
		if(i>getmaxx())
			i-=670;
		line(80+i,300,90+i,270);
		line(90+i,270,120+i,270);
		line(120+i,270,160+i,240);
		line(160+i,240,230+i,240);
		line(230+i,240,275+i,270);
		line(275+i,270,310+i,270);
		line(310+i,270,335+i,290);
		line(335+i,290,335+i,300);
		line(255+i,300,335+i,300);
		line(180+i,300,210+i,300);
		line(80+i,300,135+i,300);
		arc(232+i,300,0,180,23);
		arc(157+i,300,0,180,23);
		circle(232+i,300,18);
		circle(157+i,300,18);
		pieslice(232+i,300,0+m,90+m,18);
		pieslice(232+i,300,180+m,270+m,18);
		pieslice(157+i,300,0+m,90+m,18);
		pieslice(157+i,300,180+m,270+m,18);
		if(m<-360)
			m=90;
		m-=3;	
	delay(5);
	}
	getch();
	closegraph();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/">C program to for Moving Car</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/graphics/c-program-to-for-moving-car/feed/</wfw:commentRss>
			<slash:comments>21</slash:comments>
		
		
			</item>
		<item>
		<title>C program to find the Shortest path for a given graph</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/c-program-to-find-the-shortest-path-for-a-given-graph/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/c-program-to-find-the-shortest-path-for-a-given-graph/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 20 Sep 2009 06:51:07 +0000</pubDate>
				<category><![CDATA[C Programs]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[Shortest path]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=791</guid>

					<description><![CDATA[<p>OUTPUT:<br />
enter the cost matrix :<br />
0 1 4 2 0<br />
0 0 0 2 3<br />
0 0 0 3 0<br />
0 0 0 0 5<br />
0 0 0 0 0<br />
enter number of paths : 4<br />
enter possible paths :<br />
1 2 4 5 0<br />
1 2 5 0 0<br />
1 4 5 0 0<br />
1 3 4 5 0<br />
minimum cost : 4<br />
minimum cost path :<br />
  1-->2-->5</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-program-to-find-the-shortest-path-for-a-given-graph/">C program to find the Shortest path for a given graph</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>OUTPUT:<br />
enter the cost matrix :<br />
0 1 4 2 0<br />
0 0 0 2 3<br />
0 0 0 3 0<br />
0 0 0 0 5<br />
0 0 0 0 0<br />
enter number of paths : 4<br />
enter possible paths :<br />
1 2 4 5 0<br />
1 2 5 0 0<br />
1 4 5 0 0<br />
1 3 4 5 0<br />
minimum cost : 4<br />
minimum cost path :<br />
  1&#8211;>2&#8211;>5</p>
<pre lang="c" escaped="true" line="1">
#include<stdio.h>
#include<conio.h>
void main()
{
int path[5][5],i,j,min,a[5][5],p,st=1,ed=5,stp,edp,t[5],index;
clrscr();
printf("enter the cost matrix\n");
for(i=1;i<=5;i++)
for(j=1;j<=5;j++)
scanf("%d",&#038;a[i][j]);
printf("enter  number of paths\n");
scanf("%d",&#038;p);
printf("enter possible paths\n");
for(i=1;i<=p;i++)
for(j=1;j<=5;j++)
scanf("%d",&#038;path[i][j]);
for(i=1;i<=p;i++)
{
t[i]=0;
stp=st;
for(j=1;j<=5;j++)
{
edp=path[i][j+1];
t[i]=t[i]+a[stp][edp];
if(edp==ed)
break;
else
stp=edp;
}
}
min=t[st];index=st;
for(i=1;i<=p;i++)
{
if(min>t[i])
{
min=t[i];
index=i;
}
}
printf("minimum cost %d",min);
printf("\n minimum cost path ");
for(i=1;i<=5;i++)
{
printf("--> %d",path[index][i]);
if(path[index][i]==ed)
break;
}
getch();
}
</pre>
<p>OUTPUT:<br />
enter the cost matrix :<br />
0 1 4 2 0<br />
0 0 0 2 3<br />
0 0 0 3 0<br />
0 0 0 0 5<br />
0 0 0 0 0<br />
enter number of paths : 4<br />
enter possible paths :<br />
1 2 4 5 0<br />
1 2 5 0 0<br />
1 4 5 0 0<br />
1 3 4 5 0<br />
minimum cost : 4<br />
minimum cost path :<br />
  1&#8211;>2&#8211;>5</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/c-program-to-find-the-shortest-path-for-a-given-graph/">C program to find the Shortest path for a given graph</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/c-program-to-find-the-shortest-path-for-a-given-graph/feed/</wfw:commentRss>
			<slash:comments>10</slash:comments>
		
		
			</item>
		<item>
		<title>C program for finding remainder</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/number/c-program-for-finding-remainder/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/number/c-program-for-finding-remainder/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sun, 20 Sep 2009 04:35:20 +0000</pubDate>
				<category><![CDATA[Number Programs]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[c programs]]></category>
		<category><![CDATA[finding remainder]]></category>
		<category><![CDATA[binary remainder]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=783</guid>

					<description><![CDATA[<p>OUTPUT:<br />
enter frame:<br />
1 0 1 1 0 1 0 0<br />
enter generator:<br />
1 0 1 0<br />
remainder is:<br />
0 0 1 0</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/number/c-program-for-finding-remainder/">C program for finding remainder</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>OUTPUT:<br />
enter frame:<br />
1 0 1 1 0 1 0 0<br />
enter generator:<br />
1 0 1 0<br />
remainder is:<br />
0 0 1 0</p>
<pre lang="c" escaped="true" line="1">
#include<stdio.h>
#include<conio.h>
void main()
{
 int  i,j,gen[4],rem[4],frl=8,genl=4,k,k1,fr[11];
 clrscr();
 printf("enter frame:");
 for(i=0;i<frl;i++)
{ 
scanf("%d",&#038;fr[i]);
} 
for(i=frl;i<11;i++)
{ 
fr[i]=0;
}
printf("enter generator:");
 for(i=0;i<4;i++)
 scanf("%d",&#038;gen[i]);
  for(k=0;k<frl;k++)
  {
   if(fr[k]==1)
   {
   k1=k;
    for(i=0,j=k;i<genl;i++,j++)
    {
     rem[i]=fr[j]^gen[i];
    }

    for(i=0;i<genl;i++)
    {
	  fr[k1]=rem[i];
     k1++;
    }
   }
    }
      printf("\nremainder is: ");
      for(i=0;i<4;i++)
     printf("%d",rem[i]);
     getch();
}
</pre>
<p>OUTPUT:<br />
enter frame:<br />
1 0 1 1 0 1 0 0<br />
enter generator:<br />
1 0 1 0<br />
remainder is:<br />
0 0 1 0</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/number/c-program-for-finding-remainder/">C program for finding remainder</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/number/c-program-for-finding-remainder/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Program for Deadlock detection algorithm</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/program-for-deadlock-detection-algorithm/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/program-for-deadlock-detection-algorithm/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Sat, 19 Sep 2009 18:07:02 +0000</pubDate>
				<category><![CDATA[C Programs]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[deadlock]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[c program]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=767</guid>

					<description><![CDATA[<p>INPUT: enter total no. of processes : 4 enter claim matrix : 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 enter allocation matrix : 1 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-deadlock-detection-algorithm/">Program for Deadlock detection algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>INPUT:<br />
enter total no. of processes : 4<br />
enter claim matrix :<br />
0 1 0 0 1<br />
0 0 1 0 1<br />
0 0 0 0 1<br />
1 0 1 0 1<br />
enter allocation matrix :<br />
1 0 1 1 0<br />
1 1 0 0 0<br />
0 0 0 1 0<br />
0 0 0 0 0<br />
enter resource vector :<br />
2 1 1 2 1<br />
enter the availability vector :<br />
0 0 0 0 1</p>
<p>OUTPUT :<br />
deadlock causing processes are : 1 2</p>
<pre lang="c">#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
void main()
{
int found,flag,l,p[4][5],tp,c[4][5],i,j,k=1,m[5],r[5],a[5],temp[5],sum=0;
clrscr();
printf("enter total no of processes");
scanf("%d",&amp;tp);
printf("enter clain matrix");
for(i=1;i&lt;=4;i++)
for(j=1;j&lt;=5;j++)
{
scanf("%d",&amp;c[i][j]);
}
printf("enter allocation matrix");
for(i=1;i&lt;=4;i++)
for(j=1;j&lt;=5;j++)
{
scanf("%d",&amp;p[i][j]);
}
printf("enter resource vector:\n");
for(i=1;i&lt;=5;i++)
{
scanf("%d",&amp;r[i]);
}
printf("enter availability vector:\n");
for(i=1;i&lt;=5;i++)
{
scanf("%d",&amp;a[i]);
temp[i]=a[i];
}
for(i=1;i&lt;=4;i++)
{
sum=0;
for(j=1;j&lt;=5;j++)
{
sum+=p[i][j];
}
if(sum==0)
{
m[k]=i;
k++;
}
}
for(i=1;i&lt;=4;i++)
{
for(l=1;l&lt;k;l++)
if(i!=m[l])
{
flag=1;
for(j=1;j&lt;=5;j++)
if(c[i][j]&gt;temp[j])
{
flag=0;
break;
}
}
if(flag==1)
{
m[k]=i;
k++;
for(j=1;j&lt;=5;j++)
temp[j]+=p[i][j];
}
}
printf("deadlock causing processes are:");
for(j=1;j&lt;=tp;j++)
{
found=0;
for(i=1;i&lt;k;i++)
{
if(j==m[i])
found=1;
}
if(found==0)
printf("%d\t",j);
}
getch();
}</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-deadlock-detection-algorithm/">Program for Deadlock detection algorithm</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/program-for-deadlock-detection-algorithm/feed/</wfw:commentRss>
			<slash:comments>28</slash:comments>
		
		
			</item>
		<item>
		<title>Program for Cyclic Redundency Check</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/program-for-cyclic-redundency-check/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/program-for-cyclic-redundency-check/#respond</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 18 Sep 2009 18:47:44 +0000</pubDate>
				<category><![CDATA[C Programs]]></category>
		<category><![CDATA[Cyclic Redundency Check]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[source code]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=765</guid>

					<description><![CDATA[<p>INPUT:<br />
enter frame :<br />
1 1 1 1 1 1 1 1<br />
enter generator :<br />
1 1 0 1</p>
<p>OUTPUT:<br />
frame received correctly</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-cyclic-redundency-check/">Program for Cyclic Redundency Check</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>INPUT:<br />
enter frame :<br />
1 1 1 1 1 1 1 1<br />
enter generator :<br />
1 1 0 1</p>
<p>OUTPUT:<br />
frame received correctly</p>
<pre lang="c" escaped="true" line="1">
#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
int gen[4],genl,frl,rem[4];
void main()
{
int  i,j,fr[8],dupfr[11],recfr[11],tlen,flag;
clrscr();
frl=8;  genl=4;
printf("enter frame:");
for(i=0;i&lt;frl;i++)
{
scanf("%d",&amp;fr[i]);
dupfr[i]=fr[i];
}
printf("enter generator:");
for(i=0;i&lt;genl;i++)
scanf("%d",&amp;gen[i]);

tlen=frl+genl-1;
for(i=frl;i&lt;tlen;i++)
{
dupfr[i]=0;
}
remainder(dupfr);

for(i=0;i&lt;frl;i++)
{
recfr[i]=fr[i];
}
for(i=frl,j=1;j&lt;genl;i++,j++)
{
recfr[i]=rem[j];
}
remainder(recfr);
flag=0;
for(i=0;i&lt;4;i++)
{
if(rem[i]!=0)
flag++;
}
if(flag==0)
{
printf("frame received correctly");
}
else
{
printf("the received frame is wrong");
}

getch();
}

remainder(int fr[])
{
int k,k1,i,j;
for(k=0;k&lt;frl;k++)
{
if(fr[k]==1)
{
k1=k;
for(i=0,j=k;i&lt;genl;i++,j++)
{
rem[i]=fr[j]^gen[i];
}

for(i=0;i&lt;genl;i++)
{
fr[k1]=rem[i];
k1++;
}
}
}
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-cyclic-redundency-check/">Program for Cyclic Redundency Check</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/program-for-cyclic-redundency-check/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Program for character stuffing</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/program-for-character-stuffing/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/program-for-character-stuffing/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 18 Sep 2009 18:42:15 +0000</pubDate>
				<category><![CDATA[C Programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[sharacter stuffing]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=762</guid>

					<description><![CDATA[<p>INPUT:<br />
enter string:<br />
asdlefgh<br />
enter position: 8<br />
invalid position,enter again: 3<br />
enter the character: k</p>
<p>OUTPUT:<br />
frame after stuffing:<br />
dlestx as dle k dle dle dlefgh dleetx</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-character-stuffing/">Program for character stuffing</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>INPUT:<br />
enter string:<br />
asdlefgh<br />
enter position: 8<br />
invalid position,enter again: 3<br />
enter the character: k</p>
<p>OUTPUT:<br />
frame after stuffing:<br />
dlestx as dle k dle dle dlefgh dleetx</p>
<pre lang="c" escaped="true" line="1">
#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
#include&lt;string.h&gt;
#include&lt;process.h&gt;
void main()
{
int i=0,j=0,n,pos;
char a[20],b[50],ch;
clrscr();
printf("enter string\n");
scanf("%s",&amp;a);
n=strlen(a);
printf("enter position\n");
scanf("%d",&amp;pos);
if(pos&gt;n)
{
printf("invalid position, Enter again :");
scanf("%d",&amp;pos);
}
printf("enter the character\n");
ch=getche();

b[0]='d';
b[1]='l';
b[2]='e';
b[3]='s';
b[4]='t';
b[5]='x';
j=6;
while(i&lt;n)
{
if(i==pos-1)
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]=ch;
b[j+4]='d';
b[j+5]='l';
b[j+6]='e';
j=j+7;
}
if(a[i]=='d' &amp;&amp; a[i+1]=='l' &amp;&amp; a[i+2]=='e')
{
b[j]='d';
b[j+1]='l';
b[j+2]='e';
j=j+3;
}

b[j]=a[i];
i++;
j++;
}
b[j]='d';
b[j+1]='l';
b[j+2]='e';
b[j+3]='e';
b[j+4]='t';
b[j+5]='x';
b[j+6]='\0';
printf("\nframe after stuffing:\n");
printf("%s",b);
getch();
}
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-character-stuffing/">Program for character stuffing</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/program-for-character-stuffing/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
			</item>
		<item>
		<title>Program for Bit Stuffing</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c/program-for-bit-stuffing/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c/program-for-bit-stuffing/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 18 Sep 2009 18:17:45 +0000</pubDate>
				<category><![CDATA[C Programs]]></category>
		<category><![CDATA[c program]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[bits]]></category>
		<category><![CDATA[stuffing]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=757</guid>

					<description><![CDATA[<p>Enter frame length: 10</p>
<p>Enter input frame (0's &#38; 1's only):<br />
1 0 1 0 1 1 1 1 1 1</p>
<p>After stuffing the frame is:<br />
1 0 1 0 1 1 1 1 1 0 1</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-bit-stuffing/">Program for Bit Stuffing</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>OUTPUT:</p>
<p>Enter frame length: 10</p>
<p>Enter input frame (0&#8217;s &amp; 1&#8217;s only):<br />
1 0 1 0 1 1 1 1 1 1</p>
<p>After stuffing the frame is:<br />
1 0 1 0 1 1 1 1 1 0 1</p>
<pre lang="c" escaped="true" line="1">#include&lt;stdio.h&gt;
#include&lt;conio.h&gt;
#include&lt;string.h&gt;
void main()
{
int a[20],b[30],i,j,k,count,n;
clrscr();
printf("Enter frame length:");
scanf("%d",&amp;n);
printf("Enter input frame (0's &amp; 1's only):");
for(i=0;i&lt;n;i++)
scanf("%d",&amp;a[i]);
i=0; count=1; j=0;
while(i&lt;n)
{
if(a[i]==1)
{
b[j]=a[i];
for(k=i+1;a[k]==1 &amp;&amp; k&lt;n &amp;&amp; count&lt;5;k++)
{
j++;
b[j]=a[k];
count++;
if(count==5)
{
j++;
b[j]=0;
}
i=k;
}}
else
{
b[j]=a[i];
}
i++;
j++;
}
printf("After stuffing the frame is:");
for(i=0;i&lt;j;i++)
printf("%d",b[i]);
getch();
}</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c/program-for-bit-stuffing/">Program for Bit Stuffing</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c/program-for-bit-stuffing/feed/</wfw:commentRss>
			<slash:comments>14</slash:comments>
		
		
			</item>
		<item>
		<title>Interfacing an LCD to the 8951 Microcontroller</title>
		<link>https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-an-lcd-to-the-8951-microcontroller/</link>
					<comments>https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-an-lcd-to-the-8951-microcontroller/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Wed, 19 Nov 2008 08:21:36 +0000</pubDate>
				<category><![CDATA[8051/8951]]></category>
		<category><![CDATA[8951 Microcontroller]]></category>
		<category><![CDATA[Interfacing LCD]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[LCD commands]]></category>
		<category><![CDATA[LCD pin configuration]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=151</guid>

					<description><![CDATA[<p>LCD pin descriptions: The LCD discussed in this section has 14 pins. The function of each pin is given in table. Vcc, Vss, and VEE: While Vcc and Vss  provide  +5V and ground, respectively, VEE  is used for controlling LCD contrast. RS &#8211; register select: There are two very important registers inside the LCD. The</p>
<p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-an-lcd-to-the-8951-microcontroller/">Interfacing an LCD to the 8951 Microcontroller</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>LCD pin descriptions:</strong><br />
The LCD discussed in this section has 14 pins. The function of each pin is given in table.</p>
<figure id="attachment_152" aria-describedby="caption-attachment-152" style="width: 355px" class="wp-caption aligncenter"><img decoding="async" class="size-full wp-image-152" title="LCD pin desciptions" src="https://studentprojects.in/wp-content/uploads/2008/11/lcd_pin.jpg" alt="LCD pin desciptions" width="355" height="225" /><figcaption id="caption-attachment-152" class="wp-caption-text">LCD pin descriptions</figcaption></figure>
<figure id="attachment_153" aria-describedby="caption-attachment-153" style="width: 500px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="size-full wp-image-153" title="LCD pin desciptions" src="https://studentprojects.in/wp-content/uploads/2008/11/licdpinconf.jpg" alt="LCD pin desciptions" width="500" height="317" /><figcaption id="caption-attachment-153" class="wp-caption-text">LCD pin desciptions</figcaption></figure>
<p><strong> Vcc, Vss, and VEE</strong>:</p>
<p>While Vcc and Vss  provide  +5V and ground, respectively, VEE  is used for controlling LCD contrast.</p>
<p><strong>RS &#8211; register select:</strong></p>
<p>There are two very important registers inside the LCD. The RS pin is used for their selection as follows. If RS = 0, the instruction command code register is selected, allowing the user to send a command such as clear display, cursor at home, etc. If  RS = 1 the data register is selected, allowing the user to send data to be displayed on the LCD.</p>
<p><strong>R/W &#8211; read/write:</strong></p>
<p>R/W input allows the user to write information to the LCD or read information from it. R/W = 1 when reading; R/W =0 when writing.</p>
<p><strong>E &#8211; enable:</strong></p>
<p>The enable pin is used by the LCD to latch information presented to its data pins. When data is supplied to data pins, a high to low pulse must be applied to this pin in order for the LCD to latch in the data present at the data pins. This pulse must be a minimum of 450 ns wide.</p>
<p><strong>D0 – D7:</strong></p>
<p>The 8 bit data pins, D0 – D7, are used to send information to the LCD or read the contents of the LCD’s internal registers.</p>
<p>To display letters and numbers, we send ASCII codes for the letters A – Z, a – z, and numbers 0 – 9 to these pins while making RS = 1.</p>
<p>There are also instructions command codes that can be sent to the LCD to clear the display or force the cursor to the home position or blink the cursor. Table below lists the instruction command codes.</p>
<figure id="attachment_154" aria-describedby="caption-attachment-154" style="width: 447px" class="wp-caption aligncenter"><img decoding="async" loading="lazy" class="size-full wp-image-154" title="LCD Commands table" src="https://studentprojects.in/wp-content/uploads/2008/11/lcdcommands.jpg" alt="LCD Commands table" width="447" height="443" /><figcaption id="caption-attachment-154" class="wp-caption-text">LCD Commands table</figcaption></figure>
<p>We also use RS = 0 to check the busy flag bit to see if the LCD is ready to receive information. The busy flag is D7 and can be read when R/W =1 and RS = 0, as follows: if R/W =1, RS =0. When D7 = 1(busy flag = 1), the LCD busy taking care of  internal operations and will not accept any new information. When D7 = 0, the LCD is ready to receive new information. Note: It is recommended to check the busy flag before writing any data to the LCD.</p>
<p>Example programs are given in the next page.</p><p>The post <a href="https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-an-lcd-to-the-8951-microcontroller/">Interfacing an LCD to the 8951 Microcontroller</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/electronics/microcontroller/8051-8951/interfacing-an-lcd-to-the-8951-microcontroller/feed/</wfw:commentRss>
			<slash:comments>18</slash:comments>
		
		
			</item>
	</channel>
</rss>
