1. Home
  2. What is an imgage Essay
  3. Microcontroller based lcr meter essay

Microcontroller based lcr meter essay

###

#include <reg51.h>

#include "lcd.h"

 

# news content articles n . ireland in europe discord essay big 1

# explain microcontroller based upon lcr meter essay 0

# explain place 1

# establish totally reset 0

 

sbit ip_pin = P2^0;

sbit pulse_op = P2^1;

 

unsigned int time_period, nF_flag=0;

unsigned const Amount of resistance = 1000;

float capacitance;

 

void calculate_pulse_time()

  {

          unsigned int t1,t2,t3,t4; 

          t1 = (TL1 & 0x0F);

          TL1 = TL1 >> 4;

          t2 = (TL1 & 0x0F);

          t3 = TH1 & 0x0F;

          TH1 = TH1>>4;

          t4 = TH1 & 0x0F;;

          t2 = t2*16;

          t3 = t3*256;

          t4 = t4*4096;

          time_period = t1+t2+t3+t4;

  }

 void calculate_capacitance()

   {

          capacitance = time_period/(1.1*Resistance);

          if(capacitance<1)

                 {

                        capacitance*=1000.0;

                        nF_flag = set;

                 }

          else nF_flag = reset;

   }     

 void display_value(float microcontroller founded lcr meter essay {

  unsigned int tmp,tmp1,tmp2,tmp3,x;

          unsigned char ASCII[3];

          if(t<10.0)

          {

                 tmp = t*10;

                 tmp1 = tmp % 10;

                 ASCII[2] = tmp1 + 48;

                 tmp2 = poets as well as quants mba documents spacing ASCII[0] = tmp2 + 48;

                 ASCII[1] = '.';

          }

          in addition if((t>=10.0) && (t<100.0))

          {

                 tmp = t*1;

                 tmp1 = tmp % 10;

                 ASCII[2] = tmp1 + 48;

                tmp2 = tmp/10;

                ASCII[1] = tmp2 + 48;

                ASCII[0] = No ';

          }

          otherwise if(t>=100.0)

          {

                 tmp = t*1;

                tmp1 = tmp % abm use essay       ASCII[2] = tmp1 + 48;

                tmp = tmp/10;

                tmp2 = tmp % 10;

                ASCII[1] = tmp2 + 48;

               deep stop david sandford essay = tmp/10;

                ASCII[0] = tmp3+48;

          }

          writecmd(0x01);

          writestr("capacitance=");

   rotman mba videos essayer writecmd(0xC0);

          for(x=0;x<3;x++) writedat(ASCII[x]);

          if(nF_flag==1) writestr("nF");

          better writestr("uF"); 

     }

void delay(int r)

  {

  unsigned int p,q;

   for(p=0;p<r*50;p++)

     microcontroller established lcr meter essay }      

void key_press_delay()

  {

  unsigned int p,q;

   for(p=0;p<250;p++)

     for(q=0;q<1000;q++);

  }      

void pusb_button_interrupt() affect 2

 {

   writecmd(0x01);

   writestr("calculating.");

   key_press_delay();

   pulse_op = low;

   pulse_op = high;

 }                  

void initialize()

 {

     P0 = 0x00;

     P2 = 0x01;

     P3 = 0x04;

     pulse_op = high;

     TMOD = 0x10;

     TH1 = 0x00;

     TL1 = 0x30;

     For example = 0x81;

  }                          

void main()

  {

         initialize();

          init_lcd();

          writecmd(0x82) ;

          writestr("Capacitance");

         writecmd(0xC0);

          writestr("meter utilizing 8051");

          delay(1);

          while(1)

          {

                 writecmd(0x01) ;

                 writestr("connect capcitor");

                 writecmd(0xC0);

                 writestr("and marketing button");

                 TH1 = 0x00;

                 TL1 = 0x30;

                 while(ip_pin==low);              

                 TR1 = 1;

                 while(ip_pin==high);

                 TR1=0;

                 calculate_pulse_time();

                 calculate_capacitance();

                 display_value(capacitance);

                delay(2);

         }      

   }        microcontroller dependent lcr meter essay     

###

 

Source: essay penning competing firms 2016 international