Tuesday 22 February 2011

8086/8088 MICROPROCESSOR INT 21h FUNCTIONS


INT 21h - The general function despatcher
Most of the general functions and services offered by DOS are implemented through this interrupt . The functions available are well standardised and should be common to all MSDOS, PCDOS and DOS Plus systems. Well behaved programs, therefore, should use these facilities in preference to any other methods available for the widest range of compatibility.
INT 21h in the 512's implementation of DOS Plus 2.1 provides 77 official functions, two of which are non-functional and return with no action. Within this range some calls have subfunctions which further extend the range of operations.
In all calls, on entry AH defines the function. Other parameters may also be required in other registers. Where a memory block is used by the call this is specified in the normal segment:offset form. In all cases the general programming technique is to set AH to the function pointer, set up the required register contents (and the memory block if necessary) then to issue the call by the assembly code INT instruction. 

MATHWORKS MATLAB COMMANDS

Non-standard Matlab commands are highlighted in green.
Command
Description
abs
Absolute value
acker
Compute the K matrix to place the poles of A-BK, see also place
axis
Set the scale of the current plot, see also plot, figure
bode
Draw the Bode plot, see also logspace, margin, nyquist1
c2dm
Continuous system to discrete system
clf
Clear figure (use clg in Matlab 3.5)
conv
Convolution (useful for multiplying polynomials), see also deconv
ctrb
The controllability matrix, see also obsv
deconv
Deconvolution and polynomial division, see also conv
det
Find the determinant of a matrix
dimpulse
Impulse response of discrete-time linear systems, see also dstep
dlqr
Linear-quadratic requlator design for discrete-time systems, see also lqr
dlsim
Simulation of discrete-time linear systems, see also lsim
dstep
Step response of discrete-time linear systems, see also stairs
eig
Compute the eigenvalues of a matrix
eps
Matlab's numerical tolerance
feedback
Feedback connection of two systems.
figure
Create a new figure or redefine the current figure, see also subplot, axis
for
For, next loop
format
Number format (significant digits, exponents)
function
Creates function m-files
grid
Draw the grid lines on the current plot
gtext
Add a piece of text to the current plot, see also text
help
HELP!
hold
Hold the current graph, see also figure
if
Conditionally execute statements
imag
Returns the imaginary part of a complex number, see also real
impulse
Impulse response of continuous-time linear systems, see also step, lsim, dlsim
input
Prompt for user input
inv
Find the inverse of a matrix
Generate grid lines of constant damping ratio (zeta) and settling time (sigma), see also sgrid, sigrid, zgrid
legend
Graph legend
length
Length of a vector, see also size
linspace
Returns a linearly spaced vector
Produce a Nyquist plot on a logarithmic scale, see also nyquist1
log
natural logarithm, also log10: common logarithm
loglog
Plot using log-log scale, also semilogx/semilogy
logspace
Returns a logarithmically spaced vector
lqr
Linear quadratic regulator design for continuous systems, see also dlqr
Simulate a linear system, see also step, impulse, dlsim.
margin
Returns the gain margin, phase margin, and crossover frequencies, see also bode
norm
Norm of a vector
Draw the Nyquist plot, see also lnyquist1. Note this command was written to replace the Matlab standard command nyquist to get more accurate Nyquist plots.
obsv
The observability matrix, see also ctrb
ones
Returns a vector or matrix of ones, see also zeros
place
Compute the K matrix to place the poles of A-BK, see also acker
Draw a plot, see also figure, axis, subplot.
poly
Returns the characteristic polynomial
Add two different polynomials
polyval
Polynomial evaluation
print
Print the current plot (to a printer or postscript file)
pzmap
Pole-zero map of linear systems
rank
Find the number of linearly independent rows or columns of a matrix
real
Returns the real part of a complex number, see also imag
rlocfind
Find the value of k and the poles at the selected point
rlocus
Draw the root locus
roots
Find the roots of a polynomial
Find the scale factor for a full-state feedback system
set
Set(gca,'Xtick',xticks,'Ytick',yticks) to control the number and spacing of tick marks on the axes
series
Series interconnection of Linear time-independent systems
sgrid
Generate grid lines of constant damping ratio (zeta) and natural frequency (Wn), see also jgrid, sigrid, zgrid
Generate grid lines of constant settling time (sigma), see also jgrid, sgrid, zgrid
size
Gives the dimension of a vector or matrix, see also length
sqrt
Square root
ss
Create state-space models or convert LTI model to state space, see also tf
ss2tf
State-space to transfer function representation, see also tf2ss
ss2zp
State-space to pole-zero representation, see also zp2ss
stairs
Stairstep plot for discreste response, see also dstep
Plot the step response, see also impulse, lsim, dlsim.
subplot
Divide the plot window up into pieces, see also plot, figure
text
Add a piece of text to the current plot, see also title, xlabel, ylabel, gtext
tf
Creation of transfer functions or conversion to transfer function, see also ss
tf2ss
Transfer function to state-space representation, see also ss2tf
tf2zp
Transfer function to Pole-zero representation, see also zp2tf
title
Add a title to the current plot
Returns the bandwidth frequency given the damping ratio and the rise or settling time.
xlabel/ylabel
Add a label to the horizontal/vertical axis of the current plot, see also title, text, gtext
zeros
Returns a vector or matrix of zeros
zgrid
Generates grid lines of constant damping ratio (zeta) and natural frequency (Wn), see also sgrid, jgrid, sigrid
zp2ss
Pole-zero to state-space representation, see also ss2zp
zp2tf
Pole-zero to transfer function representation, see also tf2zp

