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.

[PIC] OSCCAL value problem in programming of PIC12F508 with PICkit2 kit & s/w

Status
Not open for further replies.

snehamatondkar

Newbie level 5
Newbie level 5
Joined
Aug 6, 2012
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,348
Dear Friends,

Recently I bought PICkit2 programmer with software PICkit2 v2.61.00 & 10 number of PIC12F508 ICs.
I tried to program these ICs but when I read device I got invalid OSCCAL value. I tried to set it with manual option but i don't know correct value.
I also tried to auto regenerate but error message blinks
"Regenerating OSCCAL failed unable to connect to calibration executive"

I tried with all the 10 number ICs but result is same there is no valid OSCCAL value.

If anybody has knowledge about this or if you know how to generate OSCCAL value please share asap.


Thanks in advance
 

Is it a true Pickit2 or a clone?

Either way, try setting the 'Use Vpp first program entry' under 'Tools' in the Pickit software.

Regards,

Anand
 

The other possibility is the proram you are placing in the PIC is overwriting the final address location. When these PICs are tested before leaving the production line, the OSCCAL value is saved in the final address as 'xx' in a 'movlw xx' instruction. The final address is also the reset vector. When reset or powered up, the PIC runs this instruction then moves on to the next address which because it is at the end of memory rolls over to address zero where you program would normally reside. So when your program starts up at address 0, it already has the OSCCAL value stored in the W register. You don't have to use it but for best calibration you would start the program by loading the value into the OSCCAL register and so calibrate the clock speed.

The error you are seeing is because the value the Pickit is seeing at the final address is not a 'movlw' instruction. Either you erased it or put somethng else in it's place. A real Pickit 2 has the ability to measure the clock frequency and produce a new value for calibration. You should note that the error does not stop the PIC working, it's just cautioning you that the speed may not be very accurate.

Brian.
 

Re: OSCCAL value problem in programming of PIC12F508 with PICkit2 kit & s/w

Thanks ard for your reply...

I tried what u suggested but when I select device as 12F508 (baseline PICs) this option gets disabled i cant set it.
 

I just checked mine and clicking on Tools/OSCCAL gives me two options "Set Manually" and "Auto Regenerate". The device was set to Baseline/12F508.

Are you using a real Pickit2 or is it a clone?

Brian.
 

how to recognize whether it is clone or real...here i am attaching images of circuit at my end please check it..

As per my knowledge it is REAL...but what does that make difference?
 

Attachments

  • PIC-KIT2-B-W.jpg
    PIC-KIT2-B-W.jpg
    135.1 KB · Views: 133
  • PIC-PICKit2-emulator-2.jpg
    PIC-PICKit2-emulator-2.jpg
    164.9 KB · Views: 126

Well... I certainly isn't a genuine Pickit2. The real one looks like a double sized USB memory stick, has a black case and no IC socket. However, from what I can see in your photographs it does seem to be a good electrical copy of the original, even if it looks completely different. Many of the clones are simplified and do not have all the functions of the real Pickit.

6447437500_1383296998.jpg


Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top