title: unable to display numbers counting from 0 to 9 in 7 segment display with mikroc
body: <p>I am very new to micro-controller programing with MIKROC . I am trying to display numbers counting from 0 to 9 in a 7 segment display with mikroc . I have used infinite while loop . Inside the while loop I used function " delay_ms(500) " with  other codes . But instead  of showing numbers from 0 to 9 it shows first few numbers  like 0,1,2 . </p>
  
  <p>My code is below</p>
  
  <pre><code>void main()
  {
  
   trisb=0;
   portb=0;
  
   while(1){
   delay_ms(500);
    portb=0x3F;
    delay_ms(500);
  
    portb= 0x06;
    delay_ms(500);
    portb= 0x5B;
    delay_ms(500);
    portb=0x4F;
    delay_ms(500);
    portb=0x66;
    delay_ms(500);
    portb=0x6D;
    delay_ms(500);
    portb=0x7D;
    delay_ms(500);
    portb=0x07;
    delay_ms(500);
    portb=0x7F;
    delay_ms(500);
    portb=0x6F;
    delay_ms(500);
  
  
  
   }
  }
  </code></pre>
  
  <p>My circuit diagram </p>
  
  <p><img src="https://i.stack.imgur.com/j0urD.png" alt="enter image description here"></p>