Hi to all engineers, I am reading ADC to compare 10 different values if they are matched then each match has it's own set value. my question is. 1. what is the different between if else if for example if (adc_x==1023) // 5v 1023 { xbyte_lsb=0xff ; xbyte_msb=0x01 ; } else if (adc_x==921) // 4,5v 921 { xbyte_lsb=0x9A ; xbyte_msb=0x01 ; } or without else if if (adc_x==1023) // 5v 1023 { xbyte_lsb=0xff ; xbyte_msb=0x01 ; } if (adc_x==921) // 4,5v 921 { xbyte_lsb=0x9A ; xbyte_msb=0x01 ; } I do not clearly understand what does "else if" do? is there better way of testing ADC ? Any feedback will appreciate. Andre -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist