Jump to content
  • 0

Arty and I2C to query PmodTMP2


Clipper

Question

Hi,

I recently bought an Arty Board to get myself acquainted with FPGA/µC development. Currently I focus on µC programming using Microblaze. Following the tutorials provided under https://reference.digilentinc.com/reference/programmable-logic/arty/start I managed to read out a PmodMaxSonar using UART and PWM, using a pmod_bridge configured in the Block Design within Vivado, and write the measured values on a PmodSSD seven segment display.

Next I would like to work with I2C to read from a PmodTMP2 temperature sensor. Currently I am not very successful in doing so. I again use a pmod_bridge where the Top-row is set to i2c and the bottom row to none. Attached to the bridge I have a axi iic ip core, which is then integrated using the connection automation of vivado. I was trying to make use of the provided examples in the SDK for axi_iic.

Analyzing the bus using a oscilloscope I measure voltage level of 1.6V for both scl and sda. I understand that both should be pulled up using resistors. I would expect that this is taken care of by the pmod_bridge or the axi_iic blocks. I attached the corresponding block design as system.pdf.

Using:

    Status = XIic_SetAddress(&Iic, XII_ADDR_TO_SEND_TYPE, 0x4B);

    Status = XIic_Start(&Iic);

I manage to acquire the attached measurement (see screenshot), after the following command is processed.

    Status = XIic_MasterSend(&Iic, &registerAddress, 1);

Ch B (green) is attached to scl, and Ch A (yellow) to sda.

Given what I have leaned so far about i2c it looks a bit alike. However, the voltage levels are off and the timing also does not look convincing.

 

I would appreciate any feedback that could help me to figure out what I'm doing wrong.

Regards
 

system.pdf

Screenshot from 2017-01-22 13:13:58.png

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Hello Clipper,

The pmod_bridge doesn't configure the I2C ports to have pull-ups. I don't know about the axi_iic block, but because the pmod_bridge sits between it and the output port I don't believe that the axi_iic block would configure the output ports to have pull-ups either. This is the first thing that I suspect is giving you troubles. You can Open Implemented Desgin and from there open the Window>I/O Ports page, where you can configure the pull type that you would like the pin to have.

Let me know if this fixes the issues that you are seeing here and if they are not then I will work with you until there are no further issues.

Looking forward to hearing back!
AndrewHolzer

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...