Jump to content
  • 0

I2C SCL signal remains in low voltage


malfalf

Question

Hello,

I am trying to communicate an accelerometer and my Zedboard using I2C and I am facing an annoying problem. The I2C SCL signal remains in low value after the communication.

The code is very simple as you can see in the attached file exampleCode.c.

I am able to see the signals in my oscilloscope and they are correct according to the datasheet (see last picture), but after the slave sends the data, the Zedboard doesn't send the stop signal and the SCL signal remains in low value. Why is this happening? What am I doing wrong?

I would appreciate if anyone could help me with this problem.

Have a nice day,

Write.png.987859d79c465821b1dd798582f8a61a.png

 

Read.png.bb44fec5257be0ce035d65bd9dd8d905.png

917829016_single-byteReadSequence.png.397bd9943cfaf1857d821e4f687af911.png

 

exampleCode.c

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hello again,

I found that my problem was that I needed a variable to control when the send or receive proccess is complete and, for that, you must enable the interrupts. So, I modified the project in Vivado and I add the interrupt handlers in my code and everything is working now.

I follow the next webpage (it is in Spanish but you can find images with the Vivado design and the code): https://programmerclick.com/article/91841879660/

Have a nice day,

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...