Pages: [1]   Go Down
Author Topic: Attiny 85 IR problems  (Read 1084 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
Robot-Worker solidarity!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been working on adapting this code for a while. I am adapting this code: http://arcfn.com/files/IRremote.zip  To work on an attiny85. I have changed all the timers in the code to timer 0 to be compatible with the attiny. See the thread here: http://arduino.cc/forum/index.php/topic,91488.0.html

I have also found a specific attiny85 core for uploading the code with software serial. See thread: http://arduino.cc/forum/index.php/topic,91174.0.html

I have finally got the code to load onto the attiny85. However, once the code is loaded, the circuit for the attiny will not recognize or output any IR signals.

here is the original project I am converting to attiny85 http://www.arcfn.com/2009/09/arduino-universal-remote-record-and.html

I have tested all the components separately.

I have tested all the attiny pins separately

I am using a duemilanove as and ISP programmer

Please help! It took so long to get the code loaded! Now I am totally stumped!

Thanks,

Will
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 117
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Will, looks like we are in the same boat, since I've done all those test-individual-parts-before-you-put-em-together, and I seem to have a similar issue with RF decoding, not so different from IR decoding.
See my current open post here.

Everything else being similar, my main attention at the moment is around clock's accuracy, since such decoding logic depends on accurate timing. While there are some tolerances built into the algorithm, with sufficient clock drift/skew, it can still be thrown off, and that is what I suspect is happening. I know my RF decoder algorithm inside out, and given all the other testing I've done around it, I see very few other possibilities... may be, barring the possibility of INT0 handling, not being exactly similar as one expects in 328p based Arduino, although possibility of that should be rather lean, since the logic for hooking an ISR to external interrupt should be a pretty lean-n-thin one.

I've got one suggestion to check/correct the clock accuracy issue thru calibration, and found CodingBadly's TinyTuner, but missing bits-n-pieces of how to rig-it-up. Details in my same thread, and also this one (which is more about the harness for calibration).

I shall be watching this thread as well.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
Robot-Worker solidarity!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have tried a 16mhz external crystal (as the original code was written for the 328 arduino board, but I get the same unresponsiveness. I have also tried setting the internal fuses to the 8mhz setting but it seems not to help in any way.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 117
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Argh. And I was about to do the same today, i.e. try with an external 16MHz XTAL. I am sure you've done the checklist of setting F_CPU correctly (or select right board in Arduino IDE), and blown the fuses using Arduino IDE's "burn bootloader" (with the right board type selected), or from avrdude commandline, with the fusebits value that is correctly computed.

One thing to try (and rule out the timing issue), would be to try the BlinkWithoutDelay sketch - as suggested by CodingBadly on my thread (I'm sure you'd remember to change pin to PB4), and measure output using a Logic-Analyzer, to measure frequency (and possibly duty cycle to be exact 50%), against known/calculated frequency, given the blink delays. I do plan to try this tonight.

Another thing I plan to try is make sure that the INT0 logic works. Will write a simple attachInterrupt(0,...) program and try it out. Other than those, I'm beginning to run out of ideas, on why this might not be working.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 24
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I hate to bring back the old topic, but I am attempting to do exactly what you tried..Did you ever get a solution?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 117
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On ATtiny45/85, sorry I didn't find a solution. My code worked perfectly on Arduino.
Logged

Pages: [1]   Go Up
Jump to: