#avr | Logs for 2015-04-12

Back
[05:03:55] <avrdude> I accidentally put 5V on my ADC input, while Vcc is 3.3V
[05:04:03] <avrdude> how bad is this?
[05:04:23] <avrdude> datasheet says max rating on any pin is Vcc+0.5
[05:04:36] <avrdude> the chip appears to be working
[05:06:32] <theBear> dum dum daaaaahhhh! probly not bad, if you read a bit more between the lines (said lines being chapters apart from one another) you'd see it means that about .5v either side of the power rails an internal per-pin regular silicon diode will clamp/"short" your signal to the rail
[06:01:26] <oal> I'm trying to use ICR on an Atmega128. When I read the register value, how can I convert that to seconds/ms? Do I divide by F_CPU?
[06:03:33] <specing> you multiply with tick time
[06:04:26] <specing> once you have established how long one cycle is, due to crystal tolerance
[06:08:37] <oal> hmm, just to make sure I understand this: my F_CPU is 4000000, and I use a prescaler of 64 to have the timer interrupt run every second. Then I set up input capture, which will then give me the time since the timer interrupt last fired?
[06:13:24] <specing> "timer interrupt run every second" -> "timer interrupt run every second with +- X tolerance"
[06:31:09] <ambro718> Hey, I see avr-gcc turns 2*float into float+float and float/2 into float*0.5. Is that really efficient?
[06:32:05] <ambro718> why not ldexp(double, 1) and ldexp(double, -1) ?
[06:32:54] <ambro718> ... which would end up little more than incrementing/decrementing the exponent bits
[06:53:22] <oal> specing, so tick is 4000000/64 (62500), and ICR1 copies TCNT1 when invoked, doesn't that mean I need to do IRC1/62500 to get the time, in seconds, since the last timer interrupt?
[06:53:55] <oal> OCR1A = tick
[06:55:11] <xrlk> i have a pace st 25 is this ok
[06:55:14] <specing> oal: except your frequency isn't 4000000
[06:55:34] <specing> ambro718: avr-gcc has ... weirdness
[06:56:40] <oal> specing, I'm missing something then. How'd I find the frequency?
[06:56:57] <specing> oal: crystal tolerance
[06:57:09] <specing> oal: you need to sync it to world timebase somehow
[06:57:15] <Ad0> has anyone used SIM900A ?
[06:57:30] <specing> unless you are fine with mcu "second" being != world second
[06:57:52] <oal> specing, I am. This is a stop watch kind of thing :)
[06:58:44] <oal> Doesn't need to be accurate beyond ~1/100 second
[06:58:55] <specing> ok then
[06:59:30] <oal> So then my calculation is ok?
[07:03:17] <specing> hmm
[07:03:59] <specing> at 4000000 Hz, one cycle is 250 nanoseconds
[07:10:52] <oal> specing, but with a prescaler of 64, doesn't it work out to do ICR1 / 62500 * 100 to get hundredths of a second since the last timer interrupt (TIMER1_COMPA_vect)?
[07:14:34] <specing> with a prescaler of 64, once timer tick is 16 us
[07:14:45] <specing> one*
[07:18:19] <oal> This is how I set things up: http://hastebin.com/afosuheton.c
[15:17:20] <Ad0> wonder if anyone implemented a full BTLE stack
[15:17:38] <Ad0> for NRF24L01 +
[15:35:14] <Lambda_Aurigae> since when is the nrf24l01 bluetooth compatible?
[15:36:22] <Ad0> http://dmitry.gr/index.php?r=05.Projects&proj=11.%20Bluetooth%20LE%20fakery
[15:36:41] <Lambda_Aurigae> aahh.
[15:37:16] <Lambda_Aurigae> but is it actually bluetooth compatible or just looks like it on another mode?
[15:37:18] <Ad0> but that's just public broadcasting though
[15:37:27] <Ad0> just beaconing :P
[15:37:37] <Ad0> I wondered if someone went full bluetooth on it
[15:37:39] <Ad0> hehe
[15:37:44] <Ad0> supporting pairing and everything
[15:37:54] <Ad0> cause there's quite a price difference
[15:38:52] <Lambda_Aurigae> not sure the nrf chips I have will do that..they are the first generation.
[15:39:16] <Lambda_Aurigae> I got a whole bunch of them on little boards with SMT antennas way back when.
[16:06:19] <Ad0> http://no.rs-online.com/web/p/bluetooth-modules/8289024/
[16:07:01] <Lambda_Aurigae> I would say it's Greek to me but I know it's some other language, just not which one.
[16:10:03] <Ad0> http://uk.rs-online.com/web/p/bluetooth-modules/7870449/
[16:11:00] <Lambda_Aurigae> it was attempted humor.
[16:12:48] <Ad0> hehe