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

12F675 Destroying Program ?

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



Joined: 27 Nov 2007
Posts: 7

View user's profile Send private message

12F675 Destroying Program ?
PostPosted: Thu Oct 02, 2008 7:15 am     Reply with quote

Hi.

I am having serious problems with some 12F675.

I developed a program in CCS compiler, but this program is completely destroying all my pics. I burn it in 6 working 12f675 and after I do it the pic just stop work and lose all the id's and fuses and configurations.
What is that ?
I was developing different programs to test, but it is just destroying the pics.
Here is the last example of program that just destroy the 12F675.

Obs.. I am using a JDM programmer and it is working perfect on 16F877a and 12F675 with other codes.

Program version 4.017
I already lose six 12F675. Why ?

Last test destroying program:
Code:

#include "d:\kranz\MaxC\Batevolta.h"

int qntd=0;

void main()
{

   setup_adc_ports(NO_ANALOGS);
   setup_adc(ADC_OFF);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_DISABLED);
   setup_comparator(NC_NC);
   setup_vref(FALSE);
   enable_interrupts(GLOBAL);

   while(1)
   {
   //set_adc_channel(0);
   //delay_us(100);
   //qntd=read_adc();

   if(qntd < 30)
      {
       output_high(pin_a1);
       output_low(pin_a2);
      }
   else
      {
      output_low(pin_a1);
      output_high(pin_a2);
      }
   }

}


And this is the batevolta.h
Code:

#include <12F675.h>
#device adc=8

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES INTRC_IO                 //Internal RC Osc, no CLKOUT
#FUSES NOCPD                    //No EE protection
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOMCLR                     //Master Clear pin enabled
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOBROWNOUT                 //Reset when brownout detected

#use delay(clock=4000000)
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 7:27 am     Reply with quote

Just to clarify what is happening. This code runs OK on a 16F877a and it destroys a 12F675? What do you mean by "destroy"? Does it mean the chip does not run and can no longer be programmed? You can run other code in a 12F675?
_________________
The search for better is endless. Instead simply find very good and get the job done.
kranz



Joined: 27 Nov 2007
Posts: 7

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 7:35 am     Reply with quote

I mean, when I try to burn this code to the 12F675 it just make the 12F675 unusable.
I can't reprogram the chip anymore. Not even to reprogram a blank code.
I also can't check the Oscillator Calibrator Value anymore when I use this code.
The 16F877a example is just to say "Yes I know how to use and program pics." I was also using 12F675 processors, but with other codes, and now I don´t have any 12F675 to use because it is not working anymore to the other codes as well.
drh



Joined: 12 Jul 2004
Posts: 192
Location: Hemet, California USA

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 8:15 am     Reply with quote

From the 12F675 data sheet

Quote:
Note: Erasing the device will also erase the preprogrammed
internal calibration value for
the internal oscillator. The calibration value
must be saved prior to erasing part.


Based on experience with Microchip programmers:
If your programmer doesn't save and restore the calibration value,
you won't be able to re-program the part.
_________________
David
treitmey



Joined: 23 Jan 2004
Posts: 1094
Location: Appleton,WI USA

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

PostPosted: Thu Oct 02, 2008 8:17 am     Reply with quote

Did you see section 10.10 of the spec sheet.
It uses Vdd, Vss, GP0,1,3

figure 10-14

read over that section very carefully, and check wiring.
kranz



Joined: 27 Nov 2007
Posts: 7

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 8:19 am     Reply with quote

Man, the problem is..
I also CAN´T reprogram the calibrator value anymore.
I was using the winpic800, and it restores the value automatically, but after I burn this simple and useless program the pic just stop working!!!
drh



Joined: 12 Jul 2004
Posts: 192
Location: Hemet, California USA

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 8:23 am     Reply with quote

There was an older PromateII firmware version that was not handling this properly. Can you try a different programmer?
_________________
David
kranz



Joined: 27 Nov 2007
Posts: 7

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 8:30 am     Reply with quote

treitmey wrote:
Did you see section 10.10 of the spec sheet.
It uses Vdd, Vss, GP0,1,3

figure 10-14

read over that section very carefully, and check wiring.


I am using a JDM programmer.. And I already used the same programmer to burn others 12F675 codes and that is working!!!

The problem is.. I just burn and it fails and then nothing works anymore..
kranz



Joined: 27 Nov 2007
Posts: 7

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 8:39 am     Reply with quote

drh wrote:
There was an older PromateII firmware version that was not handling this properly. Can you try a different programmer?


I also tried to use the ICprog and the same error occurs.
It just turns all the 12F675s to a completely blank processor and I can't reprogram any more.
I just have now six 12F675 blank processors with no way to restore why? Or have a way to restore this?
Obs. I am not using the code protection. Just have a look at my code.
Guest








PostPosted: Thu Oct 02, 2008 9:58 am     Reply with quote

Hi

I think you should spend some money on a real PIC programmer. In the past I had lot of problems with all kind of low cost programmers.

Microchip's pickit2 is a cheap but good programmer.
jaymiller
Guest







PostPosted: Thu Oct 02, 2008 10:01 am     Reply with quote

Before you lose ALL your hair, can you READ a previously programmed 12F675, say from a currently functioning project?
NOT one of the 'blank' ones..but one you can yank from an 'up and running' board?

This test would at least verify that your programmer + software acknowledge the 12F675 series of chips.


I know, it's mighty frustrating.....like spending a half hour staring at code only to see you didn't cut and paste the ;........arrgh.....

Jay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 02, 2008 12:10 pm     Reply with quote

Quote:
#include <12F675.h>
#device adc=8

#FUSES NOWDT
#FUSES INTRC_IO
#FUSES NOCPD
#FUSES NOPROTECT
#FUSES NOMCLR
#FUSES NOPUT
#FUSES NOBROWNOUT

This problem has been discussed on the internet for years. Use Google
to find it. Here's the search string for Google.
Quote:
JDM programmer 12F675

It finds this thread on the very first hit:
http://www.rcgroups.com/forums/showthread.php?t=433790
kranz



Joined: 27 Nov 2007
Posts: 7

View user's profile Send private message

PostPosted: Fri Oct 03, 2008 11:56 am     Reply with quote

jaymiller wrote:
Before you lose ALL your hair, can you READ a previously programmed 12F675, say from a currently functioning project?
NOT one of the 'blank' ones..but one you can yank from an 'up and running' board?

This test would at least verify that your programmer + software acknowledge the 12F675 series of chips.


I know, it's mighty frustrating.....like spending a half hour staring at code only to see you didn't cut and paste the ;........arrgh.....

Jay


Man..

I already used this JDM programmer a lot of times.. I CAN read any other code in the working processors..
I am saying is just this code!!
kranz



Joined: 27 Nov 2007
Posts: 7

View user's profile Send private message

PostPosted: Fri Oct 03, 2008 12:03 pm     Reply with quote

PCM programmer wrote:
Quote:
#include <12F675.h>
#device adc=8

#FUSES NOWDT
#FUSES INTRC_IO
#FUSES NOCPD
#FUSES NOPROTECT
#FUSES NOMCLR
#FUSES NOPUT
#FUSES NOBROWNOUT

This problem has been discussed on the internet for years. Use Google
to find it. Here's the search string for Google.
Quote:
JDM programmer 12F675

It finds this thread on the very first hit:
http://www.rcgroups.com/forums/showthread.php?t=433790


Thanks man..

Now I understand why.. :D
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