16-bit Pulse Width Modulation Capability

PWM    7-Nov-2017

The Great Cow BASIC development team have published another new capability - Pulse Width Modulation for the 16-bit Microchip module.

You can now add 16-bit PWM to your PIC projects.   The high-precision 16-bit PWM available in various PIC16 devices such as the PIC16F157X product family, provides advanced features beyond those found on standard PWM modules or the CCP/PWM modules.

16-bit PWM allows you to easily enable PWM output.   The high-precision 16-bit PWM is ideal for power supplies, LED lighting, color mixing, and motor control applications. In addition, when not using the PWM outputs the module can be used to add up to four additional general purpose 16-bit timers.

Pete Everett has led the development of the new library - our thanks go to Pete.  The library supports:

  • Support for 12 channels - all independently programmable
  • Optmisation of generated code included
  • Fixed Mode Frequency Mode and Duty with differing frequency and duty across all 12 channels with very few lines of user program and with a very small program size
  • Backwards compatibility with other PWM and CCP/PWM features
  • Variable Mode Frequency and Duty Mode with differing frequency and duty across all 12 channels with a simple to use Public method and with small program size being generated
  • Includes demonstration code on GitHub.   See https://github.com/Anobium/Great-Cow-BASIC-Demonstration-Sources/tree/master/PWM%20Solutions/PIC%20PWM16%20Examples
  • The library has the capability to support Phase and Offset.
  • The IDE Helpers and Help will be updated as soon as practical

To enable this capability ensure you have v0.98.01 installed, and, obtain the libraries from the Sourceforge Forum and then add to you installation.   Install the three files from to your installation.  Of course, versions of the Great Cow BASIC distribution after v0.98.01 will have this capability installed.  

For more information on 16-bit PWM see http://www.microchip.com/design-centers/8-bit/peripherals/core-independent/16-bit-pulse-width-modulation-16-bitpwm

 


Categories: Release