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

dsPIC30F6010A can't set oscillator

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



Joined: 24 Aug 2010
Posts: 1

View user's profile Send private message

dsPIC30F6010A can't set oscillator
PostPosted: Tue Aug 24, 2010 2:40 am     Reply with quote

Hello,

I'm using CCSC PCD Compiler with MPLAB. I want to use my pic with the FRC and PLL16.

When I write it on top of the file, #fuses FRC_PLL4, the compiler says:

"The configuration bits in the field are invalid and may cause problems if programmed. Do you want to set them to their default values? Please note that you will need to rebuild the file or export memory again to correct the file.
Config Field: FOSFPR" yes / no ?

Clicking yes resets it to FRC only, when clicking no the pic isn't working.

----------

When I try to set the oscillator under configure/configuration bits, the oscillator always resets to XT.

----------

I also already tried a inline assembly routine:
Code:

   #ASM      
      MOV #0x0000, W0   
      MOV.B #0x03, W0      
      MOV.B #0x78, W1      
      MOV.B #0x9A, W2      
      MOV #0x0742, W3      // 0x0742 address of OSCCON
      MOV.B W1, [W3+1]   
      MOV.B W2, [W3+1]      
      MOV.B W0, [W3+1]
      CLR.B W0      
      MOV.B #0x46, W1      
      MOV.B #0x57, W2      
      MOV.B W1, [W3+0]      
      MOV.B W2, [W3+0]      
      MOV.B W0, [W3+0]   
   #ENDASM

When I'm using pickit 3 as debugger and watch the OSCCON register, it is not changing.

Please help me!

thx, thee_gimp
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