pwm_hardware

Hardware PWM control

Author Sebastien Lelong, Copyright (C) 2008-2009, all rights reserved.
Adapted-by Albert Faber, Rob Hamerling.
Compiler 2.4l

Description

Include this library if you want to use the PWM feature of the CCP module(s).
This library uses conditional compile to selectively include underlying PWM
libraries and number of PWM channels, according to the target PIC configuration.
Ex: - 16f88 has 1 PWM channel: including pwm_hardware will prepare PWM
      for 1 channel (using pwm_ccp1.jal)
    - 16f877 has 2 PWM channels: including pwm_hardware will prepare PWM
      for 2 channels (using pwm_ccp1.jal and pwm_ccp2.jal)
    - etc. for PICs with more CCP modules
Note: All used pin_CCPx_directions should be set to output by the application.



With using the PWM hardware a design choice must be made between desired
PWM frequency and desired PWM resolution (number of possible PWM steps).
Choosing maximum PWM resolution implies a relative low PWM frequency and
vice versa: a high frequency limits the number of available PWM steps.
The figures are dependent on the target clock speed.
Refer to pwm_common, pwm_ccp1, pwm_ccp2 ... etc. documentation to
understand how to use these PWM libraries.


Notes

1. Because the PWM libraries use conditional compilation and the 'alias'
   keyword, at least JalV2 compiler version 2.4l is required.
2. These libraries use the pin alias names as declared in Jallib device
   files since revision 1171, so Jallib release 0.4 is a minimum requirement.
3. Some PICs have extended CCP modules.  These will be handled by these
   PWM libraries as 'classic' CCP modules.


Dependencies


Summary

Global variables/contants

Procedures

Functions


API details

Global variables/contants

Procedures

Functions


Related samples

Here are the list of samples which use this library:

12f68312f683_pwm_adc.jal
12hv61512hv615_temperature_fan.jal
16f648a16f648a_pwm_led.jal
16f648a16f648a_pwm_led_highres.jal
16f648a16f648a_pwm_sound.jal
16f72316f723_pwm_led.jal
16f72316f723_pwm_sound.jal
16f72316f723_pwm_led_highres.jal
16f7316f73_pwm_led_highres.jal
16f7316f73_pwm_led.jal
16f7316f73_pwm_sound.jal
16f7316f73_pwm2.jal
16f76716f767_pwm_adc.jal
16f87716f877_pwm_led.jal
16f87716f877_pwm_sound.jal
16f87716f877_pwm2.jal
16f87716f877_pwm_led_highres.jal
16f877a16f877a_pwm_led_highres.jal
16f877a16f877a_pwm_led.jal
16f877a16f877a_pwm_sound.jal
16f877a16f877a_pwm2.jal
16f8816f88_ir_ranger_gp2d02.jal
16f8816f88_pwm_sound.jal
16f8816f88_pwm_led_highres.jal
16f8816f88_pwm_led.jal
16f88616f886_pwm_adc_freq.jal
16f88616f886_pwm_adc_res.jal
18f14k5018f14k50_pwm_sound.jal
18f14k5018f14k50_pwm_led.jal
18f14k5018f14k50_pwm_led_highres.jal
18f245018f2450_pwm_led_highres.jal
18f245018f2450_pwm_sound.jal
18f245018f2450_pwm_led.jal
18f455018f4550_pwm_led_highres.jal
18f455018f4550_pwm_sound.jal
18f455018f4550_pwm_led.jal