Hot answers tagged

12 votes
Accepted

I2C short pulse during SCL==low

The short pulse occurs after the 8th data bit and just before the ACK. It's the point at which the data line changes direction. Whichever device was driving out the data (master for write, slave for ...
user avatar
8 votes

Detect how many push buttons are being pressed using a maximum of two Arduino pins

With 8 buttons there are 255 possible combinations of presses. Consider an R-2R ladder. If the uC has a 10 bit A/D, you should have enough resolution to determine the input voltage to a 1-in-255 ...
user avatar
  • 12.9k
5 votes
Accepted

What does I2C 'target address' mean? Can we not address individual registers in the target device?

The specification only defines how to talk to a device, reading and writing bytes to it. The specification does not define what the bytes mean. It is up to your chips to define the protocol at byte ...
user avatar
  • 89.6k
5 votes

Pull up and down resistors at the same time

The pull down value depends on your MCU and it reads in the data sheet. Open the data sheet and find the value. It might be tens of kilo-ohms. However it will likely change nothing. Pulling down ...
user avatar
  • 89.6k
4 votes
Accepted

Is this an I2C ACK? Else why are there 9 bits?

Why is it 9 bits later instead of 8? Is the SDA low (between the red line and the SDA pulse) a slave ACK? Yes. Check the first half of this figure, from the I2C standard: If so, who holds SDA low ...
user avatar
  • 6,947
4 votes
Accepted

In I2C communication, let's assume 10 bytes are to be transferred from Master to slave. What happens if NACK is received after transfer of 5 bytes?

According to the I2C specification, if the controller as transmitter sees a NACK during transmission, that means the receiver has either received the byte correctly but can't accept new bytes, or not ...
user avatar
  • 89.6k
3 votes

I2C Strange goings on

Is there a difference between the rise time of the SDA and SCL? I2C is synchronous, so SDA is sampled when SCL reaches a threshold value. If SDA has a longer rise time than SCL, it may not reach the ...
user avatar
  • 515
2 votes

SPI MISO line not working

One classic mistake is that when you connect two live, supplied boards and the TTL level signals connect before ground pins, something else might become ground temporarily, resulting in wrong voltage ...
user avatar
  • 14.2k
2 votes

In I2C communication, let's assume 10 bytes are to be transferred from Master to slave. What happens if NACK is received after transfer of 5 bytes?

The communication ends: the master write message is terminated by the target device after a successful write of 5 bytes. The I2C protocol does not implement retries. Higher level master devices can ...
user avatar
  • 17.9k
2 votes

Is this an I2C ACK? Else why are there 9 bits?

That is exactly how a byte transmission with ACK can look like, but not necessarily will look like. The short spike is because slave is releasing the SDA to go high after being done transmitting a low ...
user avatar
  • 89.6k
1 vote
Accepted

I2C Hot Swap design and feasibility

The buffer does nothing if you only have single card with single sensor on the bus and nothing else. If the unplugging happens during communication, it is the role of the MCU I2C code to handle the ...
user avatar
  • 89.6k
1 vote

I2C Strange goings on

With tracks that short, there should be absolutely no need for any capacitance across the clock signal; if it is needed, then you are attemtping to mask another problem, which you should fix first. ...
user avatar
  • 679

Only top scored, non community-wiki answers of a minimum length are eligible