Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Left shift problems on I2C master write

Status
Not open for further replies.

Artlav

Full Member level 2
Full Member level 2
Joined
Nov 26, 2010
Messages
144
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Visit site
Activity points
2,723
Hello.

I'm trying to make an I2C master in an FPGA, and am getting intermittent problems with sending data.

Best fitting description is that once in a few dozen times a written byte is seen by the slave as shifted left by one bit.
I.e. it is set to read a word from 0x1754 repeatedly. Each time looks exactly the same as the previous on a scope, but once in a while it would give me a word from 0x2E54, or 0x2EA8, or 0x17A8.

I suspect there is something wrong with the timing, but i can't figure out what is it exactly, and a scope decodes it correctly every time.

That's what it looks like:
(Starts at R/W bit of slave address, then ACK, first address byte, ACK, and first pair of bits of the second byte)
cur_write.png


Is that correct?
If not, what is wrong?

.
 

Hello.

I'm trying to make an I2C master in an FPGA, and am getting intermittent problems with sending data.

Best fitting description is that once in a few dozen times a written byte is seen by the slave as shifted left by one bit.
I.e. it is set to read a word from 0x1754 repeatedly. Each time looks exactly the same as the previous on a scope, but once in a while it would give me a word from 0x2E54, or 0x2EA8, or 0x17A8.

I suspect there is something wrong with the timing, but i can't figure out what is it exactly, and a scope decodes it correctly every time.

That's what it looks like:
(Starts at R/W bit of slave address, then ACK, first address byte, ACK, and first pair of bits of the second byte)
cur_write.png


Is that correct?
If not, what is wrong?

.

look more like 2e... something....
you have also disturbing crosstalk between sda, scl.
 

Hm?
What makes it?

thos litle spikes indicating you realeas SDA (imidiately after falling edge of last clocl), and wait ACK.
indeed the slave asert the ACK cycle low, and then you write byte.
 

The problem turned out to be in a different spot, and the timings shown here are apparently correct.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top