Monday 7 November 2016

NUMBER SYSTEMS

                           NUMBER SYSTEM :-

  •   Number system is  defined as the magnitude of any quantity.
  •  We have four Number system techniques.
  1. Binary Number system
  2. Octal Number system
  3. Decimal Number system 
  4. Hexa decimal Number system
  • Base / Radix is Nothing but the value. Generally it's represents the number of digits / Symbols are used in the number system.
  • Any number system starts  { 0} and ends with { r-1} .
  • "r "   represents base / radix of a number system.

BINARY NUMBER SYSTEM :-
  • Generally  the  base of  Binary number system is 2.
                          i.e   r=2
  • So In Binary number system we are used only two digits.  
                         i.e   { 0,  1 }

OCTAL NUMBER SYSTEM :-

  • Generally  the  base of  Octal number system is 8.
                          i.e   r=8
  • So In Binary number system we are used only eight  digits.  
                         i.e   { 0,  1, 2, 3, 4, 5, 6, 7  }


DECIMAL NUMBER SYSTEM :-

  • Generally  the  base of  Decimal number system is 10.
                          i.e   r=10
  • So In Binary number system we are used only ten digits.  
                         i.e   { 0,  1, 2, 3, 4, 5, 6, 7, 8, 9  }

HEXA DECIMAL NUMBER SYSTEM :-

  • Generally  the  base of  Hexa  Decimal number system is 16.
                          i.e   r=16
  • So In Binary number system we are used only sixteen  digits. After 9 we are used Alphabets {A, B, C, D, E, F / a, b, c, d, e, f } 
                         i.e   { 0,  1, 2, 3, 4, 5, 6, 7, 8, 9,  A, B, C, D, E, F }


            NUMBER SYSTEM CONVERSIONS

DECIMAL TO ANY OTHER NUMBER SYSTEM

       It having the algorithm for this one we can follow below steps
  1. Divide  the decimal number to be converted by the value of base / radix
  2. Get the remainder from step-1 and kept right side and quotient kept down of the decimal value
  3. Divide the quotient of the previous divided by new base 
  4. Repeat the step- 3 when the quotient is less than the new base number
  5. finally all the remainder come together form a number. It is a required number system of a number.

DECIMAL TO BINARY NUMBER SYSTEM : -



DECIMAL TO OCTAL NUMBER SYSTEM :-



DECIMAL TO HEXA DECIMAL NUMBER SYSTEM : -



Saturday 5 November 2016

EMBEDDED SYSTEMS

Embedded Systems : -

                                           Embedded Systems is Nothing but the Hardware

 components works  by using Software and it is used to a specific task only, not

 for multiple tasks. 


Applications : -


  • Automatic Home Applications
  • Industrial Applications
  • Medical Applications
  • Agriculture Applications
  • Rockets etc

Languages used to write the software on Hardware:- 

  • Mostly Embedded C
  • Embedded C++
  • Embedded Java
  • Embedded .Net
  • Python
  • Perl
  • Mat Lab 
Hardware  Required :-

  • Micro Controller Or Micro Processor 
  • ICs   (Integrated Circuits )
  • Encoders / Decoders 
  • Resisters , Capacitors 
  • Logic gates , Diodes 
  • ADC /DAC
  • Sensors 
  • Drivers


Characteristics Of  An Embedded Systems:-

  • Single Function Task
                An Embedded System is designed for a specific Task Only.  For a example Washing Machine always wash the cloths only.
  • Micro Processor Based 
              Embedded System is must be Micro processor Or Micro Controller Based only. Because Software Born into Micro processor or Micro Controller only.

  • Memory is Required for storing the software in the hardware . Mostly ROM Is store the Software.

Advantages:-


  • Low Power is Required 
  • Low Cost
  • Performance is High


Dis Advantages :-


  • Time is more required to market
  • High effort (Man Power )



  

Tuesday 25 October 2016

POINTERS IN C

USES OF POINTERS:-

  • Dynamic Memory Allocation ( D M A)
  •  A Function can return more than one value
  • Implementing data structures
  • call by reference is possible by pointer

