futz
Active Member
That's what I get for posting before coffee.How would you connect a single push button switch to disconnect GP0/ICSPDAT and GP1/ICSPCLK from the LED circuitry when you push it and hold it down?
Here's a simple little pwm animation thing for your blinky device:
Code:
led[0] = led[19] = 31;
led[1] = led[18] = 23;
led[2] = led[17] = 18;
led[3] = led[16] = 14;
led[4] = led[15] = 11;
led[5] = led[14] = 9;
led[6] = led[13] = 7;
led[7] = led[12] = 5;
led[8] = led[11] = 3;
led[9] = led[10] = 2;
while(1){
temp=led[0];
for(x=0;x<19;x++){
led[x]=led[x+1];
delay_ms(3);
}
led[19]=temp;
delay_ms(3);
}
}