wakaka
Full Member level 4

877A comparator
Im a noob in programming, this is my program:
#include <16F877a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay (clock=20000000)
void main()
{
byte value;
setup_port_a(ALL_ANALOG);
setup_adc(adc_clock_internal);
set_adc_channel( 5 );
setup_vref(VREF_HIGH|15);
setup_comparator(A0_A3_A1_A2);
// here i dunno how to proceed. If A3's voltage is greater than A2's, output_high(Pin_B7). or is there any other ways to do it??? need help, thanks......
Im a noob in programming, this is my program:
#include <16F877a.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay (clock=20000000)
void main()
{
byte value;
setup_port_a(ALL_ANALOG);
setup_adc(adc_clock_internal);
set_adc_channel( 5 );
setup_vref(VREF_HIGH|15);
setup_comparator(A0_A3_A1_A2);
// here i dunno how to proceed. If A3's voltage is greater than A2's, output_high(Pin_B7). or is there any other ways to do it??? need help, thanks......