ADDRESS OPERATOR:- ( &)

        In C  '&' is an address  operator. Which returns address of a variables.

Ex: -

              int  a ;

a  is integer type of variable. 

&a means address of a variable a.


/* Program for printing address of a variable */


                            #include<stdio.h>
                            void main( )
                            {

                             int a;
                             printf("enter a value\n ");
                             scanf("%d",&a);
                             printf("the variable  a have =%d", a);
                            printf("the address of a is =%p",&a);
                          
                           }

POINTER VARIABLE:-

                                    Pointer variables is also same as a normal variables. But the only difference is normal variables holds  the values or data. But the pointer variables holds the 
address of another same type of variable.

Syntax:-

          Datatype * pointer_variable_name;

Ex:-

             int *ptr;
            char *ch;
            float *f;

  • Asterisk " * "   is an indirection operation, which can read as " values at the address ". Its nothing but a dereferencing a value.
/* Program for dereferencing a value*/

                                     #include<stdio.h>
                                    void main( )
                                     {
                                           int a; 
                                           printf("enter a value\n");
                                          scanf("%d",&a);ekrnfkj
                                          printf("the value of a=%d",a);
                                           printf("the value of a=%p",&a);
                                         printf("the value of a=%d",*(&a));
                                   }

Assigning a variable address to a pointer variable:-

       Address of a variable is assigned to a pointer variable by using assignment operator.

Ex:-

        int a;
        int *ptr; 

       ptr=&a;


here,   the address of a variable a is assigned to a pointer variable ptr. 

i.e    ptr holds the address of a;



// Program for how to hold the address of a variable

#include<stdio.h> 
void main ( )  
 {
int a,*ptr;
ptr=&a;
printf("enter a variable\n");
scanf("%d",&a);
printf("value of a =%d\n",a);
printf("value of ptr =%p\n",p);
printf("address of a =%p\n",&a);
printf("ptr pointing tthe value =%d\n",*ptr);
}

Thursday 15 September 2016

ENGINEERS DAY




MOKSHAGUNDAM VISVESVARAYA  He was born on 15th september  1861. His birthday is

celebrated  as a ENGINEERS DAY as his memory . He was an  INDIAN CIVIL Engineer.  He was

the chief  engineer responsible for  the construction  of the krishna raja sagara dam in mysore. He

was  the president  of the 1923 session of the INDIAN CONGRESS SCIENCE. So finally what i am

saying that proud  to be an INDIAN.


Thursday 10 September 2015

INTERFACING LCD TO 8051

         LCD (LIQUID CRYSTAL DISPLAY)


  • This LCD Display the characters so we called as also CHARACTER LCD
  • If we give liquid. It is "1" for  BLACKNESS, "0" for WHITENESS   
                                              BLACK=1
                                              WHITE=0
  • We are using 16*2 LCD
  • By using this 16*2 LCD,  we can display 16 characters in 2 lines
  • For a single character we have to use  5*7 pixels

LCD  pins:


  • LCD having 16 PINS, Each having specific function.
  1.   Vss  --  GROUND
  2.   Vcc  --   POWER SUPPLY
  3.   Vee  --  CONTRAST (Intensity of blackness of pixel)
  4.   RS  --   Register Select
  5.  R/W -  Read or write
  6.  E   --   Enable
     7-14  D0-D7  --   Data bus
     15  +Vref   --   black light  +ve
     16   -Vref   --    black light -ve


D7 Bit  we call as BUSY FLAG


* lcd having  2 memory's

      1. Data memory (Display data RAM)

      2. Command memory ( Character Generator  RAM )
         
*  If   RS=0 , we selected as a  command memory

* If  RS=1, We  selected as a data memory.

* E = 1, Then  the character will fetch from  lcd memory to 8051 port.

* E =0, Then the fetching will stop.

* Internally  LCD having  30 positions  for each line  but it display only 16 positions.

* When  the     1st line of  30 position is completed  then  the next character display at 2nd line of 1st
 position.

