Page 1 of 1

having problem on pic 16f690 and UIC00B

PostPosted: Thu Feb 14, 2013 5:06 pm
by rexwong0211
Problem:
Found PICkit 2 - Operating System Version 2.32.0
PICkit 2 Unit ID = UIC00B V1.0
Target power not detected - Powering from PICkit 2 ( 5.00V)
PK2Error0024: PICkit 2 was unable to establish a valid Vdd on the target (Attempted 5.00V - Read 0.00V)
PICkit 2 Ready

Code:
CODE: SELECT_ALL_CODE
#include<pic.h>
#define _XTAL_FREQ 4000000

#define uchar unsigned char
__CONFIG(0xFF32);



void main(void)
{
   ANSEL = 0x00;      
   TRISC = 0x00;      
   
   while(1)
   {
      PORTC ^= 0x01;
      __delay_ms(500);         
   }
}

Method:
1. ICSP using UIC00B
2. MPLab 8.66
3. PICKit 2 v2.40
4. Universal Toolsuite v9.81
5. 5.21V pwr supply


THZ IN ADVANCE

Re: having problem on pic 16f690 and UIC00B

PostPosted: Fri Feb 15, 2013 10:33 am
by Idris
Do you create your own circuit on stripboard? If yes maybe you need to connect 5V to UIC00B - VDD.

Re: having problem on pic 16f690 and UIC00B

PostPosted: Sun Feb 17, 2013 11:28 pm
by rexwong0211
Sry for taking so long to reply
i been asking my fren about this, i juz solved it.
the problem was the pins connection from uic00b cable, it was confusing n i mess it up
another problem i thk was the coding, i modified workable coding to test
i hav to test all components 1 by 1 to solve.

yes, i connect using breadboard.
Thr is 1 thg i still not sure, i didnt connect Vdd from uic00b but it still work.
so, wat the usage of the Vdd pin ???
From datasheet it is optional.
i giving 5V, 3 Amp to the circuit, it is current too high ????
#define _XTAL_FREQ 4000000 - this line is for internal crystal ?????

Re: having problem on pic 16f690 and UIC00B

PostPosted: Mon Feb 18, 2013 11:06 am
by yonghui
the current is depending on the voltage, so if u keep your voltage to 5V then it is safe.
the #define _XTAL_FREQ 4000000
is your definition of a constant that you will use. you can remove it if u dont use it.
in hi-tech C compiler the delay routine will use this constant.
for crystal setting, you can set it at configuration bits.


regards,
yh

Re: having problem on pic 16f690 and UIC00B

PostPosted: Mon Feb 18, 2013 8:20 pm
by rexwong0211
Thz for the reply !!
- i using adapter constantly giving 5V, 3 amp; is this really ok w/o resistor ?
- i heard that 16f690 has internal crystal so does that mean external is not necessary (using 4Mhz) ?
- What is the usage of UIC00B - Vdd pins (circuit work even w/o it) ?

Re: having problem on pic 16f690 and UIC00B

PostPosted: Mon Feb 18, 2013 8:50 pm
by robosang
The Vdd of UIC00B is optional, if your circuit is not powered by itself, you can use the Vdd from UIC. Since you have the power, so have or don't have it will still work.

Re: having problem on pic 16f690 and UIC00B

PostPosted: Tue Feb 19, 2013 3:08 pm
by rexwong0211
like