• AVR Freaks

Helpful ReplyHot!PIC10F200

Page: 12 > Showing page 1 of 2
Author
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
2019/01/28 13:35:42 (permalink)
0

PIC10F200

I work with PIC10F200 and PICKIT3, but when I have a connection and I want to try the connection, the first one will write the warning (Picture1) and then the error (Picture 2). Target has invalid calibration data.
 
What could be wrong?
 
I've tried many of the things I've found in forums, but it does not work. I use MPLAB X IDE 5.10
 
Thank for any information

Attachment(s)

Attachments are not available: Download requirements not met
#1
peterg1000
Junior Member
  • Total Posts : 117
  • Reward points : 0
  • Joined: 2009/01/29 13:07:52
  • Location: Flamstead, Herts, UK
  • Status: offline
Re: PIC10F200 2019/01/29 10:53:35 (permalink)
0
Had a quick search and found this link :-
 
https://www.microchip.com/forums/m887325.aspx
 
Might point you in the right direction
#2
NKurzman
A Guy on the Net
  • Total Posts : 17485
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/01/29 11:28:32 (permalink)
+1 (1)
The First Picture is always displayed in MPLab 8.92  if the Part has an L and LF version and Vcc is set to 5.0
 
#3
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/02/03 14:45:43 (permalink)
0
I do not know how to handle it. When I start the project and load it on PICkit3, this error occurs => "Cannot program a production build to a debug header"
 
Given that the first error occurs? What about the other? How will they be resolved? I looked at the instructions but I do not know what to do.
 
There is an example of a program for this chip and in code C.
 

Attachment(s)

Attachments are not available: Download requirements not met
#4
qhb
Superb Member
  • Total Posts : 9998
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: PIC10F200 2019/02/03 15:15:28 (permalink)
+1 (1)
What menu item in MPLABX are you clicking on to burn your chip?
 Are you using a debug header, or just a normal chip?
 

Nearly there...
#5
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/02/05 14:26:07 (permalink)
0
 First I BUILD PROJECT then PROGRAMMER TO GO PICKIT3.
 
I use the header that is intended for the PIC10F200.
I use this head, I added an attachment.
Attachments are not available: Download requirements not met

Attachment(s)

Attachments are not available: Download requirements not met
#6
qhb
Superb Member
  • Total Posts : 9998
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: PIC10F200 2019/02/05 14:35:35 (permalink)
+1 (1)
dejan991
 First I BUILD PROJECT then PROGRAMMER TO GO PICKIT3.

Are you sure?
"Programmer to go" is a function to make a PICkit program a chip after it is disconnected from a PC. It is NOT what you would normally use to program a chip.
 
That looks like a debug header, in which case you can only use it via the "Debug" menu in MPLAB.
A normal PIC10F200 only has 8 pins.

Nearly there...
#7
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/02/10 14:45:10 (permalink)
0
What then is the procedure on PICKIT3? I already had a while ago when I programmed, but then I was another chip. In this case, the PIC10F200 chip does not work.
 
I enclosed the attachment where it can be seen on the bottom.
 
There is an example of a program for this PIC10F200. It would take a flashing LED.
post edited by dejan991 - 2019/02/10 14:51:44

Attachment(s)

Attachments are not available: Download requirements not met
#8
Mysil
Super Member
  • Total Posts : 3325
  • Reward points : 0
  • Joined: 2012/07/01 04:19:50
  • Location: Norway
  • Status: offline
Re: PIC10F200 2019/02/10 16:36:17 (permalink)
0
The piece in the pictures look like a  Debug Header,
It is a PIC that is specially made to behave like a PIC10F200, or some other small PIC devices, for Debugging,
and is intended to be plugged into a socket, instead of the 8 pin PIC.
 
If you have completed debugging, and made a release version of the project,
then you should disconnect and remove the Debug header,
Insert a real hardware PIC10F200 in your Production Board (Not the debug header),
and connect PICkit 3 to the real PIC10F200 on the production board, for Programming.
 
Flashing a LED is a fundamental exercise, to verify that development software, PICkit programmer,
PIC microcontroller, and your head is able to work together.
 
    Mysil
#9
mpgmike
Super Member
  • Total Posts : 175
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: PIC10F200 2019/02/12 08:42:40 (permalink)
0
If you look at the pins of the PIC10F200 versus normal PIC12F versions of 8-pin MCUs, the pins are different.  MCLR lives on the 10F200 where Vss goes to the 12Fxx versions.  Every pin you need to program a PIC is relocated on the 10F versions.  Make sure your programmer is connected to the proper pins.  You couldn't program it with a ZIF type programmer (like ME Labs U2 for example).
#10
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/02/14 13:43:56 (permalink)
0
I wonder if there is an example of the basic settings for the PIC10F200 chip. In c code.
In the attachment, I send an image of how I have linked PICKIT3 on the PLATE.
This second part did not exactly understand what you had in mind? - Mysil
What should I set everything up with the settings? - mpgmike
post edited by dejan991 - 2019/02/14 13:50:45

Attachment(s)

Attachments are not available: Download requirements not met
#11
mpgmike
Super Member
  • Total Posts : 175
  • Reward points : 0
  • Joined: 2014/01/23 17:27:06
  • Location: NJ
  • Status: offline
Re: PIC10F200 2019/02/15 05:57:16 (permalink)
0
You will have to run jumpers from your programming board to the individual programming pins on your PIC10F200.  From the data sheet, VDD (supply voltage) is pin 2 (versus pin 1 on the PIC12F devices), VSS (ground) is pin 7 on the PIC10F (versus pin 8 on the PIC12F), MCLR is pin 8 on the 10F (Pin 4 on 12F), ICSPDAT is pin 5 on the 10F (pin 7 / 12F), and ICSPCLK is pin 4 on the 10F (pin 8 on the 12F).
          10F    12F
