Archive of the former Yahoo!Groups mailing list: ComputerVoltageSources

previous by date index next by date
previous in topic topic list next in topic

Subject: Re: I2C bus for expansion

From: "djbrow54" <davebr@...>
Date: 2006-03-29

--- In ComputerVoltageSources@yahoogroups.com, "Grant Richter"
<grichter@...> wrote:
> 1. Are you using the hardware I2C pins on the PSIM?

I am using the I2C pins on the PSIM. However, the I2COut command for
the AtomPro24 does not use the H8 hardware. BasicMicro did a software
implementation of I2C protocol (I called and talked with them). It
will use any two pins specified in the command. I looked at the H8
documentation to interface directly to the I2C hardware but decided it
could be slower than using the I2Cout command. I am able to transmit
a byte in ~220 uS using I2COut. That's not much time to control the
hardware registers using Basic. I figured it would be a performance
wash at best and more complex coding.

> 2. The PSIM I2C port has the pullup resistors going to ground
> instead of +5v, did you fix this?

The resistors are not installed on my PSIM board. My schematic shows
them connected to +5 but it doesn't matter since they're not
installed.

> 3. If you did not fix the resistors, then the I2C port is not open
> collector (drain) but is using the "hard" pullups on the GPIO
> section of the pin driver. That means only 1 device can be on the
> I2C bus?

The I2COut command appears to set the pins selected to open drain. I
know this because everything was hung until I added external pullup
resistors. It is operating in an open drain configuration. Once I
added 3' of cable to reach my bench, I can 'really' tell that it's
operating with passive pullups.

Dave