News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

PIC16F15376 NCO

Started by JonW, Jan 24, 2023, 05:19 PM

Previous topic - Next topic

JonW

#20
No i dont think so Sean.  The instantaneous output is still a square wave and if you do an instantaneous fft you will still have the harmonics.  Look at the persited trace showing the frequency deviation.  The amplitude or spectral power in the frequency domain  will be aggregated over the bandwidth of the averaged frequency error, much like a modulated carrier but due to the small frequency error, this will be very small. The larger the error the more the higher order harmonics will deviate and be aggregated  but this is absolutely not intentional but rather  intrinsic to the architecture of the NCO within the MCU

Nco .. the way that  I view it

The jitter is caused from the varying overflow for non 2^n division of accumulator and in this scenario the frequency  averages over time and will be seen as a degredation in phase noise aka jitter. If the increment is a 2^n division then there is no carry/error , thus remains jitter free but still a squarewave (with no jitter) and is a pure division of the clock.  In this instance the jitter will improve at a rate of 20*Log(divisor) or bounded by the noise floor of the circuits or KTB (Thermal noise).  Proof it's not intentional

It's just an adder with carry which cycles a flip flop on overflow so unless you  increment with an  exact  division of the adder you will always overflow and have a carry. Jitter is created by the NCO ( the flipflop is just the divider and thus creates the harmonics)   The carry will vary with time/each overflow and hence so does the frequency which is the jitter.  The output is still from a very , very fast CMOS flipflop and unfiltered = hideous harmonics.

Brain Fart.. This is another subject worthy of discussion on the CLC speeds as these can be a test bed for the FT of the process.  The latest pics are on much smaller geometries and are prime for overclocking.  The newest 8 bit Pics running at 200MHz?

Sean, are you thinking of dithering;  introduction of noise to randomise the higher order harmonics. Unfortunately not in a crappy 8 bit pic 😕   :)

SeanG_65

Maybe I'm reading it wrong, but take a look at microship TB3131 page 3. I'm not saying you are wrong, and in fact I agree with you as that is the conventional wisdom on the subject. I think you might be right on the dithering thing, there is so much to this subject I often find myself mixing up things.

JonW

#22
HA HA I had a look Sean, Good old Microchip is trying to claim its intentional jitter that is introduced!!  if you look carefully at the frequency spectrum, it's precisely what I have said above, and hardly any change in the amplitude.
Good detailed description of the hardware though

GaryC

Nothing like a long winded Engineering discussion to let me know how much I don't know, I love it.
Keep up the good projects as a inspiration to me and others.
Gary

SeanG_65

Same here Gary. I have ONE REAL regret in life, which is that there is so much that I want to learn and understand, I need a few more lifetimes to do so.