Hello guys
you could give me a hand in passing this code C (Pic33EP256MU806) adapting it to the Pic33MX340F512H.
Configure the clock speed and always a disaster.
Do you know any road or tool that can help?
PLLFBD = 46; //frequenza uscita PLL // M=48
CLKDIVbits.PLLPOST = 0; // N1=2
CLKDIVbits.PLLPRE = 0; // N2=2
OSCTUN = 0; // Tune FRC oscillator, if FRC is used
RCONbits.SWDTEN = 0; // Disable Watch Dog Timer
__builtin_write_OSCCONH(0x03); // Initiate Clock Switch to HSPLL - Clock switching to incorporate PLL
__builtin_write_OSCCONL(0x01); // Start clock switching - Oscillator with PLL (NOSC=0b011)
while(OSCCONbits.COSC != 0b011);
while(OSCCONbits.LOCK != 1) // Wait for PLL to lock - Wait for Clock switch to occur
{ };
srand(TMR1);
Thank you, every help is well accepted.
Convert configuration Pic33EP to 33MX
For questions and comments on programming in general. And for any items that don't fit into the forums below.
Return to “General Programming”
Jump to
- Announcements
- ↳ Announcements
- The Knowledge Exchange
- ↳ Programming Tips & Tricks
- ↳ Freelance Embedded Engineers
- ↳ Article Discussion
- Microcontroller Programming
- ↳ General Programming
- ↳ Flowcode V9
- ↳ Flowcode V8
- ↳ Feature Requests
- ↳ Bug Reports
- ↳ User Components
- ↳ Flowcode V7
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Fixed bugs
- ↳ 8-Bit PIC
- ↳ 16-Bit PIC
- ↳ 32-Bit PIC
- ↳ AVR & Arduino
- ↳ 32-Bit ARM
- ↳ Poll Discussion
- ↳ Flowcode V6
- ↳ Flowcode v6 Beta
- ↳ Bug reports
- ↳ Getting Started
- ↳ User Components
- ↳ Feature requests
- ↳ Bug reports
- ↳ Flowcode V5
- ↳ Flowcode V5 Issues
- ↳ Flowcode V5 Suggestions
- ↳ Flowcode V5 Free Edition
- ↳ Flowcode V4
- ↳ Flowcode 4 Bugs
- ↳ Flowcode 4 Suggestions
- ↳ Flowcode V2 & V3
- ↳ General / Misc
- ↳ Components (Comms)
- ↳ Components (Other)
- ↳ Bugs / Application Errors
- ↳ Suggestions
- ↳ BTEC Unit 6
- ↳ C and ASM Programming
- ↳ E-blocks
- ↳ Formula AllCode
- ↳ Formula Flowcode
- ↳ MIAC
- Language Support Forums
- ↳ Deutsch Support-Forum
- ↳ Forums d'aide en français
- ↳ Foro de soporte español
- Other Matrix products
- ↳ Electronics products
- ↳ Matrix Online Courses
- ↳ Other products
- ↳ CoCo
- Hidden