0% found this document useful (0 votes)
21 views1 page

Int X (10) (63,6,91,79,102,109,125,7,127,111) Int CN 0 Void Main (Trisb 0 Portb 63 Trisc 0 Portc 63

This C program defines an integer array with 10 elements and initializes it with values. It then uses a while loop that continuously sets the values of port B and port C to the current element in the array, waits 250 milliseconds, increments the counter, and resets the counter to 0 once it exceeds the array size to continuously cycle through displaying the array values on the ports.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Int X (10) (63,6,91,79,102,109,125,7,127,111) Int CN 0 Void Main (Trisb 0 Portb 63 Trisc 0 Portc 63

This C program defines an integer array with 10 elements and initializes it with values. It then uses a while loop that continuously sets the values of port B and port C to the current element in the array, waits 250 milliseconds, increments the counter, and resets the counter to 0 once it exceeds the array size to continuously cycle through displaying the array values on the ports.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

int x[10] = {63,6,91,79,102,109,125,7,127,111};

int cn=0;
void main() {
trisb =0;
portb=63;
trisc =0;
portc =63;

while(1)
{
portb = x[cn];
portc = x[cn];
delay_ms(250);

cn++ ;

if(cn>9)
{
cn=0;
}
}
}

You might also like