set 80 MHz into a pic32Mx460f512L

General discussion on mikroBasic PRO for PIC32.
Post Reply
Author
Message
AdrianGA
Posts: 5
Joined: 30 Oct 2019 04:11

set 80 MHz into a pic32Mx460f512L

#1 Post by AdrianGA » 30 Oct 2019 04:29

Hello team.

I want know how i can set 80MHz into a pic32mx460f512l, currently i have an external oscilator with a frequency equal to 48MHz and as i know is not possible use the PLL with an oscilator bigger than 4Mhz, that is right?

when i use the PLL configuration with the 48MHz oscilator to try to set 80MHz, the microcontrolet not work.

the oscilator is : ACOL-48.000MHZ-EK

Wich configuration i need use to set 80Mhz into the microcontroler? thanks.
Attachments
oscilator config.PNG
oscilator config.PNG (54.29 KiB) Viewed 2562 times

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: set 80 MHz into a pic32Mx460f512L

#2 Post by stefan.filipovic » 30 Oct 2019 10:27

Hi Adrien,

Welcome to the MikroE forum.
as i know is not possible use the PLL with an oscilator bigger than 4Mhz, that is right?
That's not correct.
You just need to set the PLL input frequency to get it in the range 4 MHz <= Fin <= 5 MHz, so there are PLL Input divider bits (FPLLIDIV<2:0>). By setting those bits to 111 you will get 4 MHz PLL input frequency.

So, you should be able to use the predefined clock scheme for this specific MCU. Just load this scheme in the Edit Project window: P32MX460F512L_PLL_8_to_80MHz.cfgsch and change PLL input dividers to 12x.

Kind regards,
Stefan Filipović

AdrianGA
Posts: 5
Joined: 30 Oct 2019 04:11

Re: set 80 MHz into a pic32Mx460f512L

#3 Post by AdrianGA » 30 Oct 2019 15:45

Hello stefan.filipovic thaks for the answer and for the wellcome.

i already did the changes you mencioned but the pic still without working. I have an easy program just to validate if the program is working or not, just a bliking LED, i´m usign MikroC pro for pic 32.

Also i already did the chage from XT to HS and EC in the "primary oscillator config"

If i use my external clock without pll "48Mhz" is working, but when i try to use the pll first get 4MHz (48/12)=4Mhz, then (4*12)/1=80MHz is not workin.

With an osciloscope i reade the signal of my external oscillator and is working.

i hope you can help me with this.

Thanks.
Attachments
1.PNG
1.PNG (52.73 KiB) Viewed 2546 times

AdrianGA
Posts: 5
Joined: 30 Oct 2019 04:11

Re: set 80 MHz into a pic32Mx460f512L

#4 Post by AdrianGA » 30 Oct 2019 16:42

I have some doubts.

I found in the datasheet something related with the oscilators, acording teh picture, that means the microcontroler only accept externar oscilator between 3MHz and 25MHz? that means is not allow me an oscilators equal to 48MHz?

Thanks.s
Attachments
oscilator.PNG
oscilator.PNG (19.01 KiB) Viewed 2546 times

AdrianGA
Posts: 5
Joined: 30 Oct 2019 04:11

Re: set 80 MHz into a pic32Mx460f512L

#5 Post by AdrianGA » 31 Oct 2019 15:22

Hey hello.

Seems i found the problem, i shared a print screen with the configuration to have 80MHz with the internal oscillator, also i already tried with the external oscillator "acol 48MHz" just changed the divisor and enable primary oscillator to EC, in both cases the configuration worked.

Seems the problem is teh parameter "internal/external swithc over" if i set to disable this parameter, is where the configuration to set to 80MHz not work, but if i set to enable this paremeter is where the configuration work.

To test and verify if this configuration works, i set a timer using like 80MHz my OSC on my calculates to have pulse with a 100ms in hight edge and 100ms in low edge and also with other times.

This i made with testing and erros, but at the end i don know why is necesary enable the "internal/external swithc over" parameter becasue ussually i set it on "disable".

Thanks.
Attachments
oscillator2.PNG
oscillator2.PNG (73.49 KiB) Viewed 2533 times

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: set 80 MHz into a pic32Mx460f512L

#6 Post by stefan.filipovic » 31 Oct 2019 17:16

Hi,

Please refer to the following forum post:
https://www.microchip.com/forums/m986739.aspx

Kind regards,
Stefan Filipović

AdrianGA
Posts: 5
Joined: 30 Oct 2019 04:11

Re: set 80 MHz into a pic32Mx460f512L

#7 Post by AdrianGA » 31 Oct 2019 23:25

Thanks for all the support :)

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: set 80 MHz into a pic32Mx460f512L

#8 Post by stefan.filipovic » 01 Nov 2019 09:35

Hi,

You're welcome.

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroBasic PRO for PIC32 General”