View previous topic :: View next topic |
Author |
Message |
nehallove
Joined: 16 Jan 2008 Posts: 61
|
PIC10F222 Programming issue with ICD - U40 |
Posted: Fri Jun 18, 2010 6:03 pm |
|
|
Hi Guys,
I am trying to program following code on the PIC10F222 chip.
Code: |
#include <10F222.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES PROTECT //Code protected from reading
#FUSES MCLR //Master Clear pin enabled
#FUSES IOSC4 //4MHz oscillator clock
#define IRDA_CLK PIN_B1
#define PWR_CTRL PIN_B2
#define PWR_ON() output_low(PWR_CTRL) //! Power On
#define PWR_OFF() output_high(PWR_CTRL) //! Power Off
void main() {
unsigned int8 i;
unsigned int8 count = 0;
setup_adc(NO_ANALOGS);
setup_adc_ports(NO_ANALOGS);
PWR_OFF();
while(1);
}
|
It gives me a first message saying: couldn't detect target automatically. I press yes to do programming (assuming that pic 10 is not smart enough for autodetection).
Then it gives me message that couldn't erase the flash voltage should be 5 V to erase the full code for protected fuse. I was using 3 V but later i tried with 5 V and result was the same.
Then it tries to program but then comes with verification error, saying that code is not transferred properly. I have everything connected properly. I am using previously programmed chip.
Thank you all.
nehal _________________ nehal |
|
|
nehallove
Joined: 16 Jan 2008 Posts: 61
|
got new chip still doesn't program |
Posted: Mon Jun 21, 2010 12:27 pm |
|
|
Hi All,
I am trying new chips still my ICD doesn't program PIC10F222.
Please help.
nehal _________________ nehal |
|
|
robomaniac
Joined: 16 Jul 2009 Posts: 19 Location: Sherbrooke, Québec, Canada
|
|
Posted: Sun Jul 11, 2010 12:09 pm |
|
|
It is a hardware problem, your code compiles and runs on my 10F222 breadboard setup.
My MCLR is 1K resistor
I have the SOT23 6 pin version so pin 1,3 and 6 are connected to the ICD. _________________ Jérôme Demers
www.jeromedemers.com |
|
|
|