VSS   7        8
VDD   2        1
MCLR  8        4
DAT     5        7
CLK     4        8
 
A breadboard would come in handy for the jumpers.  Hope this answers your first question.  For the second question, I believe CONFIG etc is pretty straight forward (very little to actually configure & set up).
#12
Howard Long
Super Member
  • Total Posts : 676
  • Reward points : 0
  • Joined: 2005/04/04 08:50:32
  • Status: offline
Re: PIC10F200 2019/02/15 16:20:40 (permalink) ☄ Helpfulby Tharanga 2019/07/10 11:25:51
+1 (1)
If you use the PIC10F2xx debug header connections there is no need to do any jiggery pokery, they are a 1 to 1 pin match.
 
Code below to blinky GP2. Video demo here https://youtu.be/m5lReNo6FyU
 


// PIC10F200 Configuration Bit Settings
// 'C' source line config statements
// CONFIG
#pragma config WDTE = OFF // Watchdog Timer (WDT disabled)
#pragma config CP = OFF // Code Protect (Code protection off)
#pragma config MCLRE = ON // Master Clear Enable (GP3/MCLR pin function is MCLR)
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
#include <xc.h>
#define _XTAL_FREQ 4000000
int main(void)
{
TRISGPIO=0;
OPTION=0b11011111; // T0CS=0, so enable GP2 as GPIO
OSCCALbits.FOSC4=0; // FOSC4=0, so enable GP2 as GPIO

while (1)
{
GPIO=0xFF;
__delay_ms(250);
GPIO=0;
__delay_ms(250);
}
return 0;
}

#13
Howard Long
Super Member
  • Total Posts : 676
  • Reward points : 0
  • Joined: 2005/04/04 08:50:32
  • Status: offline
Re: PIC10F200 2019/02/15 16:25:35 (permalink)
0
I also get invalid cal data with the debug header, by the way.
 
When using debug headers, you can only build debug code, the IDE won't let you program production code onto debug headers.
 
#14
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/02/23 10:03:24 (permalink)
0
Hello,
I apologize for the late reply. I tried the selected code and the program works. The light flashes.
 
But it still shows and writes that error (the target has invalid calibration data), but the program works and also the light flashes the light.
 
What is the procedure to transfer the program to the chip using the tool shown in the image.

Attachment(s)

Attachments are not available: Download requirements not met
#15
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/03/02 13:51:14 (permalink)
0
How to upgrade. I have a switch on GP3 what I should have to set up and upgrade the program to turn on the light when the switch is pressed.
#16
PStechPaul
Super Member
  • Total Posts : 2289
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: PIC10F200 2019/03/02 17:02:42 (permalink)
0
I'm not familiar with the development board you show in post #15. The jumpers probably map the ICSP signals from the header to the PIC pins for various parts.
 
To read a pushbutton, connect it from an input pin to GND, and use a pull-up resistor (internal or external) to hold the input logic high (1). Loop and check for a logic low (0) when button is pressed, and drive the LED accordingly. Give it a try and post your code if it doesn't work. You can use the debug header and trace execution to see what's going on.

 
#17
dejan991
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2019/01/27 13:44:05
  • Location: 0
  • Status: offline
Re: PIC10F200 2019/03/04 12:24:46 (permalink)
0
I do not know how to set the start for the switch. I used the below example where the snapshot of initialization for GP2. How would I do switch to GP3?

I used this example:

// PIC10F200 Configuration Bit Settings
// 'C' source line config statements
// CONFIG
#pragma config WDTE = OFF // Watchdog Timer (WDT disabled)
#pragma config CP = OFF // Code Protect (Code protection off)
#pragma config MCLRE = ON // Master Clear Enable (GP3/MCLR pin function is MCLR)
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
#include <xc.h>
#define _XTAL_FREQ 4000000
int main(void)
{
TRISGPIO=0;
OPTION=0b11011111; // T0CS=0, so enable GP2 as GPIO
OSCCALbits.FOSC4=0; // FOSC4=0, so enable GP2 as GPIO

while (1)
{
GPIO=0xFF;
__delay_ms(250);
GPIO=0;
__delay_ms(250);
}
return 0;
}

#18
qhb
Superb Member
  • Total Posts : 9998
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: PIC10F200 2019/03/04 12:31:19 (permalink)
0
dejan991
I do not know how to set the start for the switch. I used the below example where the snapshot of initialization for GP2. How would I do switch to GP3?

It is not clear what you are actually asking.
 
The comments in that code are just documenting things that have been done to free up GP2 to be a general purpose I/O pin, it's not doing anything else special with GP2.
After that, it is toggling the state of ALL GPIO pins.
 
WHAT do you want to do with GP3?

Nearly there...
#19
Howard Long
Super Member
  • Total Posts : 676
  • Reward points : 0
  • Joined: 2005/04/04 08:50:32
  • Status: offline
Re: PIC10F200 2019/03/04 14:40:46 (permalink)
0
Quick comment about GP3, it’s another ‘special’ GPIO in that it’s input only, and shared with MCLR.

Other than GP3, GP2 was probably the worst case pin for me to choose as there are settings I commented in the code that are essential or else it gets used for non-GPIO functions. Worse still, you can’t do bit manipulation on the OPTION register, you have to set all bit fields together.

However, it is educational!

PIC10F32x series is probably a better option these days, it’s the same form factor but much less nonsense from historic limitations.
#20
Page: 12 > Showing page 1 of 2
Jump to:
© 2019 APG vNext Commercial Version 4.5