To avoid 11111111111111111 picture one can change PWM period (not only PWM duty cycle) by writing to the PR2 register too. How about extra look-up table for PR2? Mike. ------------------ P.S. Oleg Blokhin, well-known soccer player ("Dinamo" Kiev) was 11 number. When "Dinamo" battled against "Spartak" in Moscow, he was abused badly by "Spartak" fanatics usually. They shouted extremely offensive jokes based on association of "1" with some part of human body. :-( :-) ----- O tempora! O mores! - Cicero Olin Lathrop wrote: > This topic has gotten a surprising amount of interest. To give the result > explicitly and also show how easy it is to compute, I wrote a program to > generate an MPASM table of logarithmic values. Here is the program: ... > The table generated by this program is attached. ... > retlw 1 ; 1 > retlw 1 ; 2 > retlw 1 ; 3 > retlw 1 ; 4 > retlw 1 ; 5 > retlw 1 ; 6 > retlw 1 ; 7 > retlw 1 ; 8 > retlw 1 ; 9 > retlw 1 ; 10 > retlw 1 ; 11 > retlw 1 ; 12 > retlw 1 ; 13 > retlw 1 ; 14 > retlw 1 ; 15 > retlw 1 ; 16 > retlw 1 ; 17 > retlw 1 ; 18 > retlw 1 ; 19 > retlw 2 ; 20 > retlw 2 ; 21 > retlw 2 ; 22 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu