Yes correct the MCU is 16F690.
On the JP5 it is nothing there, just two "soldering holes".
I don't have a "config set"? The posted code is completely everything i have wrote.
Maybe i should try to use some other extern components on a breadboard.
Yes correct the MCU is 16F690.
On the JP5 it is nothing there, just two "soldering holes".
I don't have a "config set"? The posted code is completely everything i have wrote.
Maybe i should try to use some other extern components on a breadboard.
This is what I will bet is happening.
If you have not changed the *.inc file (configs) MCLR is on.
When A3 = 0 causes the LED to go high, then when the switch is pressed A3 goes to a hard LOW resetting the PIC. Something like that.
Yup, move over to a bread board to get started.
Dave
Always wear safety glasses while programming.
Nah i haven't change anything in the *.inc files.
I will try with some resistors, switch and led on a breadboard, will get back here when i have tried.
But so far your eye can see, it isn't anything wrong with the code?
This is my first real program to PBP, but you get my final point what the program should do right?
Led = off and when switch is pressed led = on, when switch released led = off.
The PicKit2 has excellent tutorials. Yes they start with assembler but they will teach you the hardware of the LowPin count board if you read the tutorial. They don't take too long to complete either.
The advice given by MACKRACKIT is right on target. You must change the .inc file to turn mclr off or the pushbutton will reset the PIC. This is explained in the PicBasicPro example code very well.
Keep trying. The PicKit and LPC are good learning tools.
Jim
I did change the MCLR to off in the *.inc file to my MCU so now is everything works like a charm!
Thanks for your fast helps guys!
Bookmarks