Que tal, agradecería bastante que alguien me ayudara con el siguiente problema:
He realizado un programa con el compilador CCS, el programa lo he probado con el programa Proteus y funciona todo perectamente, he grabado el programa sin que me arroje ningún tipo de error, y al conectarlo en el protoboard simplemente no hace nada, ya he checado las conexiones bastantes veces y no es el problema,he checado tambien el oscilador y tampoco es el problema espero me puedan ayudar, les anexo el programa:
#INCLUDE <16F877A.H> //DEFINE EL MICROCONTROLADOR A UTILIZAR
#USE DELAY(CLOCK=4000000) //DEFINE LA FRECUENCIA DE RELOJ A 20 MHz
#FUSES XT,NOWDT,NOPUT,NOPROTECT
#BYTE PORT_B=0x06 //
#BYTE PORT_C=0x07 //
#BYTE PORT_D=0x08 //
VOID MAIN() {
//SET_TRIS_B(0x00); //PORTB IS SET FOR OUTPUT, CONTROL FOR M1 AND M2
//SET_TRIS_C(0x00); //PORTC IS SET FOR OUTPUT, CONTROL FOR M3 AND M4
//SET_TRIS_D(0x00); //PORTC IS SET FOR OUTPUT, CONTROL FOR L0 TO L7
do{
OUTPUT_B(0xFF); //CLEAR PORTB
OUTPUT_C(0xff); //CLEAR PORTC
OUTPUT_D(0xff); //CLEAR PORTD
delay_ms(5000);
OUTPUT_B(0x00); //CLEAR PORTB
OUTPUT_C(0x00); //CLEAR PORTC
OUTPUT_D(0x00); //CLEAR PORTD
delay_ms(1000);
}while(true);
} //CLOSE BRACKET FOR THE MAIN FUNCTION
Espero alguien me pueda ayudar.
Gracias
He realizado un programa con el compilador CCS, el programa lo he probado con el programa Proteus y funciona todo perectamente, he grabado el programa sin que me arroje ningún tipo de error, y al conectarlo en el protoboard simplemente no hace nada, ya he checado las conexiones bastantes veces y no es el problema,he checado tambien el oscilador y tampoco es el problema espero me puedan ayudar, les anexo el programa:
#INCLUDE <16F877A.H> //DEFINE EL MICROCONTROLADOR A UTILIZAR
#USE DELAY(CLOCK=4000000) //DEFINE LA FRECUENCIA DE RELOJ A 20 MHz
#FUSES XT,NOWDT,NOPUT,NOPROTECT
#BYTE PORT_B=0x06 //
#BYTE PORT_C=0x07 //
#BYTE PORT_D=0x08 //
VOID MAIN() {
//SET_TRIS_B(0x00); //PORTB IS SET FOR OUTPUT, CONTROL FOR M1 AND M2
//SET_TRIS_C(0x00); //PORTC IS SET FOR OUTPUT, CONTROL FOR M3 AND M4
//SET_TRIS_D(0x00); //PORTC IS SET FOR OUTPUT, CONTROL FOR L0 TO L7
do{
OUTPUT_B(0xFF); //CLEAR PORTB
OUTPUT_C(0xff); //CLEAR PORTC
OUTPUT_D(0xff); //CLEAR PORTD
delay_ms(5000);
OUTPUT_B(0x00); //CLEAR PORTB
OUTPUT_C(0x00); //CLEAR PORTC
OUTPUT_D(0x00); //CLEAR PORTD
delay_ms(1000);
}while(true);
} //CLOSE BRACKET FOR THE MAIN FUNCTION
Espero alguien me pueda ayudar.
Gracias