sahu
Member
right now i am facing some problem about i\p , o\p & adc setting .use 16f676.
description....
Code:
TRISA0_bit = 1 ' input
TRISC = 0x00 ' Set PORTc as output
CMCON = CMCON or 0x07 ' turn off comparators
ADCON1 = ADCON1 or 0x00 ' Set AN0 channel pin as analog
description....
pl clear me where i wrong ?AN0 channel (RA0) ' adc input
TRISC = 0x00 ' Set PORTc as output for relay , led & bzr
CMCON = CMCON or 0x07 ' turn off comparators
ADCON1 = ADCON1 or 0x00 ' Set only AN0 channel (RA0) pin as analog
porta.1 & porta.2 = Set PORTA as output for relay , led & bzr
porta.4 & porta.5 = Set PORTA as input for digital (means logic hi \ low)
ref volt is vdd (5v)