#avr | Logs for 2015-12-15

Back
[01:41:10] <Krampus> What could cause an AVR with a 16mHz crystal to have prescale /1 and /2 both give me an 8mHz CKOUT?
[01:45:39] <Xark> Krampus: Perhaps not really settings /1 ? I am pretty sure I have gotten 16Mhz from clkout pin.
[01:50:10] <Krampus> Xark: CLKPR is zero.
[01:53:06] <Krampus> oh, hahaha, nevermind I'm dumb. I just realized "Wait, how fast can my logic analyzer catch edges?"
[01:53:41] <Krampus> Tops out at 24MS/s, so that explains the weird duty cycle on it as well. :)
[01:54:00] <Xark> :)
[01:54:05] <Krampus> Yep, just confirmed with my scope.
[01:54:23] <Krampus> Which is literally next to the logic analyzer, I was just too lazy to turn it on.
[01:54:26] <Xark> Excellent. :) Good thing to remember.
[01:54:38] <Xark> Need a warning sticker on LA. :)
[01:55:19] <Krampus> "Warning! NyQuist is an all up in your business!"
[02:14:52] <Krampus> hm. Ok, clock input is correct... problem looks like my counter interrupt isn't firing at the counter but rather when it overflows.
[02:15:24] <Krampus> (pulses are 65536 times longer than they ought to be. :))
[02:19:48] <Xark> :)
[02:34:09] <ThatDamnRanga> check your counter mode setting
[06:58:28] <Arch-TK> anonnumberanon: The idea I came up with is to basically loop repeatedly and check the state of each input, increment a variable if it's high and decrement if it's low, and then basically do a software schmidt trigger hysteresis kind of thing.
[06:59:16] <Arch-TK> anonnumberanon: (I increment of course without overflowing)
[06:59:28] <Arch-TK> Just an idea I did as a test.
[06:59:46] <Arch-TK> There's more simple ways to do it of course.