#avr Logs

Oct 16 2018

#avr Calendar

05:04 AM nikomo_ is now known as nikomo
10:58 AM nohit: --
10:59 AM polprog: --
11:00 AM _ami_: \o/
11:00 AM * _ami_ waits for arch to finish up the updates.
11:01 AM polprog: i updated my arch recently
11:01 AM polprog: should reboot
11:01 AM _ami_: yup, always reboots it after kernel upgrade.
11:01 AM polprog: havent rebooted in over a month, 32 days
11:02 AM _ami_: :)
11:02 AM * _ami_ brb
11:03 AM polprog: oh my, he hasnt got a irc-only machine/vps
11:03 AM polprog: or bouncer
11:20 AM LeoNerd: rue_mohr: Hi
12:40 PM [1]MrMobius is now known as MrMobius
06:55 PM rue_mohr: ugh
06:55 PM LeoNerd: troubles?
06:55 PM rue_mohr: zippo:/files/programming/c/motif/five# uptime
06:55 PM rue_mohr: 16:55:22 up 78 days, 22:58, 16 users, load average: 2.04, 1.57, 1.32
06:55 PM rue_mohr: no
06:55 PM rue_mohr: oh its you
06:55 PM rue_mohr: Iw as going to say
06:56 PM rue_mohr: I been trying to get ahold of leonerd for 3 days now and today he just says hi
06:56 PM rue_mohr: LeoNerd, did you do the t13 serial -> pwm 4 channel?
06:56 PM LeoNerd: I'm always here; just leave me a message
06:57 PM LeoNerd: Nope, just one
06:57 PM rue_mohr: oh
06:57 PM LeoNerd: Was all I needed
06:57 PM rue_mohr: did you do software pwm then?
06:57 PM LeoNerd: Hardware
06:58 PM rue_mohr: I wanted a dual channel motor control bridge for my robots
06:58 PM rue_mohr: LeoNerd, so, your timer does the serial and the pwm?
06:58 PM LeoNerd: Yup :)
06:58 PM rue_mohr: k
06:59 PM LeoNerd: PWM was only for LED dimming, so rate wasn't important. Only duty cycle
06:59 PM rue_mohr: actaully, the timer rate has a lot more room after I decided not to try to use 1byte/rollover
06:59 PM LeoNerd: Use one compare channel for serial timer, other for PWM
06:59 PM rue_mohr: oooh, no I play with the actaul counter value in my serial code
06:59 PM rue_mohr: casue when there is an edge, I trim the timer to 1/2 bit
06:59 PM LeoNerd: Ahh. I don't
07:00 PM LeoNerd: I nudge the OC value
07:00 PM rue_mohr: ooh, to current+1/2bit
07:00 PM LeoNerd: yup
07:00 PM LeoNerd: Did you see my code?
07:01 PM rue_mohr: http://paste.debian.net/1047659/
07:01 PM rue_mohr: ^^ did you see mine?
07:01 PM rue_mohr: (I didn't see yours)
07:01 PM rue_mohr: you show me mine, and I'll show you yours
07:02 PM rue_mohr: wait...
07:02 PM rue_mohr: reverse that
07:02 PM rue_mohr: thats just the serial stuff
07:03 PM rue_mohr: main is pretty clean
07:03 PM rue_mohr: http://paste.debian.net/1047662/
07:03 PM LeoNerd: [repost] But otherwise, yes mine looks fairly similar in logic - https://paste.debian.net/1047384/
07:06 PM rue_mohr: I love the similarities
07:06 PM rue_mohr: its a good point, my bit counter should go down
07:07 PM rue_mohr: gonna sleep 2 hours
07:07 PM rue_mohr: going to go to bed so I dont wake up numb
10:28 PM rue_shop3: LeoNerd, hmm, my code doesn't nicely convert to using decerementive bit counting, the start state gets messed up
10:39 PM rue_mohr: hmm, ok, so the t13 has two hardware pwm
10:40 PM rue_mohr: but I have another interrupt I an use for timing
10:40 PM rue_mohr: the ADC
10:40 PM rue_mohr: hmmm
10:40 PM rue_mohr: iirc its a sar
10:41 PM rue_mohr: so, if I set it to vref, it should takea consistant amount of time to answer...
10:41 PM rue_mohr: or I re-arrange how I'm using the timer
10:50 PM rue_mohr: the docs imply that the adc always takes 13 cycles
10:51 PM rue_mohr: so, 9.6Mhz, /13, then using an 8 bit count, would make for 2.9ishKhz pwm
10:52 PM rue_mohr: down is 1.4ish
10:53 PM rue_mohr: 721hz
10:53 PM rue_mohr: 360Hz
10:53 PM rue_mohr: hmm
10:53 PM rue_mohr: fora motor, 360Hz sounds ok
10:55 PM rue_mohr: about an F#
10:56 PM rue_mohr: its really close to an F# if I have the max pwm value at 249
10:57 PM rue_mohr: that might even be within the error on the 9.6Mhz source clock
10:58 PM rue_mohr: do,
10:58 PM rue_mohr: er, so
10:59 PM rue_mohr: I could make a D major B major, or B minor chord with an F#
11:23 PM day__ is now known as day