Add NXP PCA9685 16-channel 12-bit PWM I2C driver#452
Open
benzaid32 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a package for the NXP PCA9685, 16-channel 12-bit PWM I2C LED/servo
driver. This is the chip behind the Adafruit 16-channel PWM/Servo breakout,
so it's a pretty common request for anything that drives multiple hobby
servos or needs more PWM channels than the MCU can offer.
Part used:
PCA9685PW,118, TSSOP-28, LCSCC2678753.What the module exposes
power(ElectricPower, 2.3V-5.5V,asserted in the module)i2c(I2C, default address0x40- matches the Adafruit breakout)output_enable(ElectricLogic, active-low OE)extclk(ElectricSignal, optional external clock)led[0:15](16 ElectricLogic PWM outputs)Design choices worth calling out
nOE, so outputs default to disabled on power-up. Saferfor servos than leaving them live while the MCU is still booting.
EXTCLKso the pin isn't floating when the internal25MHz oscillator is being used.
noticeable current spike.
AddressoronA5:A4:A3:A2:A1:A0so you can stack up to 62 ofthese on a single bus.
Build status
ato buildpasses (default target).ato build usagepasses (usage example target).instead of a PDF. This happens to several other packages in the repo
too (it's an LCSC infra quirk, not a code issue).
Notes
microchip-mcp23017andti-tca9548a: typedinterfaces, auto-generated parts from
ato create part -s C2678753 -a,default+usagebuild targets, MIT license./OE). EasyEDA exports it asOEwith overbar. The auto-generated part file names the pin
nOEand themodule wires
package.nOEto theoutput_enableinterface.Tested against
NXP datasheet Rev. 4 (16 April 2015). All 28 pin-to-signal mappings
produced by
ato create partmatch the datasheet's Table 3 "Pindescription" for TSSOP-28.