MATHWORKS MATLAB PRACTICE PROBLEMS


Assignment:
1)
Create an M-file in which you give an input and it displays the table of that number:
Example:
>> “name of m-file”
>> What is your desired number? “Enter 2 or any other”
>> 2x1=2
      2x2=4 and so on…

MATHWORkS MATLAB TUTORIAL AND EXERCISE


MATHWORKS MATLAB: 

Exercise #1: Non-oriented, Center-Surround Receptive Field Model.

Goal: To implement and test a simple RF model in Matlab.

1. MATHWORKS MATLAB Basics

When you start Matlab, it should open with a Command Window.  This window allows you to enter individual commands at the prompt (>>).  Commands can define variables.  For example:

>> x = zeros(100);

creates a 2D array (100x100) and fills it with zeros.  Variables are initialized whenever they appear on the left hand side of an expression.  You do not need to specify the storage type or size, as in other languages.  Variables must be initialized before they are used on the right hand side of an expression.  When variables are initialized they get stored in the Workspace.  You can view the variables in the Workspace by typing:

>> who

You can see the contents of a single variable by typing the variable name at the prompt without a semicolon at the end:

>> x

Commands can also call Matlab functions, e.g.

>> plot(x);

To find out more about the function “plot”, type:

>> help plot
           
If you want to create a program of more than a few lines, it soon becomes very tedious to enter and re-enter commands one at a time.  Therefore, Matlab allows you to create M-files.  M-files are plain text files that contain Matlab expressions and function calls.  M-file names end with the extension “.m”.  Usually, the Command Window has a button that will invoke an M-file editor.  You can type multiple commands into the editor window and save them.  Usually, there will be a button in the editor window that allows you to save and execute the file in one shot.  Otherwise, you  can execute the M-file by typing its name, sans extension, at the command prompt.  E.g. if you created the file “myprog.m”, you would just type:

>> myprog

LABCENTRE ELECTRONICS ISIS PROTEUS TUTORIAL


In this tutorial I am going to tell you about the basics of LABCENTRE ELECTRONICS ISIS PROTEUS .this software is widely used by all the electrical  engineers as it provides a mean for testing their circuits before implementing them practically.
So, first of all let have a look at the opening window of the LABCENTRE ELECTRONICS ISIS PROTEUS.
I am using the LABCENTRE ELECTRONICS ISIS PROTEUS 7.6 .
This is the window which we see when we open the LABCENTRE ELECTRONICS ISIS PROTEUS 7.6.





Lets first become familiar with different icons in it.
  VIRTUAL INSTRUMENT MODE:
 This icon is for measuring the different parameters of the circuit like voltage, current output waveforms etc and. It provides us with AC voltmeter and ammeter and DC voltmeter and ammeter and it has also got the option of the oscilloscope for seeing the different waveforms and a logic analyzer for observing the logic states. It has also got the option of signal generator for providing waveforms of different shapes, different frequencies and different amplitudes.