CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC10F222 Programming issue with ICD - U40

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
nehallove



Joined: 16 Jan 2008
Posts: 61

View user's profile Send private message

PIC10F222 Programming issue with ICD - U40
PostPosted: Fri Jun 18, 2010 6:03 pm     Reply with quote

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

View user's profile Send private message

got new chip still doesn't program
PostPosted: Mon Jun 21, 2010 12:27 pm     Reply with quote

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

View user's profile Send private message Visit poster's website

PostPosted: Sun Jul 11, 2010 12:09 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group