#avr Logs

Mar 23 2019

#avr Calendar

12:47 AM day_ is now known as day
03:09 AM plouf: ok
04:08 AM rue_mohr: anyone have pwm init code for m328 ?
04:23 AM [1]MrMobius is now known as MrMobius
09:46 AM Bushman: hi
09:47 AM Bushman: i've spent hours trying to port my code from ATmega16 to ATmega328 and the last thing that's holding me back seem to be the timer interrupts
09:47 AM Bushman: i've read both datasheets trying to find what could be the difference but i just can't find it, the code still doesn't work.
09:48 AM Bushman: can someone take a look at it and see what i'm doing wrong?
09:48 AM Bushman: this is a portion of the code i'm talking about: https://pastebin.com/Pha5KU6K
09:49 AM Bushman: the vector seems to never be executed cause the LED never lights up
09:50 AM Bushman: (FYI: i might have trimmed out the part where i set the LED pin as output :P)
10:00 AM mwette: TIMSK0 => TIMSK1 ??
10:00 AM mwette: and I think you need to set up TCCR1A
10:01 AM mwette: and did you enable with PRR &= ~_BV(PRTIM1)
10:03 AM Bushman: oooooh
10:04 AM Bushman: such a stipid mistake
10:04 AM Bushman: let me correct that and see if it works
10:04 AM Bushman: (that's what happen when you have a mess in your code
10:04 AM Bushman: )
10:12 AM Bushman: yup. it was that simple
10:13 AM Bushman: mwette: thanks for the rubber duck debuging ;)
10:13 AM mwette: YVW
11:45 AM rue_bed2: quack quack
11:48 AM Thrashbarg: o< Quack!
12:39 PM DarkZero is now known as horohoro
09:27 PM rue_mohr: ok, I need to get pwm working on a m328
09:28 PM rue_mohr: which, oddly enough, I dont seem to have done before