Iawia
Member
Does anyone know if there is some sort of precaution using GP2?
I can not set it high EVER. I have two brand new pic-12F508 microprocessors.
It builds fine, I load it onto the chip from a pickit 2, then put 5v to my breadboard and nothing happens. If I change the code to set all the other pins high (except GP3 bc its always input).
The code is trivial.
I have tried compiling it in xc.h and htc.h with no luck. I got the code directly from Microchip's tutorials. Pg. 11., except that I change the GPIO and TRIS with respect to GP2 instead of GP1.
I'm all out of ideas.
I can not set it high EVER. I have two brand new pic-12F508 microprocessors.
It builds fine, I load it onto the chip from a pickit 2, then put 5v to my breadboard and nothing happens. If I change the code to set all the other pins high (except GP3 bc its always input).
The code is trivial.
Code:
#include <htc.h>
__CONFIG(MCLRE_OFF & CP_OFF & WDT_OFF & OSC_IntRC);
void main(){
TRIS = 0b111011; // GP2 is the only output
GPIO = 0b000100; // Setting GP2 HIGH
for(;;) // Loop forever
{ ; }
}
I have tried compiling it in xc.h and htc.h with no luck. I got the code directly from Microchip's tutorials. Pg. 11., except that I change the GPIO and TRIS with respect to GP2 instead of GP1.
I'm all out of ideas.
Last edited: