Page 1 of 1

PIC32MX575 @ 80MHz

Posted: Fri Jun 25, 2021 9:57 am
by Kisen
Hi,

I am attempting to set up a PIC32MX575 @ 80MHz

I am using 8MHz crystal, so looking on other forums and the datasheet, i need to divide by 2and multiply by 20.

FPLLIDIV = DIVIDE BY 2
FPLLMUL = MULTIPLY 20
FPLLODIV = DIVIDE BY 1
FPBDIV = DIVIDE BY 2

Clock speed is set to 80MHz for timing.

With my flowchart turning an LED on and off with 1 second intervals, i am getting real life at 0.5 seconds. So its running 2x faster.
Since flowcode should be set up for 80Mhz this seems to indicate that my hardware is running at 160Mhz?

Changing FPLLIDIV to DIVIDE BY 4 corrects to clock, but by the numbers, flowcode is set up for 40Mhz with a clock speed setting of 80MHz,.
So something is off somewhere.....

Am i on the right track here, or am i missing something?

I have attached the .fcfx file for you to take a look at if it helps. Its current setup is FPLLIDIV / 2 which is running 2 x fast.

Re: PIC32MX575 @ 80MHz

Posted: Fri Jun 25, 2021 10:18 am
by Kisen
More info.

I have tried to get the UART to work so i can output to terminal.
In both of the above setups, i receive jargon from the PIC. Suggesting again that timings are off.

Re: PIC32MX575 @ 80MHz

Posted: Fri Jun 25, 2021 10:29 am
by kersing
Have you tried setting the serial speed of the computer to twice your target speed or half of it to see it that produces the correct output? That would prove your theory.

Re: PIC32MX575 @ 80MHz

Posted: Fri Jun 25, 2021 10:45 am
by Kisen
Good shout Kersing.

So, in order to get the serial to work, i am sending at 9600 from the PIC but receiving on the terminal at 4800. 2x slower

So heres what i have now set up.

8MHz crystal.
FLOWCODE CLOCK SPEED SET TO 80MHz

FPLLIDIV = DIVIDE BY 4
FPLLMUL = MULTIPLY 20
FPLLODIV = DIVIDE BY 1
FPBDIV = DIVIDE BY 1

All of the above i work out to running at 40Mhz, even tho Flowcode is set to 80mhz. This allows a 1 second LED blink to run on hardware properly.
Changing FPLLIDIV to /2 allows the UART to run at the correct speed of 9600. But the LED now blinks at 0.5 second intervals.

Since the UART works at the correct speeds, is this likely just a delay code issue?

Re: PIC32MX575 @ 80MHz

Posted: Thu Jul 01, 2021 9:08 am
by SpeedPIC32
Hello Cushion

have a look at the settings in Excel that will already help you :)

greetings SpeedPic32
PIC32_OSC_CONFIG_v1.1.xlsx
(451.21 KiB) Downloaded 306 times

Re: PIC32MX575 @ 80MHz

Posted: Thu Jul 01, 2021 9:32 am
by SpeedPIC32
Hello Kissen
sorry my tool translated your name with


write this into a C code field
UxBRG=108; // set uart 1 to 9600
x is to be replaced by your rs232 number
replace the number 108 with the value BRG0 or BRG1 from the tool brg nr then everything should work

greetings SpeedPic32

unzip the brg zip and start the exe
BRG.zip
(3.44 MiB) Downloaded 394 times