* When  2nd line of 30 position  completed , Then the next character can display at  1st line of 1st  position

* Internally  in LCD  lines are circular.




LCD COMMANDS:


0X01       :      CLEAR DISPLAY

0X02       :       RETURN HOME

0X04       :       DECREMENTED  CURSOR (  SHIFT CURSOR TO LEFT) 

0X06       :       INCREMENTED CURSOR   (  SHIFT CURSOR TO RIGHT )

0X05       :        SHIFT DISPLAY RIGHT

0X07       :        SHIFT DISPLAY TO LEFT

0X08       :        DISPLAY OFF CURSOR OFF
0X0A      :        DISPLAY OFF CURSOR ON

0X0E       :        DISPLAY ON  CURSOR OFF

0X0F        :       DISPLAY   ON  CURSOR ON

0X28        :        4 BIT LCD

0X38        :         8 BIT LCD


Monday 7 September 2015

DELAY PROGRAM

DELAY GENERATION:

  • Delay can  generate i  two ways
  1. Software delay
  2. Hardware delay

software delay:

The delay can generate by using software.  The following program is example for software delay.


     void delay()

                       {

                    

                           int x,y;   

                           for(x=0;x<200;x++) 

                            for(y=0;y<600;y++);

                  }


hardware delay:

steps for hardware delay:


  • Select TIMER 0 or  TIMER 1 In Any one of Timer Mode  i.e user choice { timer mode 0, timer mode 1 ,  timer mode 2, timer mode 3}  
  • SET TMOD Register
  • Load Timers  { TH0 and TLO or  TH1 and TL1 }
  • Start Timer i.e   TR0 OR TR1 is SET
  • Wait for timer flag over flow i.e     while(TF0 or TF1==0);
  • Clear TF and TR BITS
  • Delay completed.

program for hardware delay:-

void delay() 

{

 TMOD=0X01;

TH0=0X4B; 

TL0=0XFD; 

TR0=1;

 while(TF0==0); 

TR0=0;

 TF0=0; 

}

*******************************************************************

For Example  LED program:



LED'S  ARE  ON AND OFF WITH 1 SECOND DELAY.



#include<at89x51.h>  //  It is header file for 8051

void delay()     // delay function called by main

{

TMOD=0X01;

TH0=0X4B; 

TL0=0XFD; 

TR0=1;

 while(TF0==0); 

TR0=0;


 TF0=0; 


}

void main()

{

while(1)

{

P0=0XFF;   // led's are connected to P0 so LED'S  ON

 delay();  // delay for 1 sec

 P0=0X00;   // LED'S  are OFF

delay();     // Delay for 1 sec

}

}




Saturday 5 September 2015

IBM MAIN FRAMES


                                     MAINFRAMES



INTRODUCTION:-
  • Mainframe was designed by IBM in early 1950's.
  • Mainframe is a server/ a large computer
  • It was designed mainly to meet the business requirements. Almost 70% of the business applications are currently running on mainframe platform.
FEATURES:-

  • Speed is high  for processing nearly 80 MIBS
  • Low maintenance
  • It can store large amount of data
APPLICATIONS:-
  • Airlines
  • banking
  • railways
  • telecom
  • stock market
SKILLS REQUIRED TO LEARN MAIN FRAMES:

  • COBOL
  • JCL
  • VSAM
  • DB2
  • CICS

COBOL:-

HISTORY:-

  •   COBOL (Common Business Oriented Language) was developed in the  year  1959.But at the time there was no compiler available.
  • COBOL  was developed by the team CONFERENCE ON DATA SYSTEM LANGUAGE (CODASYL)
  • So the CODASYL team has met  ANSI  to develop COBOL  compiler. Then COBOL has a compiler in the year 1968.
  • ANSI was released 1st version VS-COBOL-I  in the year 1974
  • the second version was released in 1985

FEATURES:-

  • It lools like a english language/HLL
  • Store the large amount of data
  • It is an independent  (it can in any other OS)
  • It is a case insensitive
  • It is a structured language