It has been quite a while since I haven't done PIC programming.
While trying to run a simple example I have ran into a problem.
#include <pic.h>
int main()
{
TRISB = 0; // PORTB is output
PORTB = 0xFF; // All leds are on
while (1) {} // Loop forever
}
I use PICKit2 command line interface to load to program into the microcontroller.
pk2cmd -PPIC16F877A -Fhelloworld.hex -M PICkit 2 Program Report 1-10-2020, 21:19:44 Device Type: PIC16F877A
Program Succeeded.
You can see the schematics of the circuit here.
I meausured the voltage at the output of RB5 with a multimeter. It was about 300 mV.
Are there any ideas on how to fix this problem. Thanks.
PORTB = 0xFF;
will output Vcc ... always tryPORTB = 0;
also ... if both generate the same output, then start assuming that there is a problem \$\endgroup\$