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

18F4550 don't start, why?

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



Joined: 27 Apr 2008
Posts: 167

View user's profile Send private message Send e-mail MSN Messenger

18F4550 don't start, why?
PostPosted: Sat Apr 03, 2010 3:19 pm     Reply with quote

Hi all,

I am changing one slave 16F877A for a new 18F4550. I tried everything to put the processor to start, but no deal, anybody can help me?

I use 20MHz crystal, and I need to run the chip as faster as possible. I don't use USB in my application.

Here are the fuses, I think the problem is here.
Code:

#fuses HSPLL,USBDIV,PLL5,CPUDIV1,VREGEN,NOWDT,NOPROTECT,NOLVP,NODEBUG
#use delay(clock=48000000)

Best regards.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Apr 03, 2010 9:59 pm     Reply with quote

Quote:

I use 20MHz crystal.

First try blinking an LED with the PIC running at 20 MHz, as shown in
the program below. Does this work ?
Code:

#include <18F4550.h>
#fuses HS, NOWDT, PUT, BROWNOUT, NOLVP
#use delay(clock=20000000)

//====================================
void main()
{

// Blink an LED on pin B0.
while(1)
  {
   output_high(PIN_B0);   
   delay_ms(500);
   output_low(PIN_B0);
   delay_ms(500);
  }

}


If that works, change the fuses to run in PLL mode:
Code:

#include <18F4550.h>
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,USBDIV,PLL5,CPUDIV1
#use delay(clock=48000000)

//==========================
void main()
{

while(1)
  {
   output_high(PIN_B0);
   delay_ms(500);
   output_low(PIN_B0);
   delay_ms(500);
  }

}
rudy



Joined: 27 Apr 2008
Posts: 167

View user's profile Send private message Send e-mail MSN Messenger

PostPosted: Sun Apr 04, 2010 5:59 am     Reply with quote

Yes, the problem was the port address, I was calling 0x80 but, in 18F4550 is 0xf80.

works fine now,

regards.
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