I found this MCP23008
and its a nice little DIP GPIO expander over I2C. Is there a chip like this for PWM outputs?
Specifically I want this PWM generator to be used for the inputs on several L298N
s.
I found this MCP23008
and its a nice little DIP GPIO expander over I2C. Is there a chip like this for PWM outputs?
Specifically I want this PWM generator to be used for the inputs on several L298N
s.
Here you go: MAX6966/MAX6967, MAX6946/MAX6947, TLC59401, MAX7313, PCA9685, SX1509.
I2c based port expanders with PWM output are typically designed as LED drivers. You can easily build a driver circuit using a npn transistor as an inverter, connected to the typically open - drain output of the i2c LED Driver. Many Texas Instrument ones note this setup in the datasheet, under using the output as a GPO.
You need high frequency for the L298N's, so shift registers won't do.
My suggestion is to use a separate AVR. Maybe ATmega328 - just buy an Arduino Pro mini clone, they're dirt cheap and need no additional components.
It has 6 PWM outputs (more info here) and can be programmed as an I2C slave or for whatever other communication you come up with.
It can also take some processing load off your main chip at the same time, process feedback from the motors, or something of the sort.
check out the adafruit servo board. (it can also handle LEDs but is designed as a 16 channel PWM expander over i2c including configurable i2c addressing via solder jumpers. And yes, there are plenty of china knock-offs)
you could checkout the sx1509 it has - gpio io - pwm output options with blink and breath options - supports keyboard matrix scan function
You can convert 3 output pins into an arbitrary number of PWM outputs using standard shift registers. (Of course the more PWMs you add, the lower the max PWM freqency will be.)
(Substitute your favorite MCU for the TEENSY - although the TEENSY is very nice!)
Here more info and an example of how the driver software might look...
For anyone who runs across this some 5 years later... Look up "Serial Wombat 4B"