Thee_gimp
Joined: 24 Aug 2010 Posts: 1
|
dsPIC30F6010A can't set oscillator |
Posted: Tue Aug 24, 2010 2:40 am |
|
|
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 |
|