Thursday, 16 June 2011

About the site

This site specially design for the student of EEE department. They can get solution of their problem or any kind of help related to their study. Gradually i will upload my lab reports, Assignments, Project Report, Thesis Paper, Conference Paper which i have done during my graduation program.Anyone can take help from these. It is fully free for everyone. But i request you that DON"T DIRECTLY COPY FROM THE SITE.I just upload all these documents for your help.

The documents of following topics are available in the site:
1) MICROCONTOLLER
2) DIGITAL ELECTRONICS
3) MATLAB CODES
4) Others
Currently we also have a dedicated page on RENEWABLE ENERGY

we r lookin for ur valuable suggestions and comments. 

Wednesday, 15 June 2011

Digital Electronics


Job: 1
A staircase light is controlled but two switches, one at the top of the stairs  and 
another at the bottom of the stairs.

a)                  Make a truth table of the system.
b)                  Write the logic equation in sop form.
c)                  Realize the circuit using AND, OR and NOT gates.




Implementation:
           
a) Truth table of the system:
                                   

           A       B       F
0        
0
0
0
1
1
1
0
1
1
1
0
                                                           
                                                           







b) The logic equation of the given system in SOP form.
                   
                          F= A’B + AB’

c) The circuit of the system by using AND, OR and NOT gates.

Tuesday, 14 June 2011

Matlab Codes:

A simple code for introducing with MATLAB (Matrix Laboratory) software.


 Experiment No: 1
Name of Experiment: Introduction to MATLAB

Objective:  
1)      Introduction to MATLAB.
2)      Know about what is MATLAB
3)      Study basic operation of MATLAB.

Answer to the Question no 1:

MFILE:
for z=1:2:15
y=(z^3+5*z)/(4*(z^2)-10)
end

Output:
y =
     -1
y =
      1.6154
y =
      1.6667
y =
      2.0323
y =
      2.4650
y =
      2.9241
y =
      3.3964
y =
      3.8764

Answer to the Question no 2:

MFILE:
a=[4 -2 6 ;2 8 2 ;6 10 3 ]
b=[8;4;0]
x=inv(a)*b

Output:
a =
     4    -2     6
     2     8     2
     6    10     3

b =
     8
     4
     0
x =
   -1.8049
    0.2927
    2.6341

Answer to the Question no 3.a:

MFILE:
u=[4 9 -5];
v=[-3;6;-7];
y=u*v

Output:
y =
     77

Answer to the Question no 3.b:

MFILE:
u=[4 9 -5];
v=[-3 6 -7];
x=u.*v

Output:
x =
      -12    54    35

Answer to the Question no 3.c:

MFILE:
u=[4 9 -5];
v=[-3 6 -7];
dot(u,v)

Output:
ans =
      77

Answer to the Question no 4:

MFILE:
c=[2 4 6 8 10;
   3 6 9 12 15;
   7 14 21 28 35]

Output:
c =
     2     4     6     8    10
     3     6     9    12    15
     7    14    21    28    35

Answer to the Question no 4.a:

MFILE:
c=[2 4 6 8 10;
   3 6 9 12 15;
   7 14 21 28 35];
b=c(:,3)

Output:
b =
     6
     9
    21

Answer to the Question no 4.b:

MFILE:
c=[2 4 6 8 10;
   3 6 9 12 15;
   7 14 21 28 35];
b=c(2,:)

Output:
b =
3     6     9    12    15

Answer to the Question no 5:

MFILE:
x=[1 2 2];
roots(x)

Output:
ans =

  -1.0000 + 1.0000i
  -1.0000 - 1.0000i






Discussion:
From this experiment we understand that MATLAB is powerful tool for the engineering as well as for the science and applied mathematics. MATLAB stands for Matrix Laboratory. We learn some basic operation of MATLAB like how to use MATLAB as a calculator, how to define variables, complex number computation and matrix & vector computation  

Monday, 13 June 2011

Microprocessor Lab Report


                                                   Experiment 1
                                                 LAB REPORT


Objective:
In this experiment , we learn how to use the software 8085 simulator IDE to write firmware for 8085 microprocessor . we use some basic instructions for example: mvi, add , jmp , lxi , stax , hlt  , to write the firmware .


Problem:
                1) Write a program for X+Y=Z where X,Y,Z are variable stored in memory
                2) Explain the program in detail.
                3) Describe the effect in the flag register for the instructions used

Solution:

1) & 2)

 lxi h,9000h              ;value of register pair HL which is a memory address
 mov a,m                  ;load value in A from the memory location addressed by HL
 lxi h,9001h              ;value of register pair HL which is a memory address
 mov b,m                  ;load value in B from the memory location addressed by HL
 add b                       ;A=A+B
 sta 9002h                 ;store value of a in the memory location 9002h
 hlt

3)

No.    PC    Instruction     A  SZ_A_P_C  B  C  D  E  H  L  SP 

1      0000  LXI H,9000H     FF 11111111  FF FF FF FF 90 00 FFFF
2      0003  MOV A,M         AE 11111111  FF FF FF FF 90 00 FFFF
3      0004  LXI H,9001H     AE 11111111  FF FF FF FF 90 01 FFFF
4      0007  MOV B,M         AE 11111111  FF FF FF FF 90 01 FFFF
5      0008  ADD B           AD 10111011  FF FF FF FF 90 01 FFFF
6      0009  STA 9002H       AD 10111011  FF FF FF FF 90 01 FFFF
7      000C  HLT             AD 10111011  FF FF FF FF 90 01 FFFF

