Professional Documents
Culture Documents
Title: C: Programming For 8051 Family
Title: C: Programming For 8051 Family
Title: C: Programming For 8051 Family
Output:
Output:
Output:
Output:
Output:
G O O
SPACE
SPACE
and smallest no. in port 3 and if both no. are equal then store at port 1.
#include<reg51.h> void main() { unsigned char a,b; a=P2; b=P3; if(a>b) { P2=a; P3=b; } else { if(a<b) { P2=b; P3=a; } P1=P2; } }
OUTPUT :
If p2<p3
If p2=p3
CONCLUSION :