blob: 1e73b909bad27715d094c118578eb60c713dc3ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
//exmaple 13.1//
clc
//clears the screen//
clear
//clears all existing variables//
a=31;
//rising edge//
b=241;
//falling edge//
c=8;
//in MHz//
t=1/c;
pw=(b-a)*t;
//pulse width//
disp(pw,'pulse width measured by microcontroller(in microsec) is :')
|