F
faraz101
Guest
Sunt băieţi, folosind mclr de aderenţă de 16f676 pic input.but ca nu este de lucru aici este meu de cod te rog ajută-mă.# include "D: \ PIC16F676 UPS \ COD \ mclr2 \ mclr.h"
# define SWITCHON PIN_A3
# define MAIN_LED PIN_C0
void main ()
(
setup_adc_ports (NO_ANALOGS | VSS_VDD);
setup_adc (ADC_OFF);
setup_timer_0 (RTCC_INTERNAL | RTCC_DIV_1);
setup_timer_1 (T1_DISABLED);
setup_comparator (NC_NC);
setup_vref (false);
în timp ce (1)
(
dacă (de intrare (SWITCHON))
(
output_low (MAIN_LED);
delay_ms (1000);
output_low (MAIN_LED);
delay_ms (1000);
)
alt
(
output_low (MAIN_LED);
delay_ms (500);
output_low (MAIN_LED);
delay_ms (500);
)
)
)
# define SWITCHON PIN_A3
# define MAIN_LED PIN_C0
void main ()
(
setup_adc_ports (NO_ANALOGS | VSS_VDD);
setup_adc (ADC_OFF);
setup_timer_0 (RTCC_INTERNAL | RTCC_DIV_1);
setup_timer_1 (T1_DISABLED);
setup_comparator (NC_NC);
setup_vref (false);
în timp ce (1)
(
dacă (de intrare (SWITCHON))
(
output_low (MAIN_LED);
delay_ms (1000);
output_low (MAIN_LED);
delay_ms (1000);
)
alt
(
output_low (MAIN_LED);
delay_ms (500);
output_low (MAIN_LED);
delay_ms (500);
)
)
)