Need help running i2c on attiny85t #755
Replies: 4 comments
-
If testing on a breadboard I would try swapping out wires and confirm with some I2C slave device that the I2C scanner is performing ok. I have been bitten by bad connections on my breadboards more than once. |
Beta Was this translation helpful? Give feedback.
-
Why are we talking about the bootloader when you say that the sketch uploads successfully? And why is the uploading related to I2C? I am aware of no I2C bootloaders, amd based on the specs and foibles of I2C this should surprise nobody. The problem Is I2C. Do you have an oscilloscope? If so, monitor the two I2C lines during an write or read to/from. From a photo of that, I could spot several hardware/wiring issues. Speaking of wiring- you say space constraints, but yo also mention an arduino Uno. If you're using that gigantic uno, the only way thee could be a space constraint is if you are using the wrong main board ( a gigantic Uno instead of the identical processor on a much smaller and less expensive nano or pro mini (the clones are around $3) - OR you have the t85 located somewhere relatively far from the device - on the end of long wires. I2C was designed for communication between multiple IC's on the same circuit board. It works with short wires too. But not long ones. Weak pullups will also not help if there are long wires. If the wires are long, I would put the strongest pullups I could which would not force the current needed to drive them to approx 0V did not exceed 3mA - on both standard and fast mode the current is throttled to that. In either event, please let me know whether you are using the 1.5.2 release of thej 2.0.0-dev github latest version. |
Beta Was this translation helpful? Give feedback.
-
Works fine for me on IDE 1.8.13 with core 1.5.2
Also on IDE 1.8.13 with Github version 2.0.0 of Attinycore
|
Beta Was this translation helpful? Give feedback.
-
The github versions if sync'ed inthe last couple of days have significantl fixes particularly for the x5-series. There were a LOT of issues with it (afaict, it had never been worked over to the ATTC 2.0.0 standard) |
Beta Was this translation helpful? Give feedback.
-
I am trying to make i2c with Wire.h using the ATTinyCore work on the ATTiny85v 8 pin dip chip. AFAIK, the difference of the "v" means that it can be operated on lower voltages than the traditional model.
I am using the example slave_receiver for testing purposes to upload to the ATTiny85v chip. I then use the i2c_scanner sketch on the Arduino to verify if the i2c operation is successful, but I haven't gotten any luck so far.
The chip is being run at 8MHz and I make sure to burn bootloader prior to uploading via Arduino as ISP. The board option I select is "ATTiny25/45/85(no bootloader)" - to program the same.
I make sure to use 10KOhm resistors as pullups on the pins PB0 and PB2 of the ATTiny85 and connect SDA on the Arduino UNO to PB0 and SCL on Arduino UNO to PB2. I am also using a 100nF cap b/w vcc and gnd of the chip.
I am at a loss at how to troubleshoot further. I know the board is being programmed because a blink sketch that I uploaded worked fine. Kindly let me know if any further details are required and I will provide them ASAP. Are there any alternatives for chips (preferably DIP) that are as space conscious as the ATTiny85 (in case the i2c doesn't work out on this)?
Thank you for your thoughts, guidance and criticisms.
Beta Was this translation helpful? Give feedback.
All reactions