162.0 seconds elapsed.
Real-time duration of the simulation is 56 clock cycles or 14.00 µs at 4 MHz.



Discussion:
In the given problem , we load two variables in  two registers  from the memory and add those variables and  finally store the result  in  memory .




             LAB REPORT_2

Experiment Name: 8085 code conversion, sub-routine and stack pointer

Objective:  Learn about sub-routine, the purpose of stack pointer & the use of delay  sub-routine is the main
objective of experiment 2.

Problem:  Write a delay sub-routine for 100ms unit .

Solution;

delay:  lxi sp,0ffffh                         ;initialized stack pointer
            mvi c,88                             ; load 88 in register c
l1         call delay1                          ;call sub-routine delay1
            dcr c                                    ;decrease the value of register c
            jnz l1                                   ;jump to level1 if zero flag is not high
            hlt                                        ;end
delay1:                                            ;sub-routine delay1
            mvi a,255                            ;load 255 in register a
l2         mov b,a                               ;move the value of a in b
            dcr a                                    ;decrease the value of a
            jnz l2                                   ;jump to  level2 if zero flag is not high
            ret                                        ;return to the main delay sub-routine

LOG FILE:
Simulation started at 7/4/2009 12:53:41 AM.
No.    PC    Instruction     A  SZ_A_P_C  B  C  D  E  H  L  SP 

1      0000  LXI SP,0FFFFH   FF 11111111  FF FF FF FF FF FF FFFF
2      0003  MVI C,58H       FF 11111111  FF 58 FF FF FF FF FFFF
3      0005  CALL 000DH      FF 11111111  FF 58 FF FF FF FF FFFD
4      000D  MVI A,0FFH      FF 11111111  FF 58 FF FF FF FF FFFD
5      000F  MOV B,A         FF 11111111  FF 58 FF FF FF FF FFFD
6      0010  DCR A           FE 10101011  FF 58 FF FF FF FF FFFD
7      0011  JNZ 000FH       FE 10101011  FF 58 FF FF FF FF FFFD
8      000F  MOV B,A         FE 10101011  FE 58 FF FF FF FF FFFD
9      0010  DCR A           FD 10101011  FE 58 FF FF FF FF FFFD
.
.
 7754  000F  MOV B,A         02 00101011  02 01 FF FF FF FF FFFD
67755  0010  DCR A           01 00101011  02 01 FF FF FF FF FFFD
67756  0011  JNZ 000FH       01 00101011  02 01 FF FF FF FF FFFD
67757  000F  MOV B,A         01 00101011  01 01 FF FF FF FF FFFD
67758  0010  DCR A           00 01101111  01 01 FF FF FF FF FFFD
67759  0011  JNZ 000FH       00 01101111  01 01 FF FF FF FF FFFD
67760  0014  RET             00 01101111  01 01 FF FF FF FF FFFF
67761  0008  DCR C           00 01101111  01 00 FF FF FF FF FFFF
67762  0009  JNZ 0005H       00 01101111  01 00 FF FF FF FF FFFF
67763  000C  HLT             00 01101111  01 00 FF FF FF FF FFFF
Simulation stopped at 7/4/2009 12:53:57 AM.
16.21 seconds elapsed.
Real-time duration of the simulation is 407987 clock cycles or 101996.75 µs at 4 MHz.

The purpose of stack pointer:
If we use ‘call’ instruction in our program than we must use stack pointer also. Stack pointer is an address where
the return address is written .  Program counter get the return address from the stack pointer where it should
return from the sub- routine.

Discussion: we mainly learn about the purpose of sub-routine & stack pointer in a program. We observe stack
pointer is mandatory if we use ‘call’ instruction in the program.



Experiment #3 
Problem: Write a program to show first alphabet of your name in the dot matrix which is connect to the port of 89C51 microcontroller.

Program:
ljmp 30h                              ; long jump to 30h
org 30h
            mov 30h,#62h         ;load 62h in  address 30h
            mov 31h,#82h
            mov 32h,#82h
            mov 33h,#7fh
            mov 34h,#02h
            mov 35h,#02h
            ljmp 200h
org 200h
main : mov r2,#6                ;load 6 in register2
            mov b,#02h
            mov r0,#0
level2:  mov a,#30h
            add a,r0                   ; add value of acc & register0
            mov r1,a
            mov a,@r1              ; move value from address written in r1
            mov p0,a                 ; send the value of acc in port 0
            call select                ; call select sub
            call delay                ; call delay sub
            inc  r0                     ;increase the value of register 0
            djnz r2 ,level2        ; decrease value of r2 & jump to level2 if not zero
            call delay
            sjmp main              ;short jump to level1


; select sub to select the column of dot matrix
select: mov p1,b                ;send the value of b in port 1
            mov a,b
            rl a                         ; rotate left the value of accumulator
            mov b,a
            ret                          ; return to the main function
;delay sub for 4ms/400us delay
delay:  mov r4,#2            
l1:        mov r3,#133
l2:        djnz r3,l2
            djnz r4,l1
            ret
            end                       ; end of the program