Skip to main content

All Questions

Tagged with
0 votes
0 answers
27 views

Which ATtiny TWI parameter provides more robust operation?

I'm using an ATtiny3226 as an I2C client (slave) interface in a robot, to get commands from the main controller (single master) using I2C on a shielded cable. There are brushless and servo motors ...
Tirdad Sadri Nejad's user avatar
1 vote
0 answers
689 views

Bit-bang I2C implement on DS1307 and Atmega328P problem

I currently implement I2C bit-bang for Master Arduino (AVR) to Read/Write to Arduino Slave using Wire.h and DS1307 RTC. My bit-bang i2c work perfectly with Arduino Slave read 8 bytes without ...
MinhTem's user avatar
  • 33
1 vote
1 answer
203 views

Missing 1 bit shift Bitbang I2C Atmega328p

I implement bit-banging I2C on Atmega328P and met the problem when the Master receives data from the slave. I'm in depression in debugging this code since I found no problem. Master Write work ...
MinhTem's user avatar
  • 33
0 votes
0 answers
36 views

APDS-9253 reads all data registers as 0

I'm trying to read data from an APDS-9253 with an xmega. My i2c bus is working because I'm reading other devices without any problem. From the datasheet it seems at power-up the sensor is not ...
Mark's user avatar
  • 1,235
0 votes
1 answer
303 views

I2C Communication in AVR

The first step in a TWI transmission is to transmit a START condition. This is done by writing a specific value into TWCR, instructing the TWI hardware to transmit a START condition. Which value to ...
G-aura-V's user avatar
  • 1,079
0 votes
3 answers
112 views

I2C clarification

This question is mainly to check if I understood i2c protocol and hardware correctly. Because pin modes confusing me a little, ia m jsut a beginner. I2C SDA and SCL lines are pulled high with pull up ...
Anton Stafeyev's user avatar
0 votes
2 answers
222 views

Can I use one pin as I2C clock or data AND as GPIO?

It happened to be that I run out of pins on ATmega48PA. So I have a pull-down buttons on the pins dedicated for I2C: And now I need to add I2C bus to this device with as much backward compatibility ...
Roman Matveev's user avatar
0 votes
1 answer
1k views

AVR Can Write I2C, but Fails to Read (Fails to Write Register Address)

I'm using an ATMega328 DIP Package with a TLE493D(A0) (and manual) 3-axis hall effect sensor. I've done successful reads/writes to other I2C devices (AT42QT2120), but I'm having issues with the TLE493....
Orotavia's user avatar
  • 400
0 votes
0 answers
32 views

Arduino I2C bus fails when one slave is powered down [duplicate]

I have a set of Arduino Nano units where one is I2C master broadcasting messages to a number of slaves. It works perfectly fine when they are all powered on. The Arduino units are all interconnected ...
Johan's user avatar
  • 101
1 vote
3 answers
1k views

SSD1306 I2C: Draw only changes works however on wrong position, how to set position (command)?

I create an OLED display class for the SSD1306 and how it works is pretty straight forward. The display is buffered (offscreen method) and at performing an update, it 'dumps' the buffer to the display ...
Codebeat's user avatar
  • 1,367
0 votes
1 answer
2k views

I2C communication ATmega328P slave: answer to general call but not to own address

I have the following problem: I want to make two AVR Atmega 328P-Pu communicating together with I2C No1 is Master (I2C address :0x01) No2 is Slave (I2C address :0x02) On slave answer to general ...
user198530's user avatar
1 vote
0 answers
675 views

Reuse I2C SCL or SDA Pins to signal interrupt

In an I2C network, I am using an AVR microcontroller (AtMega328p) as a Master and I hooked it up to multiple sensors as Slaves, such as the TMP102, SI1145, MPU9250, among others. All of these sensors ...
Mihai Galos's user avatar
0 votes
2 answers
239 views

AVR ATmega TWI Hardware Questions

I have thoroughly read the TWI part of ATmega data sheets, but I am still confused about a few things. If I write TWCR = (1 << TWINT);, will that write a ...
HaLailah HaZeh's user avatar
1 vote
1 answer
233 views

How to set NACK on bad PEC in TWI used for SMBUS (ATMega8) [duplicate]

I want to implement the SMBUS protocol in my AVR device (ATMega1284P), which will have the role of slave. I need to support the PEC (Packet Error Code) feature, which means that the master device (...
Guillermo Prandi's user avatar
-1 votes
2 answers
374 views

I2C communication problems unless test equipment is attached

I have a RaspberryPi acting as a master for an Atmel ATTiny861A slave over I2C, continuously sending a command plus 3 bytes of data to light an RGB LED. This works perfectly but only if the AVR ...
Garth Winter Webb's user avatar

15 30 50 per page