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

damaging 12f629

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



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

damaging 12f629
PostPosted: Wed Aug 29, 2007 10:42 pm     Reply with quote

Dear Sir,
here i am using 12f629, MPLAB 7.5 Ver. & CCS PCM C Compiler, Version 3.249, 34534.

for testing only i did this simple programe,

Code:
#if defined(__PCM__)
#include<12F629.h>
#fuses INTRC_IO,NOWDT,PUT,NOMCLR,PROTECT,NOCPD,BROWNOUT
//Internal RC Osc, no CLKOUT,No Watch Dog Timer,Power Up Time ON,Internal MCLR,Code Protect ON,No EE protection,Brownout detect ON,
#use delay(clock = 4000000)   // INTERNAL 4 MHz FREQ.

void init_CPU();


void main()
{
    init_CPU();
   while(TRUE)   
   {
      OUTPUT_HIGH(PIN_A0);
      DELAY_MS(500);
      OUTPUT_LOW(PIN_A0);
      DELAY_MS(500);
      
      OUTPUT_HIGH(PIN_A1);
      DELAY_MS(500);
      OUTPUT_LOW(PIN_A1);
      DELAY_MS(500);
      
      OUTPUT_HIGH(PIN_A2);
      DELAY_MS(500);
      OUTPUT_LOW(PIN_A2);
      DELAY_MS(500);
      
      OUTPUT_HIGH(PIN_A3);
      DELAY_MS(500);
      OUTPUT_LOW(PIN_A3);
      DELAY_MS(500);
      
      OUTPUT_HIGH(PIN_A4);
      DELAY_MS(500);
      OUTPUT_LOW(PIN_A4);
      DELAY_MS(500);
      
      OUTPUT_HIGH(PIN_A5);
      DELAY_MS(500);
      OUTPUT_LOW(PIN_A5);
      DELAY_MS(500);
   }
}

void init_CPU()
{
   PORT_A_PULLUPS(0x00);
   SET_TRIS_A(0x00);            SETUP_COMPARATOR(NC_NC_NC_NC);   
}

I was tested on this using bread-board. And at o/p i have connected LED
Here no led is flashig also it was damaging 12f629.
Any suggestion appriciated
_________________
Thank You,
With Best Regards,
Deepak.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 29, 2007 10:57 pm     Reply with quote

Do you have series resistors installed on each of the LEDs ?
You need them, to limit the electrical current to a safe level.
Try using 470 ohm resistors.

These are series resistors, not pull-ups.
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Thu Aug 30, 2007 8:43 am     Reply with quote

You may have erased location 0x3FF that contains the internal OSC calibration value set at the factory. It needs a 0x34vv value where vv is the calibration (80 is the mid pt) and 34 a retlw instruction ex value 0x3480. I'm not sure if MPLAB protects this location but if it is erased the Internal OSC won't run.
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