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

PIC16f1789 Crystal Mode
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hunter07



Joined: 28 Dec 2005
Posts: 12

View user's profile Send private message

PostPosted: Wed Sep 27, 2017 12:09 pm     Reply with quote

I have updated the lst file..

blinking period is still ~19 sec
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Wed Sep 27, 2017 12:13 pm     Reply with quote

What do you mean by "updated the lst file"?
hunter07



Joined: 28 Dec 2005
Posts: 12

View user's profile Send private message

PostPosted: Wed Sep 27, 2017 12:22 pm     Reply with quote

I re-create the .lst file with Ttelmah code, as he suggested 3-4 message before
newguy



Joined: 24 Jun 2004
Posts: 1903

View user's profile Send private message

PostPosted: Wed Sep 27, 2017 12:28 pm     Reply with quote

...by recompiling the program? Sorry, it's just that I'm not 100% clear on whether you edited the lst file or you edited the program, which in turn generates the lst file.
hunter07



Joined: 28 Dec 2005
Posts: 12

View user's profile Send private message

PostPosted: Wed Sep 27, 2017 12:53 pm     Reply with quote

Ttelmah wrote:
Compile the code as I posted it. Just change A0 to C7 for your LED.

You have added and duplicated several fuses, and removed a couple of critical lines. If you look at what your code generates for fuses:
Code:

Configuration Fuses:
   Word  1: 3FC2   HS NOWDT PUT MCLR NOPROTECT NOCPD BROWNOUT NOCLKOUT IESO FCMEN
   Word  2: 1FFF   NOWRT NOVCAP PLL STVREN BORV19 NOLPBOR NODEBUG NOLVP


Versus what I posted (with your compiler):
Code:

Configuration Fuses:
   Word  1: 1F82   HS NOWDT PUT NOMCLR NOPROTECT NOCPD BROWNOUT NOCLKOUT IESO NOFCMEN
   Word  2: 1EFF   NOWRT NOVCAP PLL_SW STVREN BORV19 NOLPBOR NODEBUG NOLVP


You have turned the PLL back on. This will almost certainly prevent the clock from starting, since the internal start-up circuit tests that it is seeing a reasonable clock output before changing away from the internal oscillator. With the PLL enabled, this will not be the case...

I have deliberately set this code up so it will not start if the crystal is not running. You have also removed this.


So made some modification and recompiled the code..
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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