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

Fuses for dsPIC30F6012A

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



Joined: 25 Jan 2010
Posts: 36

View user's profile Send private message

Fuses for dsPIC30F6012A
PostPosted: Mon Jan 25, 2010 1:47 am     Reply with quote

hello all

I have a question about general pic programming with the CCS IDE:
could there be any bugs?

Because I would set the fuses for a dsPIC30F6012A with external 40MHz oscillator.

In the project wizard I could set the following fuses:
Code:

Inserted into .h file:

#device *=16
#device adc=8

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES HS                       //High speed Osc (> 4mhz)
#FUSES LP                       //Low power osc < 200 khz
#FUSES NOCKSFSM                 //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES WPSB1                    //Watch Dog Timer PreScalar B 1:1
#FUSES WPSA1                    //Watch Dog Timer PreScalar A 1:1
#FUSES PUT64                    //Power On Reset Timer value 64ms
#FUSES BROWNOUT                 //Reset when brownout detected
#FUSES BORV20                   //Brownout reset at 2.0V
#FUSES LPOL_HIGH                //Low-Side Transistors Polarity is Active-High (PWM 0,2,4 and 6)
   //PWM module low side output pins have active high output polar
#FUSES HPOL_HIGH                //High-Side Transistors Polarity is Active-High (PWM 1,3,5 and 7)
   //PWM module high side output pins have active high output polarity
#FUSES NOPWMPIN                 //PWM outputs drive active state upon Reset
#FUSES MCLR                     //Master Clear pin enabled
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOWRT                    //Program memory not write protected
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOCOE                    //Device will reset into operational mode
#FUSES ICS0                     //ICD communication channel 0

#use delay(clock=40000000)

What is this:
Code:

#FUSES HS                       //High speed Osc (> 4mhz)
#FUSES LP                       //Low power osc < 200 khz

I think that this could not be ok.

The PIC should work at the maximum frequency (16xPLL ?).

Sorry for these questions but I changed from AVR to PIC and there are many differnces...

Thank you for helping.
Best regards
P51D
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 25, 2010 1:45 pm     Reply with quote

Quote:

#FUSES HS //High speed Osc (> 4mhz)
#FUSES LP //Low power osc < 200 khz
I think that this could not be ok.

I would set the fuses for a dsPIC30F6012A with external 40MHz oscillator.

Download the PIC data sheet:
http://ww1.microchip.com/downloads/en/DeviceDoc/70143D.pdf
Look in this section:
Quote:
TABLE 20-1: OSCILLATOR OPERATING MODES

ECIO -- External clock input (0-40 MHz), OSC2 pin is I/O

It lists ECIO as the correct oscillator fuse setting. Delete the HS and LP
fuses. Use this:
Code:
#fuses ECIO
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