Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] program doesn't run correctly when pickit3 removed

Status
Not open for further replies.

jsbhalla88

Member level 1
Joined
Mar 3, 2015
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
314
I am using Ready for PIC development board by MikroElektronika...
I am using software UART at RA0 and RA1 pins of PIC18F45K22...code works fine till pICKIt is connected..

as soon as I remove pickit, it does not work as expected..as if baud rate changes..it starts send garbage values...I have tried by blinking an LED., LED keeps on blinking...so definitely baud rate changes...
any suggestions..????

ALSO, my code does not run the next day..i have to program it everyday before getting it to work....
what can I do to make sure my code runs after I power the controller on the next day or even after a week/months...
 

could you post which board are you using?

when some circuit works with the pickit connected, and stop working when disconnected, it could be one of 3 things:

1. MCLR is left floating... common in cheap boards or newbie mistake... add a 10K resistor in MCLR to VCC as pull-up.

2. Power SUPPLY issues... maybe you are powering from the pickit and after disconnecting there is some drop voltage or so... also it could be a missconnected 0V - GND fault, please, if you are connecting the board to the PC via a serial link, don't forget to check the GND cable from th serial port to GND(0v) from the board)

3. finally leftover pins, the pickit uses 2 or 3 pins to program the microcontroller, specifically RB7 and RB6, if you are not using this pins in your program, maybe it mess that you are leaving them floating, add 2 resistors or enable the internal pull-up.
 
I have not heard of "Ready" (and it does not show up readily in a Google search) so I don't know what it id or does, but with compilers such as C18 or XC8, when you compile for "debugging", it includes additional code (called the debug kernel).
When the MCU resets, it jumps to the debug kernel that then looks for the debugger and the IDE through the PGC/PGD pins. It will wait until it can communicate with the debugger and the IDE which gives the impression that nothing is happening.
If your environment takes this approach, then try to program the device in "release" mode which means that it will not include the debug kernel and the power on reset will jump to the start of your code (or runtime etc.).
There is one other aspect that can trip you up: if a debug kernel is included, some of them set all of the I/O pins to the "digital" mode (as opposed to the default "analog" mode where this is appropriate).
As I say, I don't know your environment so this may have nothing to do with the problem.
Susan
 

Kurenai_ryu:
I already mentioned the board..."Ready for PIC" by MikroElektoniKa
1. MCLR is not floating...I checked it
2. I checked continuity of GND.. it was not connected. So, after I replaced the wire, my board works even after removing the PICKIT...

THANKS....;-)

silly mistake....:lol:

- - - Updated - - -

Susan:
I didn't know this..
Since I didn't know about this debugger kernel thing, so I could not add it by accidently..i have tried using debugger, but not been able to do so.. So, I have been using print commands to debug...

thanx for the information..
 
Last edited:

well,

In my case, when I disconnect PICKIT3 from the board, the dspic30F4011 stops running correctly...

Then I use a capacitor (10uF - 50V) connects between GND and VDD, it runs fine again.

So in my case, probably relate to power source is not stable somehow...

Hope this'll help someone :)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top