How to put 8 LEDs on port B of PIC16F877A and turn them on with mikroC code?

Status
Not open for further replies.

os12

Newbie level 2
Joined
Jun 26, 2007
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,292
hi,
please can anay one tell me how to put 8 leds on port B and to make them turned on one by one using mikroc ,, i am using pic16f877a,and any one knows any books for explaining mikroc language
thanks
 

mikroc code

hi,

from this site u can download the documents describing about mikroc

**broken link removed**
 

    os12

    Points: 2
    Helpful Answer Positive Rating
Re: help on mikroc code

os12 said:
hi,
please can anay one tell me how to put 8 leds on port B and to make them turned on one by one using mikroc ,, i am using pic16f877a,and any one knows any books for explaining mikroc language
thanks

It goes back and forth.....Knight Rider style...

unsigned int i=1;

void main() {
PORTB = 0;
TRISB = 0;

while(1){
for(i=1;i<=128;i=i*2){
PORTB=i;
delay_ms(100);
}
for(i=128;i>1;i=i/2){
PORTB=i;
delay_ms(100);
}
}
}
 
Reactions: uomsama

    os12

    Points: 2
    Helpful Answer Positive Rating

    uomsama

    Points: 2
    Helpful Answer Positive Rating
Re: help on mikroc code

thanx alot (dilraj.n),
i downloaded the pdf , thanxx[/quote]

Added after 48 minutes:

thanxx for the code



 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…