Jan 20, 2006 #1 W wakaka Full Member level 4 Joined Dec 7, 2005 Messages 237 Helped 10 Reputation 20 Reaction score 6 Trophy points 1,298 Activity points 2,931 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......
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......