Archive of the former Yahoo!Groups mailing list: ComputerVoltageSources
Subject: Re: I2C bus for expansion
From: "djbrow54" <davebr@...>
Date: 2006-03-29
Thanks to John's help I was able to decode the I2C from the AtomPro24.
The forum has several comments about people having lots of issues
with the I2COut command. One stated that you must use an address
byte. I monitored the I2C on my PSIM with my scope (one of the brand
new Tektronix DPO4000's with serial data/I2C analysis capability).
Since I don't have a receiver, I could only look at the first byte
(since there is no ACK). However, I saw the same issue with having to
specify an address. I will document this in my FAQ.
The command syntax is:
I2cout datapin,clockpin,{ErrLabel},Control,{Address},[data
data]
If an address is not specified, there will be 1 start bit and the
first data byte (shifted right 1 bit) will be used for the address
(Control byte not used). If an address is specified, there will be 2
start bits and the Control byte will be used for the address.
i2cout p6,p7,i2cerr,($23<<1),$14,["h"] ;8 bit adr=$23, two start bits
i2cout p6,p7,i2cerr,($23<<1),$14,["hello"] ;8 bit adr=$23, two start
bits
i2cout p6,p7,i2cerr,($23<<1),["h"] ;8 bit adr=$34 (1/2 of "h"), one
start bit
i2cout p6,p7,i2cerr,($23<<1),["hello"] ;8 bit adr=$34 (1/2 of "h"),
one start bit
We had a SAA1064 I2C to 4 digit LED driver in the stockroom so I
brought one home. I'll wire it up and see if I can communicate with
it. At least it will provide the ACKs for me.
Dave