Author Topic: PIC32MX Reference Clock module  (Read 2424 times)

0 Members and 1 Guest are viewing this topic.

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
PIC32MX Reference Clock module
« on: July 24, 2016, 11:21:52 am »
I'm no fan of PIC32 but just noticed a seldom mentioned feature of its oscillator module: ***user programmable*** reference clock out. The module allows you to select a reference source (both internal and/or external), and then it will run it through a 24-bit fractional divider (consisting of a 15-bit integer divider and a 9-bit fractional divider).

This is essentially a full-featured digitally controlled oscillator. with 24-bit of resolution.

Pretty cool to use it as a signal generator, sweeper, ...
================================
https://dannyelectronics.wordpress.com/
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5429
  • Country: gb
Re: PIC32MX Reference Clock module
« Reply #1 on: July 24, 2016, 12:04:36 pm »
I'm no fan of PIC32 but just noticed a seldom mentioned feature of its oscillator module: ***user programmable*** reference clock out. The module allows you to select a reference source (both internal and/or external), and then it will run it through a 24-bit fractional divider (consisting of a 15-bit integer divider and a 9-bit fractional divider).

This is essentially a full-featured digitally controlled oscillator. with 24-bit of resolution.

Pretty cool to use it as a signal generator, sweeper, ...

Depending on the application, it will exhibit significant jitter, it's similar in concept to the NCOs used in some PiC16s.
 

Offline hans

  • Super Contributor
  • ***
  • Posts: 1725
  • Country: 00
Re: PIC32MX Reference Clock module
« Reply #2 on: July 24, 2016, 12:37:55 pm »
It's probably similar to an I2S PLL clock as seen on STM32F4. Because the multiplier is presumably fractional , it's nice to generate the 64x, 128x or 256x bit clocks required for audio.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1758
  • Country: gb
Re: PIC32MX Reference Clock module
« Reply #3 on: July 24, 2016, 01:22:15 pm »
Not only that, you can generate a rather clean 12.288MHz MCLK for DAC's using a 12MHz clock for USB.  This makes life much easier for USB DACs running in either isochronous or async mode.  Some PIC24's have this also. 
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1745
  • Country: aq
Re: PIC32MX Reference Clock module
« Reply #4 on: July 24, 2016, 06:52:44 pm »
I'm no fan of PIC32 but just noticed a seldom mentioned feature of its oscillator module: ***user programmable*** reference clock out. The module allows you to select a reference source (both internal and/or external), and then it will run it through a 24-bit fractional divider (consisting of a 15-bit integer divider and a 9-bit fractional divider).

This is essentially a full-featured digitally controlled oscillator. with 24-bit of resolution.

Pretty cool to use it as a signal generator, sweeper, ...

Depending on the application, it will exhibit significant jitter, it's similar in concept to the NCOs used in some PiC16s.

long time ago i used MX32 but i recall the NCO's in PIC16 is a phase accumulators  "bit skip" while REFOCON in MX32 is PLL
feeding a divider so initial jitter is from PLL while the divider acts as a filter, ie the larger the div ratio the lesser of phase jitter.
Disclaimer for being utterly wrong.

STM32 obviously outperform a MX32 with its multiple 16 by 16 bit divider for every TIMx there is. :)

However i wonder how much worse the RC clock on STM32 are compared to MX32 for USART apps, i recall MX32 RC clock
had really god specs not needing a crystall for high baud rate USART apps, i recall i havent seen any ppm specs for STM32 RC clk?!
« Last Edit: July 24, 2016, 06:55:53 pm by MT »
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5429
  • Country: gb
Re: PIC32MX Reference Clock module
« Reply #5 on: July 24, 2016, 08:59:48 pm »
Nah, while there is a PLL available to derive the system/USB clocks, there is no PLL+VCO inside the reference oscillator config, just a phase accumulator, dressed up in a slightly different way to the NCOs of some PIC16s (which ironically tend to have longer phase accumulators, I guess that's the difference between what Microchip term a reference clock and an NCO).

This is not to denegrate the peripheral, it has real applications, but be aware of the limitations, these are not low jitter DC-to-daylight pure frequency sources, very far from it in fact.
 

Offline MT

  • Super Contributor
  • ***
  • Posts: 1745
  • Country: aq
Re: PIC32MX Reference Clock module
« Reply #6 on: July 25, 2016, 12:08:01 am »
What i meant was the REFOCON clk was derived from the PLL among other sources. So the REFOCON is actually a phase acc, interesting.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf