piclist 2017\09\07\112803a >
Thread: High Frequency 16 bit PWM Dimming
www.piclist.com/techref/microchip/ios.htm?key=pwm
flavicon
face BY : Kerry email (remove spam text)


I guess I should have been more clear.

The leftmost 10 bits becomes the variable 10bit and the rightmost 6 bits
becomes the variable 6bit, as in:

16bit = 0x1234 = 0b0001 0010 0011 0100
10bit = 0b0001 0010 00 = 0x0048
6bit = 0b11 0100 = 0x34

If your 16bit value was 0x0001, then the 10bit would be 0 and the 6bit
would be 1.
The PWM output would be 0 for 63 cycles, the 1/1024 for 1 cycle.
If your 16bit value was 0x3000, then the 10bit would be 0x300 and the
6bit would be 0.
The PWM output would be 768/1024 for all cycles, so there would be no
dithering.  But 768/1024 is exactly equal to 12288/65536, so no
dithering is needed.

Does that help?

Kerry


On 9/7/2017 12:26 AM, Jim Ruxton wrote:
{Quote hidden}

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
mailman.mit.edu/mailman/listinfo/piclist
<73c1aed4-4708-4336-c2db-8ee700451632@skunkworksnh.com> base64

In reply to: <fed78f36-4895-76bd-35e5-0a412be85b16@gmail.com>
See also: www.piclist.com/techref/microchip/ios.htm?key=pwm
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) High Frequency 16 bit PWM Dimming

month overview.

new search...