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

simple problem..

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







simple problem..
PostPosted: Thu Oct 09, 2008 9:21 am     Reply with quote

Hi
I was migrating from pic16f690 to pic16f88.
I wrote this simple program and the led turn 'on' and stay 'on' without blinking... after a while turns off .......why is that?
I don't know something about this pic ?????

Code:
#include <16F88.h>
#fuses XT,NOWDT,NOPROTECT,put
#use delay(clock=8000000)
             
void main() {

WHILE(1)
{
OUTPUT_HIGH(PIN_B1);
DELAY_MS(500);
OUTPUT_LOW(PIN_B1);
DELAY_MS(500);
}


}
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Thu Oct 09, 2008 9:52 am     Reply with quote

Quote:
#fuses XT,NOWDT,NOPROTECT,put

You need to use HS instead of XT in your FUSES statement.
JENIFFER
Guest







PostPosted: Thu Oct 09, 2008 11:14 am     Reply with quote

Tried this - its not working !

led is stay ON and not blink..

anyone ??
thanx.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Thu Oct 09, 2008 11:58 am     Reply with quote

I assume (we all know what that means) that you are aware that the two PICs are of different pinout sizes. Make sure you have changed the VCC & VSS to match the new part. Make sure you have the spec. sheet and have all of your connections done properly.

If you are using a crystal oscillator, try the following fuses:

HS, NOWDT, PUT, NOMCLR, NOBROWNOUT, NOLVP, NOCPD, NODEBUG, NOPROTECT, NOFCMEN

Some of the fuse statements really aren't necessary but I put them in to make sure. You really don't give much information. See if this will help you get started.

Ronald
jeniffer
Guest







PostPosted: Thu Oct 09, 2008 12:12 pm     Reply with quote

i dont use crystal , i have checked all pins and they are good.
when i program the PGM pin is connected to ground with 700ohm resistor.
all other pins connected to PICKIT2 as well.(power from usb ).
do i have to disconnect the PGM from ground after programming?
the pickit says that programming succes-does he really knows that program is setting good at the chip ?

the relevant led is turned ON but cant turned off...

thanx.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 09, 2008 12:33 pm     Reply with quote

Quote:
I dont use crystal.

See the fuse settings in this program:
http://www.ccsinfo.com/forum/viewtopic.php?t=29961&start=4
jeniffer
Guest







PostPosted: Thu Oct 09, 2008 2:28 pm     Reply with quote

Thanx ! working !

but why is that? how can i know the fuses in each case ??
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Oct 09, 2008 2:44 pm     Reply with quote

Read the datasheet for your PIC. In the oscillator section all possible setup configurations are discussed including the required fuses. Sometimes CCS uses different names for the fuses, see the top of the header file for your chip for all supported fuse names.

A short explanation of the fuse names can be found in the file fuses.txt supplied with the Windows versions of the compiler.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 09, 2008 2:45 pm     Reply with quote

Look in this directory to see if you have the Fuses.txt file. It lists all the
fuses and explains each one briefly. You only get the Fuses.txt file if
you have the full IDE compiler (PCW, PCWH, or PCWHD).
Quote:
c:\Program Files\PICC


If you don't have the Fuses.txt file, then look at this thread.
It lists some of the fuses.
http://www.ccsinfo.com/forum/viewtopic.php?t=31698
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Oct 09, 2008 4:05 pm     Reply with quote

If you don't have the Fuses.txt file, someone has posted it in
another forum. It's near the end of this page:
http://www.todopic.com.ar/foros/index.php?topic=16947.0

I think it also comes with the CCS Demo, because that has
the full IDE compiler in it.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

i use the F887 for many prods- here is the fuse you want
PostPosted: Thu Oct 09, 2008 6:22 pm     Reply with quote

if using internal osc
you want
#FUSES INTRC, and so on

for the F887
a common statement i use to get ALL I/O freed up and do develepment of nonprotected code programs is

#FUSES NOPROTECT, INTRC,NOWDT,NOMCLR, NODEBUG,NOLVP,NOIESO,NOFCMEN, PUT,NOWRT,NOFCMEN,NOBROWNOUT,



FOR SURE NOT XT - thats
jenniffer
Guest







PostPosted: Sat Oct 11, 2008 6:25 am     Reply with quote

thank you all.
i found the txt file but i never see the fuses in datasheets. never.
you really helped me each one of you.
thanx.
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