Friday, June 7, 2013

Microrocontroller & Seven Segments- Counter 0 to 9 - Method2

In this tutorial, we will exceed our knowledge of how to interface microcontroller with seven segment through BCD to Seven Segment decoder



Code:

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

       while(1)
       {
              Delay_ms(500) ;
              if(PORTB == 9) PORTB = 0 ;
              else PORTB ++ ;


       }
}

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...