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

Odd behavior with 18F25K50....

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



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

Odd behavior with 18F25K50....
PostPosted: Tue Feb 03, 2015 1:33 pm     Reply with quote

Hi All,

I'm attempting to use an 18F25K50 device for the first time, and I'm encountering some odd behavior. I'm starting with a simple test program
to flash an LED, but rather than flash a few times and stop, it flashes indefinitely. Also, if I specify a delay greater than 255 uS, the code just
hangs, and doesn't run at all..... I am using a 20MHz crystal. Compiler is v5.039.

Code:

#include <18F25K50.h>
#fuses HSM,NOWDT,NOPROTECT,NOLVP,NODEBUG,NOFCMEN,NOPLLEN
#use delay(crystal=20000000)

//-----< General Program Defines >-----
#define Pwr_LED Pin_A4         // Power LED on Temp Module Brd.

//======================================
void main(void)
{
   int8 iIndex;

   output_low(Pwr_LED);

   // Here we blip the Power LED at power-up to show that the interface is working
   for ( iIndex = 0 ; iIndex < 4 ; iIndex++ )
   {
      output_high(PWR_LED);
      delay_ms(250);
      output_low(PWR_LED);
      delay_ms(250);
   }

   while(1){}
}


Thanks,

Jack
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 03, 2015 1:39 pm     Reply with quote

Quote:
Compiler is v5.039

According to their version list, they skipped that version:
http://www.ccsinfo.com/devices.php?page=versioninfo
I suggest you upgrade to vs. 5.040. If your maintenance ran out,
ask CCS Support to upgrade you to a working version.
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

PostPosted: Tue Feb 03, 2015 1:57 pm     Reply with quote

Hi,

Thanks for the suggestion, v5.040 fixed the problem!

I bought a new version of the PCH compiler about a week ago, and v5.039 was what I got. I guess it was a really short-lived version Shocked

Jack
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 03, 2015 2:02 pm     Reply with quote

Keep the downloaded .exe file for PCH vs. 5.040 in a safe place. That
way if you ever need to revert to it, you will have it. For example,
suppose you install vs. 5.041 when it comes out, and it's bad. You can
revert to 5.040 and stay functional.
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

PostPosted: Tue Feb 03, 2015 3:11 pm     Reply with quote

Hi PCM,

That's a good idea, however, there is something about this that I'm clearly missing. I have both the PCM & PCH compilers, yet I only see one 'Ccsc.exe' file in my compiler directory, 'C:\Program Files\PICC'. Is that the 'compiler', or is it some sort of a 'wrapper' program that invokes the correct compiler (PCM or PCH) at compile time? What are the file names of the actual compiler executables, and where are they generally stored? I'm running Windows 7.

Thanks,

Jack
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 03, 2015 3:28 pm     Reply with quote

Look in the DLL directory within the CCS (PICC) directory.
JAM2014



Joined: 24 Apr 2014
Posts: 138

View user's profile Send private message

PostPosted: Tue Feb 03, 2015 4:18 pm     Reply with quote

Hi PCM,

Great, got it, thanks!

Jack
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