Thanks for the quick reply.
This BusPirate board does basically the same thing as the MCP2221a, it's just a lot more low-level and you get a console to bit-bang your way thru I2C commands to read/write to the bus. The board I have (SuperMicro X11DPH-T) has the PXE1610C, I have run a query on the board and gotten this back:
Code:
I2C>(1)
Searching I2C address space. Found devices at:
0x00(0x00 W) 0x01(0x00 R) 0x19(0x0C R) 0xB0(0x58 W) 0xB1(0x58 R) 0xB4(0x5A W) 0xB5(0x5A R) 0xB6(0x5B W) 0xB7(0x5B R) 0xB8(0x5C W) 0xB9(0x5C R) 0xBC(0x5E W) 0xBD(0x5E R) 0xC0(0x60 W) 0xC1(0x60 R) 0xC4(0x62 W) 0xC5(0x62 R) 0xC8(0x64 W) 0xC9(0x64 R) 0xCC(0x66 W) 0xCD(0x66 R)
I believe the controllers I need to work with are at 0x60 and 0x62, which translate to 0xC0 for writing to 0x60 and 0xC1 for reading from it etc.
However, I don't know what specific registers and locations I need to read/write to. I tried following your post on the first page that showed the Microchip Terminal and its commands, which translate like this (Your code first, mine below it):
Code:
write byte addr=00h, value=3Fh REM set Page to 63
write word addr=27h, value=B37Ch REM set reg_pwd - allow to change registers
write byte addr=00h, value=20h REM set Page to 32
write word addr=73h, value=00FFh REM set icc_max to 255Amps
[0xC0 0x0 0x3F] Set Page 63
[0xC0 0x27 0xB3 0x7C] Remove reg_pwd to allow hack
[0xC0 0x0 0x20] Set Page 32
[0xC0 0x73 0x0 0xFF] Set ICC_MAX to 255A
For the Bus Pirate, the "[" symbol is the I2C START command, followed by the address, then the register and then any data byte(s), closed off with a I2C STOP command "]"
I am able to get some responses, but I wasn't sure if the post is an example for your specific board or if those registers/values are the same for all the same board. Here is an example of the above code, which is trying to read out the ICC_MAX value without making any changes:
Code:
I2C>[0xC0 0x0 0x3F]
I2C START BIT
WRITE: 0xC0 ACK
WRITE: 0x00 ACK
WRITE: 0x3F ACK
I2C STOP BIT
I2C>[0xC0 0x27 0xB3 0x7C]
I2C START BIT
WRITE: 0xC0 ACK
WRITE: 0x27 ACK
WRITE: 0xB3 ACK
WRITE: 0x7C ACK
I2C STOP BIT
I2C>[0xC0 0x0 0x20]
I2C START BIT
WRITE: 0xC0 ACK
WRITE: 0x00 ACK
WRITE: 0x20 ACK
I2C STOP BIT
I2C>[0xC0 0x73 [0xC1 r:4]
I2C START BIT
WRITE: 0xC0 ACK
WRITE: 0x73 NACK
I2C START BIT
WRITE: 0xC1 ACK
READ: 0xFF ACK 0xFF ACK 0xFF ACK 0xFF
NACK
I2C STOP BIT
I2C>
The last command [0xC0 0x73 [0xC1 r:4] is where I think I am making a mistake because the response (0xFFFFFFFF) doesn't seem right. I understand how to make the BusPirate communicate on the I2C bus, i'm just stuck translating the instructions from the Microchip XML to the commands I need to run.
At this point I might just wait until I can get a MCP2221a, so far they have been all out of stock. I had this device from tinkering on another project and thought I would give it a go but it has been a head scratcher!
Thanks again for the assistance, I know I am blazing my own trail here, I will keep tinkering.