//
// 0 1 1 1 0 0
// 0 1 0 0 1 1
// 0 0 0 1 1 1
// 1 1 0 1 0 0
// 1 0 0 0 0 1
// 0 0 1 1 0 1
// (reverse order from above:)
static const short seq[] =
{
0b001110,
0b110010,
0b111000,
0b001011,
0b100001,
0b101100
};
void main()
{
short b;
Delay_ms(1000);
TRISA = 0b11111111; // RA0-RA7 - inputs
PORTB = 0b00000000; // Set all outputs to 0
//TRISB = 0xc0; // Make all RB0-RB5 into outputs, RB6-RB7 to inputs
TRISB = 0b11000000; // Make all RB0-RB5 into outputs, RB6-RB7 to inputs
Delay_ms(100); // Give chip time to cool off
while(1)
{
for (b=0; b<6; b++) {
PORTB = seq[b];
Delay_ms(9); //
}
}
}