#avr Logs

Sep 16 2018

#avr Calendar

12:10 AM Ameisen- is now known as Ameisen
12:27 AM rue_mohr: I have an old backup of wormfoods baud calcultor
12:27 AM rue_mohr: I wonder if I should see if I can buy the domain
03:47 PM Smashcat: Hi, I'm putting an ATTiny44 into deep sleep, to wake from external interrupt on pin B2. This seems to be working, however when it wakes, it resets the chip, so the setup code runs again, instead of just continuing from the sleep statement. Is this normal behaviour?
04:34 PM cehteh: Smashcat: no, bug in your code
04:44 PM Smashcat: cehteh: Yeah, turns out that PB2 actually calls PCINT1, not PCINT0 as it says in the datasheet. Weird, but working now.
04:45 PM cehteh: i bet datasheet is right and you are wrong somehow :D .. debug it
04:47 PM Smashcat: cehteh: Meh, checked it, code is fine :) Anyway working now, using the "wrong" interrupt handler :)
04:48 PM cehteh: yes. something in your setup is wrong then, maybe wrong part id when you compile or something likethat
04:54 PM Smashcat: Maybe the AVR libraries don't match it - using the right part here. Datasheet definitely says that PCINT10 is called by hardware external interrupt on B2. The A port should be on PCINT1. However, setting interrupt on B2 calls PCINT1_vect .
05:00 PM cehteh: mabe tiny44 is bit exotic, still i would try to debug that and possibly check for bug reports/fixed .. otherwise on a update with a potential fix your program wont work again
05:01 PM Smashcat: Yeah, I'm writing something on the AVR forums to check why this is happening.
06:19 PM rue_mohr: Smashcat, your startup vector code isn't right
06:19 PM rue_mohr: it needs to check a flag to know if the restart is a continuation from a sleep or not
06:20 PM rue_mohr: er...
06:20 PM rue_mohr: hmm
06:21 PM rue_mohr: also be aware that floating pins will pick up signals from adjacent pins
06:40 PM Smashcat: rue_mohr: It all works fine. None of the pins are floating - the interrupt pin is pulled low via an external resistor.
06:40 PM Smashcat: There's no need to check a flag for this code, it just continues when the interrupt fires.
10:37 PM rue_shop3: ok, cool I had an uno that was out to lunch, replaced the ch340 and its ok now!
10:37 PM rue_shop3: yay!
11:19 PM day__ is now known as day