system
September 30, 2013, 4:35pm
1
I cannot get my Uno to work with a DS1050-001 PWM chip. I'm need 8 PWM signals so I cannot use the built in PWM function. I have A0, A1, and A2 all tied to +5V. I have 10k pull up resistors from +5V to SDA and SCL. No matter what I put in my Wire.write() function, the chip is defaulting to a 50% duty cycle. The datasheet for my chip and my code are below. Any idea what I might be doing wrong?
http://datasheets.maximintegrated.com/en/ds/DS1050-DS1050X-010.pdf
#include <Wire.h>
#define PWM_ADDRESS 0x5E
void setup()
{
Wire.begin();
delay(1000);
}
void loop()
{
Wire.beginTransmission(PWM_ADDRESS);
Wire.write(0b00011111);
Wire.endTransmission();
delay(5000);
}
Ok, so it's been a while.
50% duty cycle suggests you have correctly powered up the device.
Try running the following and see what I2C addresses this comes up with.
http://playground.arduino.cc/Main/I2cScanner
Looking at the data sheet I think the address should be 0x2F not 0x5E. The Wire library takes care of the R/W bit for you.
Also this device gives a single PWM output with 5 bit resolution, you'll need 8 of them.
SteveQuinn:
Ok, so it's been a while.
50% duty cycle suggests you have correctly powered up the device.
Try running the following and see what I2C addresses this comes up with.
Arduino Playground - HomePage
Looking at the data sheet I think the address should be 0x2F not 0x5E. The Wire library takes care of the R/W bit for you.
Also this device gives a single PWM output with 5 bit resolution, you'll need 8 of them.
Good answer, but, I think the original poster (OP) has probably disappeared.
Chuck.