AtomSoft
Well-Known Member
Im lost on this PIC lol i never touched PIC32 and now i know why. How the heck do i setup the OSC? There are so many settings... so far i have this: (using XC32)
I dont know if this is even good also do i have to setup registers as well ? I need some help big time. Would love a simple BLINK example if anyone can supply it.
I have a 8MHz OSC on the chip and know that i can only make that 48MHz (8mhz / 2 (div) * 24(mul) / 2 (div) = 48MHz) or something like that lol
Thank You to the kind soul who chimes in
Code:
/*
* File: blink32.c
* Author: Jason
*
* Created on February 27, 2014, 5:23 PM
*/
#include <stdio.h>
#include <stdlib.h>
#include <xc.h>
#pragma config PMDL1WAY = OFF,IOL1WAY = OFF , WINDIS = OFF,ICESEL = ICS_PGx1,FWDTEN = OFF
#pragma config FPLLIDIV = DIV_2, FPLLMUL = MUL_24, FPLLODIV = DIV_2,FNOSC = PRIPLL,POSCMOD = XT,FPBDIV = DIV_1 // OSC
#pragma config UPLLIDIV = DIV_2,UPLLEN = ON, //USB OSC
/*
*
*/
void main ()
{
}
I dont know if this is even good also do i have to setup registers as well ? I need some help big time. Would love a simple BLINK example if anyone can supply it.
I have a 8MHz OSC on the chip and know that i can only make that 48MHz (8mhz / 2 (div) * 24(mul) / 2 (div) = 48MHz) or something like that lol
Thank You to the kind soul who chimes in