X4ROY
Newbie level 6
1. when i declare a pin of a port as an input port say rb0 then in my code i write something like :
if input port is high (rb0 is high)
set rb1 as high
else set rb2 as high .
electrically what voltage should i apply to rb0 to make it a high i am using pic 16f877a
what is the electrical meaning of a high .... say it is some 5 volts then if i connect one terminal of my battery eliminator(+ve one) to port rb0 will it sense a high or shud i also connect the (-ve of eliminator to gnd ) ???
2. i am using hitech c compiler could u please tell me the syntax to refer to a particular bit of a port ...
one book said
PORTbits.RB0 = 1 will set rb1 as high but the compiler is showing undefined symbol error for that
the only header file i have included is htc.h i tried P16F877A.h says it does not exist
if input port is high (rb0 is high)
set rb1 as high
else set rb2 as high .
electrically what voltage should i apply to rb0 to make it a high i am using pic 16f877a
what is the electrical meaning of a high .... say it is some 5 volts then if i connect one terminal of my battery eliminator(+ve one) to port rb0 will it sense a high or shud i also connect the (-ve of eliminator to gnd ) ???
2. i am using hitech c compiler could u please tell me the syntax to refer to a particular bit of a port ...
one book said
PORTbits.RB0 = 1 will set rb1 as high but the compiler is showing undefined symbol error for that
the only header file i have included is htc.h i tried P16F877A.h says it does not exist