So,
I am new of pic but this should be very easy.
Equipment:
-PICKIT2 as a programmer
-HI-TECH PICC as a compiler fo C code
-PIC12F510 as microcontroller
I'd like to simply turn on a led, because if I am not capable of this, then the rest is impossible.
The pic looks like this:
**broken link removed**
Obviously I connect 5V to Vdd and pin8 to ground, no external oscillator/clock.
And I connect e led (with a resistor before) to GP1.
Here is the code:
I don't see anything in the output except some 1 volt (I see even if I erase the code, therefore is not due to my code).
The HITECH CODE generates many files, HEX, COF..... without error or warning
(so it seems so fare it is ok).
Then I run MPLAB IDE and "import the HEX file" into an empty project. Select PICKIT 2 as a programmer, press "program". No error from MPLAB
Anything wrong in the process somewhere?
I am new of pic but this should be very easy.
Equipment:
-PICKIT2 as a programmer
-HI-TECH PICC as a compiler fo C code
-PIC12F510 as microcontroller
I'd like to simply turn on a led, because if I am not capable of this, then the rest is impossible.
The pic looks like this:
**broken link removed**
Obviously I connect 5V to Vdd and pin8 to ground, no external oscillator/clock.
And I connect e led (with a resistor before) to GP1.
Here is the code:
Code:
#include <htc.h>
__CONFIG(MCLREN & UNPROTECT & WDTDIS & INTOSC);
void main()
{
TRIS = 0;//0b111101;
GP1 = 1;
for(;;)
{ ; }
};
I don't see anything in the output except some 1 volt (I see even if I erase the code, therefore is not due to my code).
The HITECH CODE generates many files, HEX, COF..... without error or warning
(so it seems so fare it is ok).
Then I run MPLAB IDE and "import the HEX file" into an empty project. Select PICKIT 2 as a programmer, press "program". No error from MPLAB
Anything wrong in the process somewhere?