|
|
View previous topic :: View next topic |
Author |
Message |
GLADKIH_UA Guest
|
PIC24F64GA002 |
Posted: Thu Jan 21, 2010 2:06 pm |
|
|
Hello people. Sorry by my language - I'm from Ukraine. I have a question. I want to have 32Mhz in this PIC.
Code: |
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOJTAG //JTAG disabled
#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 ICSP1 //ICD uses PGC2/PGD2 pins
#FUSES WINDIS //Watch Dog Timer in non-Window mode
#FUSES WPRES128 //Watch Dog Timer PreScalar 1:128
#FUSES WPOSTS16 //Watch Dog Timer PostScalar 1:32768
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES FRC_PLL //Internal Fast RC oscillator with PLL
#FUSES NOCKSFSM //Clock Switching is disabled, fail Safe clock monitor is disabled
#FUSES OSCIO //OSC2 is general purpose output
#FUSES NOPR //Pimary oscillater disabled
#FUSES I2C1SELd
#use delay(clock=32000000)
|
Before programming I see that frequency is not 32Mhz. She is 16Mhz or something like that.
Please help me. And I have question about #Fuses. Where can I read about every #Fuses of this series PIC24F. |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu Jan 21, 2010 3:24 pm |
|
|
You find all fuses details in the Microchip datasheet of the respective chip, in the Special Features/Configuration
Bits paragraph. In addition you should always read the oscillator configuration chapter to understand
the clocking options and configuration parameters of the chip.
I didn't use PIC24 with FRC_PLL yet, but as far as I understand, the fuses are basically correct. The CLKDIV
register RCDIV bits are however defaulting to a divider factor of 2, so you get 16 MHz after PLL. CCS C
has a setup_oscillator() built-in function to set among others CLKDIV register.
Unfortunately, I can't tell you the correct parameters for your setting. If it can't be derived from the given documentation,
I would most likely program the register directly. |
|
|
gladkih Guest
|
|
Posted: Fri Jan 22, 2010 8:57 am |
|
|
FvM wrote: | You find all fuses details in the Microchip datasheet of the respective chip, in the Special Features/Configuration
Bits paragraph. In addition you should always read the oscillator configuration chapter to understand
the clocking options and configuration parameters of the chip.
I didn't use PIC24 with FRC_PLL yet, but as far as I understand, the fuses are basically correct. The CLKDIV
register RCDIV bits are however defaulting to a divider factor of 2, so you get 16 MHz after PLL. CCS C
has a setup_oscillator() built-in function to set among others CLKDIV register.
Unfortunately, I can't tell you the correct parameters for your setting. If it can't be derived from the given documentation,
I would most likely program the register directly. |
thanks for answer. |
|
|
|
|
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
|