free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
cezar
Mon Jul 21 2008, 03:38PM
 User Offline
Registered Member #9132
Joined: Fri Jul 18 2008, 11:44PM

Posts: 2
Thanked 0 times in 0 posts
#include<pic.h>

int B,C,D;
int decode[10]={0,1,2,3,4,5,6,7,8,9};

main()
{
TRISA=0xFF;
TRISE=0x0F;
TRISB=0x00;
TRISC=0x00;
TRISD=0x00;
while(1)
{
if (RA0==1||RE0==1){B=10;PORTB=decode[b];PORTC=decode[C];PORTD=decode[D];}
if (RA1==1||RE1==1){B=1;PORTB=decode[b];PORTC=decode[C];PORTD=decode[D];}
if (RA2==1||RE2==1){C=2;PORTB=decode[b];PORTC=decode[C];PORTD=decode[D];}
if (RA3==1){C=3;PORTB=decode[b];PORTC=decode[C];PORTD=decode[D];}
if (RA4==1){D=4;PORTB=decode[b];PORTC=decode[C];PORTD=decode[D];}
if (RA5==1){D=5;PORTB=decode[b];PORTC=decode[C];PORTD=decode[D];}
}


}


Back to top


Ajay
Tue Jul 22 2008, 08:24AM
Rickey's World Admin

 User Offline

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 3686
Thanked 685 times in 647 posts
is it the complete program?

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems