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 support@ccsinfo.com

10F222 and PICKit 2 : Don't program the PIC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PFUM



Joined: 17 Feb 2012
Posts: 2
Location: France

View user's profile Send private message

10F222 and PICKit 2 : Don't program the PIC
PostPosted: Thu Feb 23, 2012 10:31 am     Reply with quote

Hi to all,

I can't program a PIC 10F222 with the PICKit 2. The program is very simple, it makes just a led flash.

I believe that it is in technical trick.

My HW is very simple.
Only one led pin GP2 and One led pin GP3. Put Pull-Up (4k7) on the pin 8.
My little board is connected by the 6 points connector of the PicKit 2.

The program is generated with CCS last version. Thank you for your help because I found nothing on the forum about this problem.

Best regards.

The C Code by CCS :
Code:

#include <main-new-10F222.h>

void main()
{

   //Example blinking LED program
   while(true)
   {
      output_low(LED);
      delay_ms(DELAY);
      output_high(LED);
      delay_ms(DELAY);
   }

}

Code:

#include <10F222.h>
#device adc=8

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES                       

#use delay(clock=8000000)

#define LED PIN_B2
#define DELAY 1000
temtronic



Joined: 01 Jul 2010
Posts: 9162
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Feb 23, 2012 1:33 pm     Reply with quote

What is the source for the 8,000,000 Hz clock ?

You have not chosen one according to your FUSES options.


Also are you saying the PICkit doesn't program the PIC or that the PIC doesn't run your program the way you think it should ???
PFUM



Joined: 17 Feb 2012
Posts: 2
Location: France

View user's profile Send private message

PostPosted: Thu Feb 23, 2012 1:46 pm     Reply with quote

I use internal clock.
Ok for the definition of the fuses, but i don't define with ccs this fuses.
Could you indicate me the typical fuses configuration?

Thanks for your help.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Feb 23, 2012 2:41 pm     Reply with quote

Use the forum's search page:
http://www.ccsinfo.com/forum/search.php
Do a search for 10F222. You will find several demonstration programs.
Most of them are from me. They will show you how to setup the #fuses
and anything else you need for that PIC.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion 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