Hola Amigos he probado parte de lo q aki se habla de los PIC, yo estoy usando el 16f877 con algo de lo q aki hay, por el momento solo quiero encender un led, al parcer el programa esta bien; pero cuando lo simulo en proteus no me funciona, aki les dejo el codigo :
//#include "C:\pruebas pic\control_motores.h"
#include <16F877.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES RC //Resistor/Capacitor Osc with CLKOUT
#FUSES NOPUT //No Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES BROWNOUT //Reset when brownout detected
#FUSES LVP //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOCPD //No EE protection
#FUSES NOWRT //Program memory not write protected
#FUSES NODEBUG //No Debug mode for ICD
#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
#byte port_b=0x06
void main()
{
port_b_pullups(TRUE);
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
// TODO: USER CODE!!
set_tris_b (0x00); // Declaramos puerto B como salida
set_tris_a (0x1F);
port_b=0;
output_high(PIN_B0);
//delay_ms (10); // esperamos 10 ms
}
GRACIAS!!!!
//#include "C:\pruebas pic\control_motores.h"
#include <16F877.h>
#device adc=8
#FUSES NOWDT //No Watch Dog Timer
#FUSES RC //Resistor/Capacitor Osc with CLKOUT
#FUSES NOPUT //No Power Up Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES BROWNOUT //Reset when brownout detected
#FUSES LVP //Low Voltage Programming on B3(PIC16) or B5(PIC18)
#FUSES NOCPD //No EE protection
#FUSES NOWRT //Program memory not write protected
#FUSES NODEBUG //No Debug mode for ICD
#use delay(clock=4000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
#byte port_b=0x06
void main()
{
port_b_pullups(TRUE);
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_psp(PSP_DISABLED);
setup_spi(FALSE);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
// TODO: USER CODE!!
set_tris_b (0x00); // Declaramos puerto B como salida
set_tris_a (0x1F);
port_b=0;
output_high(PIN_B0);
//delay_ms (10); // esperamos 10 ms
}
GRACIAS!!!!