nsayellow.blogg.se

Attiny88 wire library
Attiny88 wire library





attiny88 wire library attiny88 wire library

I am posting this mainly to show how combinations of software and hardware can influence the result.The Tiny AVR Programmer is a general AVR programmer, but it's specifically designed to allow quick-and-easy programming of ATtiny85's (as well as 45's) compared to the pocket AVR programmer. “second_good” shows signals with delay inserted. Solution was to insert 1 msec delay between Slave.receive() and Slave.read(). With open collector output stage and 2.2 kOhm pull-up resistor that means that output stage device has at that moment Ron in the order of 2 kOhms. What is surprising is that logic value is close to 0.5Vcc. “second_combined1” shows problem in more detail. As you can see on “second_combined” image, there was a problem with clock being in undefined state for the first bit of received data.

attiny88 wire library

I suspected some timing problems, but until I managed to get on decent scope/logic analyser that problem became obvious. Only JeeNode (Ports library) in combination with ATtiny85 (TinyWireS library) was having problem. Interestingly when I was running the same code but receiving it by Arduino running Wire library based code everything was right as was JeeNode receiving code from Arduino slave running Wire library. My problem was that MSbit of each byte received was set to 0. In my previous post I described difficulty with receiving integer value from ATtiny85 slave running TinyWireS library. Sr_receiver is working file using Wire library I am programming ATtiny85 using Arduino 1.01 because that's where I have ATtiny programming set up.I have 3.3kOhm pull-up resistors on Clock and Data lines. I am developing Master JN code with Arduino0022 to maintain compatibility with existing code. I am getting no data or occasional -1 or 255, in other words only ones. What I think I am missing is equivalent of “Wire.requestFrom(SLAVE, length)”. I know code is not elegant, but it is working with Wire library. But I can not get it working using JN(Ports lib) – Slave(ATtiny, TinyWireS lib). I have Master – Slave working using Wire library, and also Master – Slave(ATtiny) using TinyWireS library. To simplify development I am trying it first on it's own before integrating it into data collection program. TinyWireS library does not have "send(buf, bufLength)" function as far as I know. Data is in (Int) format, so I need to send two bytes and re-assemble them during receiving process. Once every 5 min I will read collected data. I am trying to offload some data collection from JN and use Attiny85 to do the work.







Attiny88 wire library