#include <hidef.h>
#include "derivative.h"
void Tiempo1(void);
char vector1[]={0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,
0x80,
0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,
0x80, //efecto 1
0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,
0x80,
0x81,0x82,0x84,0x88,0x90,0xA0,0xC0,
0xC1,0xC2,0xC4,0xC8,0xD0,0xE0,0xE1,0xE2,
0xE4,0xE8,0xF0,0xF1,0xF2,0xF4,0xF8,0xF9,
0xFA,0xFC,0xFD,0xFE,0xFF,
0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x02,
0x01,
0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x02,
0x01,
0x00,0x80,0x40,0x20,0x10,0x08,0x04,0x02, //efecto 2
0x01,
0x81,0x41,0x21,0x11,0x09,0x05,0x03,
0x83,0x43,0x23,0x13,0x0B,0x07,0x87,0x47,
0x27,0x17,0x0F,0x8F,0x4F,0x2F,0x1F,0x9F,
0x5F,0x3F,0xBF,0x7F,0xFF,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00, //efecto 3
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00, //efecto 4
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0xC3,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,
0x80,0xC0,0x60,0x30,0x18,0x0C,0x03,0x00,
0x00,0x03,0x0C,0x18,0x30,0x60,0xC0,0x80,
0x80,0xC0,0x60,0x30,0x18,0x0C,0x03,0x00, //efecto 5
0x00,0x03,0x0C,0x18,0x30,0x60,0xC0,0x80,
0x00,0x03,0x0C,0x18,0x30,0x60,0xC0,0x80,
//efecto 6
0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
0x81,0x81,
};
void main(void) {
SOPT1 = 0x02; // anula el watch dog
PTBDD =0xFF;
EnableInterrupts;
for(;;) {
char j;
for(j=0;j<=279;j++){
PTBD= vector1[j];
Tiempo1();
}
}
}
//==============================
void Tiempo1(void){
int i;
for(i=0; i<10000; i++);
}