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, ®isterAddress, 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.
Question
Clipper
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, ®isterAddress, 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
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.