Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature currently requires accessing the site using the built-in Safari browser.
Bueno eso es dificil decirte ya que si no me genera no me marca el frecuencimetro y no se exactamente en que frecuencia esta ,pero de seguro que ha superado esa frecuencia por que siempre lo hace y no se activóOye nada mas una aclaracion el 3.0 solo se activa al estar entre 49 y 51 herts ni aun asi activa?
#include <12F675.h>
#device adc=10
#FUSES NOWDT, INTRC_IO, NOCPD, NOPROTECT, NOMCLR, NOPUT, NOBROWNOUT
#use delay(clock=4000000)
#bit Led=0x85.1
int RPM=false;
const int FMax=60; //frecuencia maxima de corte en Hz
const int FTyp=50; //frecuencia tipica de operacion en Hz
const int FMin=45; //frecuencia minima de corte en Hz
const long Vmax=536; //Voltaje maximo de operacion en escala de 0 a 1024
const long VMin=488; //Voltaje minimo de operacion en escala de 0 a 1024
const long T_Auto=1500; // tiempo que mantiene el campo activo en milisegundos
const int OF=5; // segundos fuera de frecuencia
long Freqcount(void)
{int cycles8, cycles;
long freq;
cycles8=0x00;
cycles=0x00;
set_timer1(0);
setup_timer_1(T1_External|T1_Div_By_1);
while (cycles!=0xFF)
{cycles8=0x00;
while (cycles8!=0xFF)
{delay_cycles(0x09);
cycles8++;}
delay_cycles(0x55);
cycles++;}
delay_cycles(0x8D);
setup_timer_1(T1_Disabled);
freq=get_timer1();
return(freq);}
void Turn_On()
{long VW=0;
long TO=0;
output_low(pin_a1);
output_high(pin_a4);
while (VW<Vmin&&TO<=T_Auto)
{VW=Read_Adc();delay_ms(1);TO++;}
if (VW>=Vmin)
{output_low(pin_a2);RPM=True;}
else
{output_high(pin_a1);output_high(pin_a2);}
output_low(pin_a4);
}
void Turn_Off(void)
{output_high(pin_a1);
output_high(pin_a2);
RPM=false;}
void main(void)
{long VD;
int COF=0;
setup_adc_ports(sAN0|VSS_VDD);
setup_adc(ADC_Clock_Div_2);
setup_timer_0(RTCC_Internal|RTCC_Div_1);
setup_comparator(NC_NC);
setup_vref(false);
set_tris_a(0x29);
set_adc_channel(0);
output_low(pin_a4);
output_high(pin_a2);
output_high(pin_a1);
delay_ms(1000); //este es el retardo de inicio al encender el pic en milisegundos
while (true)
{VD=freqcount();
if (VD<=FMin||VD>=FMax)
{if (RPM==True)
{if (led==1) output_low(pin_a1); else output_float(pin_a1);
COF++;
if (COF>=OF) {Turn_Off();COF=0;}
}
}
else
{COF=0;
if (RPM==False)
{if (VD>FMin&&VD<FMax)Turn_On();}
else
{VD=Read_Adc();
if (VD>=VMin&&VD<=VMax) output_low(pin_a1); else output_high(pin_a1);}
}
}
}
será que no podemos tomar la señal de ese punto?
help me please
diagram circuit
name of composant