Greetings All,
Someone please help me troubleshoot what the issue is with my code and my PIC.
I'm using MPlab X IDE 1.10 and PICkit3 trying to burn a simple code to turn on a LED using the I/O ports. The PICkit3 supply the power to the target board which in ICSP program mode with PIN1 connected to a 22KΩ pull-up resistor connected to Vpp. PIN1 also connected to a capacitor across ground.
1)The code compiled with a warming "Found directive in column 1. (__CONFIG)" which i think its alright.
2)It also programed without any issues "Programming...
Programming/Verify complete"
3) The LED is connected correctly and the board has power Vpp = 4.8V supplied by PICkit3.
PROBLEM:
1) Nothing happen after program is complete, i measured the voltage on all the pins at porta i got 0V
Below is my complete code in assembly.
******************************************************
#include P16F876A.INC
#define XTAL FREQ 20MHZ ; using 20Mhz ceramic crystal oscillator.
__CONFIG (_XT_OSC & _WDT_OFF & _PWRTE_OFF & _BOREN_OFF & _LVP_OFF & _CPD_OFF & _WRT_OFF & _CP_OFF );
ORG 0x00
MOVLW 0x7
MOVWF ADCON1
MOVLW 0x00
MOVWF TRISA ;Set PortA output
MOVLW 0x00
MOVWF PORTA ;Clear PortA
HERE
MOVLW 0xFF ;Set all portA high
MOVWF PORTA
GOTO HERE
END
****************************************************************
Please help
Thank you all in advance!
Someone please help me troubleshoot what the issue is with my code and my PIC.
I'm using MPlab X IDE 1.10 and PICkit3 trying to burn a simple code to turn on a LED using the I/O ports. The PICkit3 supply the power to the target board which in ICSP program mode with PIN1 connected to a 22KΩ pull-up resistor connected to Vpp. PIN1 also connected to a capacitor across ground.
1)The code compiled with a warming "Found directive in column 1. (__CONFIG)" which i think its alright.
2)It also programed without any issues "Programming...
Programming/Verify complete"
3) The LED is connected correctly and the board has power Vpp = 4.8V supplied by PICkit3.
PROBLEM:
1) Nothing happen after program is complete, i measured the voltage on all the pins at porta i got 0V
Below is my complete code in assembly.
******************************************************
#include P16F876A.INC
#define XTAL FREQ 20MHZ ; using 20Mhz ceramic crystal oscillator.
__CONFIG (_XT_OSC & _WDT_OFF & _PWRTE_OFF & _BOREN_OFF & _LVP_OFF & _CPD_OFF & _WRT_OFF & _CP_OFF );
ORG 0x00
MOVLW 0x7
MOVWF ADCON1
MOVLW 0x00
MOVWF TRISA ;Set PortA output
MOVLW 0x00
MOVWF PORTA ;Clear PortA
HERE
MOVLW 0xFF ;Set all portA high
MOVWF PORTA
GOTO HERE
END
****************************************************************
Please help
Thank you all in advance!