Dear all,
I am beginner to the UCD9224.And I bought UCD9224 EVM board and USB adapter.Now I am trying not to use the USB adapter.Instaead,I use the microchip PIC18F4320 to control the UCD9224 EVM board. I think the pmbus commands are similar to I2C commands. So I connect the CLK and Data pins of microchip PIC18F4320 to the CLK and Data pins of EVM board(PMbus pins.) Also I connect 3.3V and gound to EVM board. But here comes the question, after reading the "PMBus_Specification_Part_II" and "UCD92xx Digital PWM System Controller PMBus Command Reference", I still don't konw how to control the EVM board. I don't konw how to set the slave address.( I use EVM board as slave).Would please give a explample about how control. please advised .Thanks a lot.
Here are parts of my I2C code.
void Initialize_I2C_Master(void);unsigned char ByteWrite( unsigned char AddByte, unsigned char CMDByte);
void main(void){ Initialize_I2C_Master();while(1){ByteWrite(0b11010000,0b01111100); <<<<<<<<<<< how to set this command?}}//************************************************//* Initial I2C Master Mode //* Clock Speed :100KHz @4MHz //************************************************void Initialize_I2C_Master(void){ TRISCbits.TRISC3=1;//pin18:SCL TRISCbits.TRISC4=1;//pin23:SDA OpenI2C(MASTER,SLEW_ON); SSPADD=9;//4MHz/4*(SSPADD+1)=100KHz TRISB=0b11000000; // RB[6:7] as ICD2. . PORTC=0x00; //PORTC Clear. }
The slave address is not set by the PMBus interface but by the two resistors to ground attached to the ADDR0 and ADDR1 pins on the UCD92xx controller.
The datasheet specifies the required resistor values and the corresponding address values.
Attached is an example of code using an MSP430 to drive the PMBus interface:
4048.PMBus Implementation Using the MSP430 USCI - slaa386a.pdf