Hi,
Alright here's the deal. I have a PIC16F877A microcontroller which somewhat refuses to work. Here's the details:
I do not have (access to) another PIC for the moment unfortunately.
= EDIT =
Forgot the code. Here:
Alright here's the deal. I have a PIC16F877A microcontroller which somewhat refuses to work. Here's the details:
- Programmed PIC16F877A using MPLAB and PICKIT2 to open ports A, B and D
- Tested with an LED (with a 100Ω resistor in series), does not light up
- Measured from a(ny) pin of Ports A, B and D to ground but has practically no reading
- Measured from VDD to VSS, obtained 5V reading
- Components untouched, reprogrammed PIC - noticed a short flicker on the LED when in process of programming
I do not have (access to) another PIC for the moment unfortunately.
= EDIT =
Forgot the code. Here:
Rich (BB code):
#include <pic.h>
__CONFIG(0x3f3A); // 20Mhz HS XTAL-OSC
void main(void)
{
TRISA = 0x00;
TRISB = 0x00;
TRISD = 0x00;
ADCON = 0x06;
CMCON = 0x07;
PORTA = 0xFF;
PORTB = 0xFF;
PORTD = 0xFF;
while(1)
{
for(int i=0;i<20000;i++)
{
PORTA = 0xFF;
PORTB = 0xFF;
PORTD = 0xFF;
}
}
}
Last edited: