Temperature Controller
 Liquid Level Controller
 Load Positioning System
 Laser Cutting Machine
 Motion Control System
 DC Motor controller
 AC Motor speed control

load positioning system program

#include<reg51.h>
#include <string.h>

sbit rs = P3^0;
sbit en = P3^2;
sbit rw = P3^1;
sbit wr = P3^6;
sbit rd = P3^7;
sbit intr = P3^3;
sbit led3 = P3^5;
sbit led4 = P3^4;

unsigned char data d;

void dely();
void bigdly();
void busy();
void display(unsigned char z);
void writecmd(unsigned char a);
void writedat(unsigned char b);
void writestr(unsigned char *s);

void int1(void) interrupt 2
  {
 led4=1;
 rd = 0;
 d=P1;
 rd=1;
 dely();
 led4=0;
 writecmd(0xC0);
 writestr("cur value:- ");
 display(d);
 bigdly();
 if(d==0x7F)
  {
   led3=1;
   dely(); 
   wr = 0;
   wr = 1; 
   led3=0; 
  }
 else if(d>0x7F)
  {
   int y;
   for(y=0;y<20;y++)
     {
      P0=0x01;
    dely();
    P0=0x02;
    dely();
    P0=0x04;
    dely();
    P0=0x08;
    dely();
      }     
   led3=1;
   dely(); 
   wr = 0;
   wr = 1; 
   led3=0;
    }
   else
     {
   int w;
   for(w=0;w<20;w++)
     {
      P0=0x01;
    dely();
    P0=0x08;
    dely();
    P0=0x04;
    dely();
    P0=0x02;
    dely();
      }   
   led3=1;
   dely(); 
   wr = 0;
   wr = 1; 
   led3=0;
  } 
 intr=1;
  }
void display(unsigned char z)
  {
   unsigned int tmp1,tmp2,t,t1,a;
 unsigned char asci[3];
 tmp1 = (z & 0x0F);
 tmp2 = z >> 4; 
 tmp2 = tmp2*16; 
 t = tmp1+tmp2;
  if(t>=100)
   {
  a=2;
  while(t>10)
  {  
   t1=t%10;
   asci[a]=t1+0x30;
   t=t/10;
   a--;
  }
  asci[0]=t+0x30;
   }
 else
   {
  t1=t%10;
  asci[2]=t1+0x30;
  t=t/10;
  asci[1]=t+0x30;
  asci[0]=0x30;
   }
 writedat(asci[0]);
 writedat(asci[1]);
 writedat(asci[2]);
  }
void dely()
  {
   int i,j;
 for(i=0;i<100;i++)
   for(j=0;j<250;j++);
   }
void bigdly()
  {
    int i,j;
 for(i=0;i<60;i++)
   for(j=0;j<10000;j++);
  }
void lcddly()
{
 int x;
 for(x=0;x<1500;x++);
 }
void writecmd(unsigned char a)
{
 lcddly();
 rs = 0;
 rw = 0;
 P2 = a; 
 en = 1; 
 en = 0;
}
void writedat(unsigned char b)
{
 lcddly();
 rs = 1;
 rw = 0;
 P2 = b;
 en = 1; 
    en = 0; 
}
void writestr(unsigned char *s)
{
 unsigned char l,i;
 l = strlen(s);
 for(i=1;i<l;i++)
 {
  writedat(*s);
  s++;  
 } 
}    
main()
{
 P1=0xFF;
 P2=0x00;
 P3=0xC8;
 P0=0x00; 
 IE=0x84;
 writecmd(0x3C);
 writecmd(0x0F);
 writecmd(0x01);
 writestr("set value:- ");
 display(0x7F); 
    led3=1;
 dely(); 
 wr = 0;
 wr = 1; 
 led3=0; 
 while(1);
 }

All the projects are designed and developed by sight owner and they are thoroughly tested by him. ©Copyrights Ashutosh Bhatt 2010. All rights reserved.