Component: PWM 16CH 12Bit (PCA9685) (General Output): Difference between revisions
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
||
| Line 94: | Line 94: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetClockFrequency''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetClockFrequency''' | ||
|- | |- | ||
| Line 108: | Line 108: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
|- | |- | ||
| Line 122: | Line 122: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset''' | ||
|- | |- | ||
| Line 136: | Line 136: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAddress''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAddress''' | ||
|- | |- | ||
| Line 155: | Line 155: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetClockFrequency''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetClockFrequency''' | ||
|- | |- | ||
| Line 174: | Line 174: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetExternalClock''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetExternalClock''' | ||
|- | |- | ||
| Line 193: | Line 193: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetOutputMode''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetOutputMode''' | ||
|- | |- | ||
| Line 212: | Line 212: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPWM''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPWM''' | ||
|- | |- | ||
| Line 241: | Line 241: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPWMFrequency''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPWMFrequency''' | ||
|- | |- | ||
| Line 260: | Line 260: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPin''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPin''' | ||
|- | |- | ||
| Line 289: | Line 289: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Sleep''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Sleep''' | ||
|- | |- | ||
| Line 303: | Line 303: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WakeUp''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WakeUp''' | ||
|- | |- | ||
| Line 317: | Line 317: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteMicroseconds''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WriteMicroseconds''' | ||
|- | |- | ||
Revision as of 14:17, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | General Output |
PWM 16CH 12Bit (PCA9685) component
The PCA9685 is an I²C-bus controlled 16-channel LED controller optimized for Red/Green/Blue/Amber (RGBA) color backlighting or Servo motor applications. Each output has its own 12-bit resolution (4096 steps) fixed frequency individual PWM controller that operates at a programmable frequency from a typical of 24 Hz to 1526 Hz. All outputs are set to the same PWM frequency. Up to 64 devices can be chained together on a single I²C-bus to provide up to 1024 individual PWM outputs.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_PCA9685_16_Channel_PWM.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_PCA9685_16_Channel_PWM.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
GetClockFrequency
| GetClockFrequency | |
| Returns the current clock frequency | |
| Return | |
Initialise
| Initialise | |
| Sets up the I2C ready for communications to begin | |
| Return | |
Reset
| Reset | |
| Sends a reset command to the PCA9685 chip over I2C | |
| Return | |
SetAddress
| SetAddress | |
| Allows a different I2C address to be specified allowing one component to control multiple PCA9685 modules. | |
| Address | |
| Range: 0x40 - 0x7F | |
| Return | |
SetClockFrequency
| SetClockFrequency | |
| Sets the current clock frequency, used for things like calculating the PWM frequency and Microsecond duty. | |
| Clock | |
| Return | |
SetExternalClock
| SetExternalClock | |
| Sets EXTCLK pin to use the external clock | |
| Prescale | |
| External Clock Prescaler - Range: 3-255 | |
| Return | |
SetOutputMode
SetPWM
SetPWMFrequency
| SetPWMFrequency | |
| Sets the PWM frequency for the entire chip, up to approx 1.6 KHz | |
| Frequency | |
| Floating point frequency that we will attempt to match | |
| Return | |
SetPin
Sleep
| Sleep | |
| Puts the module into Sleep mode | |
| Return | |
WakeUp
| WakeUp | |
| Wakes the module from Sleep mode | |
| Return | |
WriteMicroseconds