Maker Pro
Maker Pro

problem programming pics

gatoulisss

Jan 23, 2015
36
Joined
Jan 23, 2015
Messages
36
hello,
i have a problem with programming my pic microcontrollers...
im writing a very simple code just to test them
the programm is about to blink a led. in the simulation the programm running just fine also on the compiler no problems at all the programmer says that the programming ends succesfully but on the circuit nothing works.
i have test the same program in 5 diferrent pic (3xpic16f84A, 1xpic16f88, 1xpic16f628A) microcontrollers and i have the same problem any help?

i upload some fotos of the situation.

thanks a lot!!p1.jpg p2.jpg DSC097651.jpg
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
Hello

You don't have a pull up resistor for your reset line. The Pick kit 3 may be holding it in reset but even if it is not, a resistor is needed to allow the program to run. Look at the data sheet for the PIC to see the recommended circuit. It's normally a capacitor and a resistor.

Are you running in RC mode? It's just I can't see any oscillator circuitry. You should also have support and decoupling capacitors as close to the PIC power pin as you can. Google this to see how it's done.

Your resistor looks like it's connected differently to your drawing which as it is you will put the output into current limit if the output is set high, this might be ok for some LEDs but we would normally use a resistor to save power because you generally wouldn't need it that bright as an indicator. Also check the resistor value and tell us what it is....... 330R?

It looks like your design has fixed this issue but your drawing hasn't been updated. Just check your code to make sure you are setting the output high.

I can't see the LED connection so you will have to double check that.

You could post your code here for the other guys to look at, they may see something wrong with it.

Thanks
Adam
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
You need to set various configuration options in any PIC project. As Adam hinted, the oscillator selection is often external RC for PICs. You need to select the internal oscillator. Also you need to turn off the watchdog timer in configuration settings.

I am at work now and do not have MPLAB installed, when I get home I can probably give you the configuration settings needed for one of your PICs.

Bob
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
You need to set various configuration options in any PIC project. As Adam hinted, the oscillator selection is often external RC for PICs. You need to select the internal oscillator. Also you need to turn off the watchdog timer in configuration settings.

I am at work now and do not have MPLAB installed, when I get home I can probably give you the configuration settings needed for one of your PICs.

Bob

Good one Bob!
Adam
 

gatoulisss

Jan 23, 2015
36
Joined
Jan 23, 2015
Messages
36
You need to set various configuration options in any PIC project. As Adam hinted, the oscillator selection is often external RC for PICs. You need to select the internal oscillator. Also you need to turn off the watchdog timer in configuration settings.

I am at work now and do not have MPLAB installed, when I get home I can probably give you the configuration settings needed for one of your PICs.

Bob
ok thanks! that would help!

Hello

You don't have a pull up resistor for your reset line. The Pick kit 3 may be holding it in reset but even if it is not, a resistor is needed to allow the program to run. Look at the data sheet for the PIC to see the recommended circuit. It's normally a capacitor and a resistor.

Are you running in RC mode? It's just I can't see any oscillator circuitry. You should also have support and decoupling capacitors as close to the PIC power pin as you can. Google this to see how it's done.

Your resistor looks like it's connected differently to your drawing which as it is you will put the output into current limit if the output is set high, this might be ok for some LEDs but we would normally use a resistor to save power because you generally wouldn't need it that bright as an indicator. Also check the resistor value and tell us what it is....... 330R?

It looks like your design has fixed this issue but your drawing hasn't been updated. Just check your code to make sure you are setting the output high.

I can't see the LED connection so you will have to double check that.

You could post your code here for the other guys to look at, they may see something wrong with it.

Thanks
Adam

the code is this
void main() {

trisa1_bit=0;
for(;; ){
porta.f1=1;
delay_ms(1000);
porta.f1=0;
delay_ms(1000);
}
}
also i have the internal oscillator on and watch dog off
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
You need to set various configuration options in any PIC project. As Adam hinted, the oscillator selection is often external RC for PICs. You need to select the internal oscillator. Also you need to turn off the watchdog timer in configuration settings.

I am at work now and do not have MPLAB installed, when I get home I can probably give you the configuration settings needed for one of your PICs.

Bob

At work Bob. Thought you were a man of leasure. If not tell the wife to cut down on handbags lol.
Adam
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
At work Bob. Thought you were a man of leasure. If not tell the wife to cut down on handbags lol.
Adam
Almost, retiring at the end of April.

And despite our quite reasonable income, my wife shops mostly at consignment stores. Though she does have a weakness for 5-star hotels when we vacation.:)

Bob
 

gatoulisss

Jan 23, 2015
36
Joined
Jan 23, 2015
Messages
36

i use same code same bread board but different microcontroler, pc and compliler and it run just fine...so the code is ok,there is something wrong or with my computer or programmer(just bought it) or pics
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Hey Guys, don't let this just end here. There are members out here (including me) following these threads with the hope of learning PICs through stray coupling.

Chris
 
Top