Professional Documents
Culture Documents
Constante 15
Constante 15
// CONFIG2
#pragma config BOR4V = BOR40V // Brown-out Reset Selection bit (Brown-out Reset
set to 4.0V)
#pragma config WRT = OFF // Flash Program Memory Self Write Enable bits
(Write protection off)
#include <xc.h>
#define _XTAL_FREQ 10000000
#define in1 RD0
#define in2 RD1
#define time 100
char secuen [15]=
{ 0b10010000000,0b01000000,0b00100000,0b00010000,0b00001000,0b00000100,0b00000010,0
b00000001,0b00000010,0b00000100,0b00001000,
0b00010000,0b00100000,0b01000000,0b10000000 };
void main(void)
{
ANSEL = 0;
ANSELH = 0;
TRISD = 0;
while(1)
{
for(char point = 0; point < 15;point ++)
{
PORTD = secuen [point];
__delay_ms(time);
}
}
}