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.

Moderators: Benj, Mods

Post Reply
Ferla
Flowcode v5 User
Posts: 126
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 19 times
Contact:

Convert configuration Pic33EP to 33MX

Post by Ferla »

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.

Post Reply