I2C issues using ATTiny88 MH-ET board (noob) #690
Replies: 7 comments 12 replies
-
That all needs to be put into a single code block, preferably with code freshly pasted from the actual code being used. Are you using the 2.0.0-dev codebase? I know I've fixed several I2C-related issues for 2.0.0 - it's just not quite ready for release because there are showstopping problems (largely related to the unusability of the code currently used on my other cores when applied to this one - and the sheer number of conditionally compiled blocks of code means that it is 100% mandatory to have automated testing before considering the software to be ready for release. But I don't really know how to make that happen. |
Beta Was this translation helpful? Give feedback.
-
How do I format for a code block? I tried the <> button for add code, ctrl +e , can't find the answer. Sorry. That is the code copied and pasted from my computer. Just meant "virgin" as not something I'd messed around with, always made a copy when changing something trying to troubleshoot. I am using ATtiny 1.5.2. I will update to 2.0.0 in a few hours and let you know. |
Beta Was this translation helpful? Give feedback.
-
First test on 2.0.0 returns the following. I saw DrAzzy mention the same or similar issue on Arduino forums, but I didn't see or understand the solution. I manually deleted the previous version from Arduino15/packages folder and installed 2.0.0 in mydocuments/Arduino/hardware, maybe that was the wrong process? 2.0.0 doesn't show in my boards manager.
|
Beta Was this translation helpful? Give feedback.
-
So after update to 2.0.0-dev, I have exactly the same result. Any mining "job" that is returned to the master in less than 2.84 seconds is accepted, but as soon as 2.84s hits, the slave returns all zeros for the solution and the job is rejected. |
Beta Was this translation helpful? Give feedback.
-
OH SHIT! You're right! It does have full hardware I2C! So it should work fine...... |
Beta Was this translation helpful? Give feedback.
-
One thing that would be very interesting Is to hear what core and version
people are using on other chips with success (avrs only)
…____________
Spence Konde
Azzy’S Electronics
New products! Check them out at tindie.com/stores/DrAzzy
GitHub: github.com/SpenceKonde
ATTinyCore: Arduino support for almost every ATTiny microcontroller
Contact: ***@***.***
On Fri, May 13, 2022, 14:42 RALEIGHthe3rd ***@***.***> wrote:
Hmmmmm, ok. I will return to the developer with that info and see if we
can get 'er working. Thank you so much for taking the time to help, and for
all of you development and documentation. I've learned a lot from you
during this project. If you have any other suggestions for trials let me
know. I will reach out the the developer of the code and see if he has an
ideas from here.
Also, 2.0.0-dev seems to work flawlessly since I changed. I am happy to
test anything that you might need, you'll just have to tolerate my
ignorance along the way, lol.
—
Reply to this email directly, view it on GitHub
<#690 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTXEW4ZTT5TYB2F7YHMWO3VJ2PCBANCNFSM5VWDK7XA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I thought I would post the code from the library and source files for the I2C slave from above. Not that I suspect it is anything to do with the ATTiny Core, just to get some eyes on it from people the know the tinys. Any help would be greatly appreciated.
|
Beta Was this translation helpful? Give feedback.
-
First off, I'm an idiot. I'm not a coder, and barely have enough knowledge to get things to work, given someone else has done it first. Sorry if I ask dumb questions. I try to research as much as possible, but sometimes I don't know the direction to be searching. Thank you in advance for helping me learn.
I am trying to use ATTiny88 as an I2C slave to mine Duino Coin. I'm using the code below, and things work well 70% of the time. Normally the master sends a job to the slave from a mining pool. The slave does "work" and returns a "hash" solution. Ultimately I want several slaves, but dealing with just one right now. My problem is that 20-30% of the jobs fail. The slave just returns 0s for the solution, which of course gets rejected. The time is ALWAYS the same, 2.84s on the failed jobs. Successful jobs are ALWAYS less than that amount of time. Not sure if there is a timing/timeout issue, or possible stack overflow? IDK
I2C is runiing at 100kHz, but also tried 400kHz without luck. Also tried the Attiny88 at 8MHz istead of 16, but no change, just slower. The master will be an ESP (32 or 8266 depending on performance), and I've tried both with the exact same result. I am using the ATTiny Core with the Micronucleus bootloader, and Wire.h. With LTO enabled, I have 32 bytes of memory left. Without LTO, -3 bits and failure to compile. Not sure if this is a clue. Also using a logic converter for the I2C bus, that has built in 10k resistors.
I appreciate any guidance or help. I am will to try and test whatever is needed.
This is the virgin code that has proven to work for many other devices.
Beta Was this translation helpful? Give feedback.
All reactions