AdaFruit 14 segment display with Propeller

Has anyone tried using this part with the Propeller?
https://www.adafruit.com/product/1911
It looks like it ought to be possible to supply 3.3v as Vi2c and 5v as VCC and have it work but I haven't been able to get it to do anything. I don't even get i2c ACKs back when I send it commands. I'm using the SimpleIDE i2c code below:
https://www.adafruit.com/product/1911
It looks like it ought to be possible to supply 3.3v as Vi2c and 5v as VCC and have it work but I haven't been able to get it to do anything. I don't even get i2c ACKs back when I send it commands. I'm using the SimpleIDE i2c code below:
#include "simpletools.h"
#include "simplei2c.h"
#define SCL 9
#define SDA 10
#define I2C_ADDR 0xe0
#define HT16K33_ADDR 0x00
#define HT16K33_OSC_ON 0x21
#define HT16K33_BLINK_CMD 0x80
#define HT16K33_BLINK_DISPLAYON 0x01
#define HT16K33_BLINK_OFF 0
#define HT16K33_BLINK_2HZ 1
#define HT16K33_BLINK_1HZ 2
#define HT16K33_BLINK_HALFHZ 3
#define HT16K33_CMD_BRIGHTNESS 0xe0
uint8_t turnOn[] = { HT16K33_OSC_ON };
uint8_t blinkOff[] = { HT16K33_BLINK_CMD | HT16K33_BLINK_DISPLAYON };
uint8_t fullBrightness[] = { HT16K33_CMD_BRIGHTNESS | 15 };
uint8_t cmd[] = { HT16K33_ADDR, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
terminal *term;
int main(void)
{
i2c i2cBus;
i2c *dev;
term = simpleterm_pointer();
dev = i2c_open(&i2cBus, SCL, SDA, 0);
SendCmd(dev, turnOn, sizeof(turnOn));
SendCmd(dev, blinkOff, sizeof(blinkOff));
SendCmd(dev, fullBrightness, sizeof(fullBrightness));
SendCmd(dev, cmd, sizeof(cmd));
while (1)
;
return 0;
}
void SendCmd(i2c *dev, uint8_t *cmd, int len)
{
int sts;
i2c_start(dev);
sts = i2c_writeByte(dev, I2C_ADDR);
while (--len >= 0)
sts += i2c_writeByte(dev, *cmd++);
i2c_stop(dev);
dprint(term, "sts %d\n", sts);
}
Comments
With no ACK, did you try a sweep of all i2c address, to see if any generate ACK-after-address ?
Sometimes i2c addr is not quite the same as docs...
CON _clkmode = XTAL1 + PLL16X _clkfreq = 80000000 SCL = 9 SDA = 10 OBJ display : "jm_ht16k33_4x14segs" PUB main display.startx(SCL, SDA, 0) display.set_display(1, 0) display.set_brightness(15) display.direct_write(0, $ffff) display.direct_write(3, $aaaa) display.refresh(4) repeat
pub startx(scl, sda, device) '' Starts i2c display device '' -- scl is the device SCL pin '' -- sda is the device SDA pin '' -- device is address, %000 to %111
Your code works fine for me...changing the bits displayed affects it as expected, too, so I know it's not just a fluke poweron glitch that makes it look like it's working.
I don't think you need pullups, though...most (or all?) of her I2C breakout boards have pullups on them, already. Have you tried without them? Also, the supply connection (+) that is 2nd in from the edge of the board is the one that works for me (don't have the schematic handy, so not sure what the leftmost one on the edge is supposed to be - it doesn't work for me...or it does, but very dimly), so that'd be another thing to check.
Cheers,
Jesse
SCL -> P9 SDA -> P10 GND -> GND VCC -> 5V Vi2c -> 3.3V
My understanding is that the Vi2c pin defines the logic level and that the VCC pin powers the LEDs.