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

Configuration Bit Option Problem

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







Configuration Bit Option Problem
PostPosted: Thu Jul 24, 2003 10:54 am     Reply with quote

Thanks in advance for any help.

I am using for the first time the PIC18F2320

My problem is I cannot get the crystal to Oscillate with MCLR is high.

I know this chip has many fuses for internal & external oscillator, power modes, oscillator switch modes.

What I am seeing on scope if MCLR is LOW the Oscillator is running. If MCLR is HI (for normal operation) the oscillator starts then stops after approx 1/2 sec. There must me some power mode or oscillator switch mode that disables the oscillator.

WHAT FUSES DO I USE TO DISABLE THIS. I have used the 18F252 with no problems.


MY current Fuses are

#FUSE HS, NOWDT, NOPROTECT, NOLVP, PUT

I know there are other fuses for power modes, oscillator switch modes like IESO, NOIESO, MCLR, NOMCLR, FCMEN, NOFCMEN

Thanks again for any help.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516315
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Configuration Bit Option Problem
PostPosted: Thu Jul 24, 2003 3:50 pm     Reply with quote

:=What I am seeing on scope if MCLR is LOW the Oscillator is running. If MCLR is HI (for normal operation) the oscillator starts then stops after approx 1/2 sec. There must me some power mode or oscillator switch mode that disables the oscillator.
-----------------------------------------------------------
This problem could be caused by letting your program
fall through the end of main(). CCS puts a SLEEP instruction
there, and this would cause the oscillator to stop.

Example:

main()
{
printf("Hello World\n\r");


}

The program above will execute and then the oscillator will
stop. That's because it hits the hidden SLEEP instruction
at the end of main(). To prevent this problem, put a "forever"
loop at the end of main(). Example:

main()
{
printf("Hello World\n\r");

while(1);
}
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516330
Jerry.I
Guest







Re: Configuration Bit Option Problem
PostPosted: Thu Jul 24, 2003 4:26 pm     Reply with quote

This is not an issue of the Pic going to sleep. I have compiled the same program using the device 18F252 and all runs fine.

I still think it can be a problem with the configuration bits.

Thanks.



:=:=What I am seeing on scope if MCLR is LOW the Oscillator is running. If MCLR is HI (for normal operation) the oscillator starts then stops after approx 1/2 sec. There must me some power mode or oscillator switch mode that disables the oscillator.
:=-----------------------------------------------------------
:=This problem could be caused by letting your program
:=fall through the end of main(). CCS puts a SLEEP instruction
:=there, and this would cause the oscillator to stop.
:=
:=Example:
:=
:=main()
:={
:=printf("Hello World\n\r");
:=
:=
:=}
:=
:=The program above will execute and then the oscillator will
:=stop. That's because it hits the hidden SLEEP instruction
:=at the end of main(). To prevent this problem, put a "forever"
:=loop at the end of main(). Example:
:=
:=main()
:={
:=printf("Hello World\n\r");
:=
:=while(1);
:=}
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516331
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