Author | Stef Mientki, Copyright (C) 2002-2006, all rights reserved. |
Adapted-by | Sebastien Lelong |
Compiler | >=2.4g |
performs PWM operations on CCP3 The target must support this.
this is a heavy refactoring of the original pwm_hardware.jal Stef's lib
pwm3_on()
pwm3_set_dutycycle_highres(word in duty)
pwm3_set_percent_dutycycle(byte in percent)
pwm3_set_dutycycle(byte in duty)
pwm3_off()
var byte ccp3con_shadow = 0
No documentation found
var byte ccpr3l_shadow = 0
No documentation found
pwm3_on()
No documentation found
pwm3_set_dutycycle_highres(word in duty)
sets dutycyle in high resolution mode the word passed to the procedure represents the high resolution value of the duty cycle: * duty3h<0:1> are the 2 LSbits * duty3h<2:9> are the 8 MSbits Because duty cycle is coded on 10 bits, the given value can't greater than 1024 If not active yet, calling this procedure will enable PWM
pwm3_set_percent_dutycycle(byte in percent)
This procedure set duty cycle using a percentage According to what has been computed by pwm_set_frequency(), it converts the duty percent to a value suitable for the selected pwm frequency.
pwm3_set_dutycycle(byte in duty)
Sets dutycyle in low resolution mode. The 2 LSbits take their value from ccp3con_shadow, by default 0 This means if duty3 = 0, there's no pwm, if duty3 = 255, you're closed to (but not at) the maximum pwm
pwm3_off()
No documentation found