Fractional divider for RF (SCT is awsome!)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fractional divider for RF (SCT is awsome!)

447 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Thu May 01 12:53:43 MST 2014
Today I wrote a program that does something I wanted a long time ago: the possibility to precisely control the switching frequency of a half bridge driver for exciting a tank circuit well above 1MHz.
Using PCLK and dividing does not yield the required accuracy, because the divider is a small number only. Therefore I used the SCT (split in two) to generate a simple PWM and then use that PWM's output to switch between two fixed frequencies (close to each other) of the other part of the SCT.
The whole logic runs from the SCT alone, no ISR, no software action required!
SCT is so awesome  8-)

Of course, the approach has some flaws and the values have to be chosen carefully, but LPC800 + SCT makes things possible that weren't feasible with a 100MHz LPC1700!

Original Attachment has been moved to: sct.c.zip

Labels (1)
0 Kudos
3 Replies

340 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Sat May 03 14:48:00 MST 2014
Hi All,
Just want to add here. LPC1500 has two large SCTimer/PWM blocks and 2 small SCTimer/PWM blocks. Both large SCTimer/PWM blocks have dithering feature. You can program a pattern in factional match/fraction match reload register. Dithering also has an advance feature. You can control dithering using dither condition register. When the Dither Condition register contains all zeroes (the default value), the dither engine advances to the next count in the dither pattern every time the SCTimer counter reaches zero (i.e. at the start of every new SCT counter cycle). However, it is possible, using this register, to alter that behavior by qualifying the advancement through the dither pattern with designated events.
0 Kudos

340 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MarcVonWindscooting on Fri May 02 04:50:25 MST 2014
After writing the program above I had a look at the LPC1500 SCR cookbook and read about the dithering.
I'm the type of person who does search for solutions only after writing an own one, to find out, if the approaches converge. This gives more chance to new ideas.

No I didn't notice, that LPC43xx has that feature, too. Thanks for the information, I have one of these  :)

The hardware dithering saves one SCT (used just for the switching) and allows faster frequency switching for quite a few ratios (3/16, 5/16, 6/16, 7/16, ...). On the other hand, the SW approach can do (1/10, 2/10, ....).

0 Kudos

340 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Fri May 02 02:58:36 MST 2014
Did you notice that some SCTs come with dithering (on LPC43xx flash parts, large SCTs on LPC15xx)?
0 Kudos