I Don't know What I'm doing Wrong
I Have a 4M, 8M, 12M, and 20M Crystals
Tried with those crystals and Nothing.
What am I Missing?
#include <18F4550.h> //Incluye Libreria del PIC
#FUSES NOWDT,NOPUT,NOPROTECT,BROWNOUT,NOMCLR,NOLVP,NODEBUG //Incluimos los fusibles
#use delay(clock=8000000) //Cristal
#byte PORTA=0x92 //Declara Direcciones de Puertos
#byte PORTB=0x93
#byte PORTC=0x94
#byte PORTD=0x95
#Byte PORTE=0x96
int16 time=1000; //Declaramos Variable tiempo como 500 Integer 16bits
void main()// Inicio del programa
{
Set_Tris_D(0b00000000); //Declara las Salidas y entradas
PORTD=0; //Limpia puerto
while(1) //Bucle infinito
{
PORTD=255; //declaramos que el RD0 esta encendido
delay_ms(time);//Retardo a la intruccion
PORTD=0;
delay_ms(time);
}
}