cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Anonymous
Not applicable
8,354 Views

8-channel I2C Switch

Hi

 

I am using picoblaze in my design and I am using zynq board (zc702).

I would like to connect to one of the PCA9548 mux Channels via picoblaze .

I am using the  I2C Reference Design Routines to write and read  to the 8-channel I2C Switch (PCA9548_mux_write and PCA9548_mux_read(to verify the writing)) but it doesn't work.

The communication with the PCA9548 is unsuccessful and  the CARRY flag is set.

I have tried these routines in the same design for another board (vc707 ) and it does work but I don't know why it doesn't work on zc702.

How can I communicate with PCA9548 in this board with Picoblaze? Do you have any reference design for zc702?

Could you please help me ?

 

Thanks

Arash

0 Kudos
5 Replies
chapman
Xilinx Employee
Xilinx Employee
8,331 Views
Registered: ‎09-05-2007

I haven’t used a ZC702 board myself but the first thing I think you should check is the reset signal to the PCA9548 device; it is easy to miss this since it is separate to the I2C bus signals. You will see that I have specifically connected and controlled the reset signal in the reference design provided with KCPSM6 (see page 9 of ‘KC705_KCPSM6_I2C_EEPROM_reference_design.pdf’.  

 

Looking at the ZC702 schematics I notice that the reset signal has a pull-up resistor shown next to the PCA9548 device which should be making the reset inactive even if the reset signal is not driven. However, I also see that the reset signal connects back to the Zynq device via a voltage level shifter, and from my past experience, I have seen these level shifters cause issues. It is not always clear to a level shifter in which direction the signal is supposed to be flowing so I wouldn’t like to guess if the pull-up resistor on one side is winning over the weak low level of an unused Zynq output pin. So check that you have actually defined and driven the PCA9548 reset from the Zynq device to rule out this potential issue (and define a high drive strength output as I’ve had need to do that to overcome a level shifter in the past too).

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
Anonymous
Not applicable
8,329 Views

Hi Ken;

 

Thanks for your reply.

 

Unfortunately the reset pin is not accessible via PL part and is available from PS part.

Therefore I have activated the I2C from PS part and I did  rest the switch from PS part.

After that I used the PL part (PicoBlaze) to set the switch, but it still doesn't work. :(

I have defined a high drive strenghtoutput.

I know you are very busy and you are not an online design consultant but I think many cases like me would like to access to this switch in this board via PicoBlaze. Could you please investigate this issue?

 

Thanks for your help

Arash

 

 

0 Kudos
chapman
Xilinx Employee
Xilinx Employee
8,314 Views
Registered: ‎09-05-2007

I don’t have personal access to a ZC702 at this time to do any experiments myself but I called a colleague that does has one and he has had no issues using PicoBlaze to communicate with the I2C devices on his board. As such, I think it’s probably a case of you going over everything in your design one more time to look for something incorrect such as the SCL and SDA pins being swapped (I’ve done that one before!). I notice that the SDA and SCL lines also have level shifters so make sure that you are using appropriately defined I/O specifications (LVCMOS25) for those pins, and again, I would recommend the use of a high drive strength. Also check that your design is correctly implementing 'open-drain' bidirectional pins; it’s easy to slip up if you don’t keep the I/O definition at the top level of your design. If you still can’t get a good response then it will be time to get an oscilloscope out and start probing.

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos
6,504 Views
Registered: ‎02-14-2013

Hi

 

I have ov7670 camera module, which is connected to the FRC2 with proper voltage shifter .

I am not able to comunicate with camera on i2c bus.

 

Connection details :

 

Pin No    PCA9548A (i2c bus)                        - >         FRC2              - >       OV7670 Pin No

14 SC6   FMC2_LPC_IIC_SCL      ->           C30     SCL     ->        SCL       3
15 SD6   FMC2_LPC_IIC_SDA      ->           C31     SDA    ->         SDA      4

I am able to comminicate with ov5642 which has i2c address "0x3C" (7 bit address).

But I am not able to comminicate with ov7670 which has i2c address "0x21" (7 bit address).

 

As per below link :

http://www.xilinx.com/support/documentation/boards_and_kits/zc702_zvik/ug850-zc702-eval-bd.pdf

At 36 page is written

I2c bus FMC2_LPC_IIC_SDA/SCL has i2c address 0bxxxxx00 on channel "6".

 

Could you tell me i can communicate with ov7670 with i2c address "0x21".

Whenver I tried to i2c write than its send me NAK.

 

Please suggest me, how to configure PCA9548a i2c bus switch for ov7670.

or I canot do with i2c address 0x21

 

0 Kudos
chapman
Xilinx Employee
Xilinx Employee
6,499 Views
Registered: ‎09-05-2007

Have you seen the I2C reference design provided in the ‘Reference_Designs\I2C’ directory of the KCPSM6 package and described in the ‘KC705_KCPSM6_I2C_EEPROM_reference_design.pdf’? This design works on the KC705 board but it does include a working example of controlling the PCA9548 Bus Switch device. Obviously you have to adjust the device addressing and switch selection to reflect the hardware that you are using but that’s a case of checking the board documentation and schematics.

Ken Chapman
Principal Engineer, Xilinx UK
0 Kudos