Dear John
Hi
If you use set tris , method , it will set your pin ( or port ) as input or out put . if you set it as 0 it will be out put !
Follow below thing if you want that all of port B= out put and pin 3 at high level :
Set_tris_b(0)
out put _high ( pin_B3);
Best Wishes
Goldsmith
Dear John
Hi
If you use set tris , method , it will set your pin ( or port ) as input or out put . if you set it as 0 it will be out put !
Follow below thing if you want that all of port B= out put and pin 3 at high level :
Set_tris_b(0)
out put _high ( pin_B3);
Best Wishes
Goldsmith
Well.. I need to use the output_b(value), where value is an 8bit integer (0-255). This should set all the pins on port B either high or low depending on the integer value.
The problem is that no matter what value (between 0 & 255) the RB3/PGM pin is always low.
So if I enter: output_b(255); the pins on port B should all be at high level.
from page 45 of the datasheet:
"Low-Voltage ICSP Programming (LVP) is enabled by default which disables the RB3 I/O function. LVP
must be disabled to enable RB3 as an I/O pin and allow maximum compatibility to the other 28-pin and
40-pin mid-range devices."
from page 45 of the datasheet:
"Low-Voltage ICSP Programming (LVP) is enabled by default which disables the RB3 I/O function. LVP
must be disabled to enable RB3 as an I/O pin and allow maximum compatibility to the other 28-pin and
40-pin mid-range devices."