#avr | Logs for 2015-03-31

Back
[04:18:01] <MANGESH> hello i am getting getting error while working on avr studio which is working on windows8.164bit
[04:19:32] <MANGESH> ../try.c:18: fatal error: opening dependency file dep/try.o.d: No such file or directory
[04:20:02] <MANGESH> evem for simplest programmer
[04:20:10] <MANGESH> programs
[04:24:06] <Fleck> windows? what is that? :D
[04:28:40] <malinus> 164bit?
[04:28:44] <malinus> wow
[04:31:26] <Fleck> :D
[04:31:47] <Fleck> no, 8.164bit malinus!!! :D
[04:36:17] <LeoNerd> Lambda_Aurigae: Was it you who suggested me the R-2R ladder for my analog button chain, by the way? I have a question/comment to make on it
[04:59:04] <Dominykas> Hey guys, i have a strange problem, i send out a pulse every 2 seconds to a CD4017, but the problem is, that the cd4017 doesnt react to the pulse, kinda
[04:59:36] <Dominykas> When i touch with my voltmeter the ground, and the positive lead to the pulse pin on my atmega8, everything works
[05:01:29] <Dominykas> i checked, looks like every pin connection is solid.
[05:02:15] <Dominykas> when i touch the pulse wire it looks like the leds start to aradicly turn on
[05:04:18] <Dominykas> Could this be a grounding issue?
[05:04:31] <Dominykas> i can take photos, tho there are a lot of wires
[05:33:51] <julius_> hi
[05:39:16] <julius_> looking at this datasheet, how high is the inrush current the relais can withstand? http://www.mycomkits.com/reference/Songle_SRD%28T73%29_Relay.pdf cant seem to find it
[06:19:46] * LeoNerd wonders to himself if a 5msec timer is fast enough to do "software PWM" on some LEDs to make a pulsing glowing effect
[08:46:03] <rue_bed> LeoNerd, as long as your not more than 0-4, sure
[08:46:37] <LeoNerd> Huh?
[08:47:03] <rue_bed> much more than 20ms and you will see it flash for sure
[08:48:55] <LeoNerd> Oh.. I can do much better than that, surely
[08:49:05] <LeoNerd> See: an entire 3 decades of dithering algorithm research ;)
[08:49:13] <LeoNerd> (IDDA, Floyd-Warshall, etc...)
[08:49:24] <LeoNerd> ((though I think F-W is a specifically 2D algorithm and doesn't work on 1D time)
[08:50:08] <LeoNerd> I have some code that probably works, but I don't have the dev hardware on me yet to doublecheck, so I'll have to wait til I get home
[09:18:30] <rue_house> not if you only have a min pulse of 5ms
[09:24:04] <LeoNerd> Ah, well yes.. my pulses are currently 5msec
[09:24:25] <LeoNerd> Which I *think* still lets me give a reasonable ramp up and down over a second... 500msec up, 500 down.. that's 100 cycles each way
[10:32:58] <uskerine> Hi, I am trying to port this C++ library (http://pastebin.com/qhtsetU7 http://pastebin.com/S0NPf3wX) into C (http://pastebin.com/kFu3SH8b http://pastebin.com/CGMMWVLZ) but I am missing something as lcd_string_format method is not working fine (the other routines seem to be ok). Any tip on porting this routine is welcomed. Thanks
[10:38:52] <timemage> uskerine, it look like the entire function is missing.
[10:41:47] <uskerine> :?
[10:41:51] <uskerine> let me check
[10:44:30] <uskerine> I fixed it, it was that the .h function names definitions where not updated
[10:44:33] <uskerine> were*
[10:46:59] <timemage> uskerine, dunno what you mean by that. you're all done?
[11:35:34] <uskerine> yeah it is working now thanks timemage
[11:35:50] <uskerine> I moved the naming convention from foo_bar to fooBar but I forgot to change those names in the .h file
[11:42:11] <uskerine> any recommended AVR library/code examples for ESP8266?
[12:31:11] <LeoNerd> Woo. Someone actually ordered something from my Tindie shop :)
[12:43:31] <N1njaneer> LeoNerd: Awesome, congrats!
[12:44:05] <LeoNerd> now I have to order bits to make up another one so I have another spare again...
[12:47:13] <N1njaneer> Mmmm, always the challenge!
[12:47:55] <LeoNerd> The challenge is remembering where I ordered the last ones from...
[12:48:17] <N1njaneer> Useful to keep a build doc with suppliers and supplier part numbers :)
[12:59:14] <LeoNerd> That might be an idea, though this was eBay..
[12:59:25] <LeoNerd> Best source of SOIC test sockets for what I consider reasonable prices
[12:59:54] <N1njaneer> Are you preprogramming chips?
[13:00:18] <LeoNerd> Hm? I'm not shipping chips - this is a test adapter
[13:00:25] <N1njaneer> What are you testing?
[13:00:26] <LeoNerd> https://www.tindie.com/products/leonerd/attiny-14pin-soic-to-pdip-adapter/
[13:00:33] <LeoNerd> Just read the desc ;)
[13:01:01] <LeoNerd> Unrelated question: how accurate should I consider the documentation in the datasheet of the "1.1V bandgap reference" on the ADC on a tiny84?
[13:01:24] <LeoNerd> I'm getting slightly different measurements of what my 'tiny thinks the battery voltage is, vs. what I can measure by multimeter
[13:01:38] <N1njaneer> Ahh, desc makes more sense :)
[13:02:18] <N1njaneer> LeoNerd: The bandgap is going to generally be more accurate than the error in the ADC. Check out the section about ADC error in the datasheet.
[13:02:24] <LeoNerd> Hmmm
[13:02:56] <LeoNerd> I'm getting very repeatable answers, just the number is a little off
[13:03:17] <LeoNerd> Though it could equally be my MM - it's not the most expensive thing ever and I don't think it's been calibrated since I bought it maybe 10 years ago..
[13:03:19] <LeoNerd> Maybe more
[13:03:49] <N1njaneer> I would check AVR to AVR is possible.
[13:04:02] <N1njaneer> +if
[13:04:34] <LeoNerd> Mmm
[13:04:45] <LeoNerd> That needs more boards. :) Which I think are inbound from the fab as we speak
[13:05:49] <LeoNerd> OHyeah, the other thing: the datasheet says that the first conversion after switching reference may be invalid, best to discard it and try again
[13:06:03] <N1njaneer> If you ever need more volume on board assembly let me know - we'll be looking to keep the new pick and place busy once it arrives :)
[13:06:04] <LeoNerd> I'm also finding that the first conversion after switching MUX is really unreliable, even if I keep the reference the same
[13:06:14] <LeoNerd> I'm making 3 of them. Hardly high-volume ;)
[13:06:27] <N1njaneer> Yes, you need to wait a period of time for a valid reading after the MUX is switched :)
[13:06:51] <LeoNerd> Hmm
[13:06:54] <N1njaneer> If I need multiple ADC inputs, I usually set up a timer and state machine
[13:07:04] <LeoNerd> Timers I can do
[13:07:14] <LeoNerd> ... my microRTOS will cope with that :)
[13:07:38] <N1njaneer> Basically the timer fires, reads the ADC in to a variable in an array, then advances the MUX, so that the next time the timer fires the data has settled, etc.
[13:08:08] <N1njaneer> The other upshot to this is that it all happens completely asynchronously, so you can just read the values in the array at any time for any channel.
[13:08:20] <LeoNerd> Ah cute
[13:08:28] <N1njaneer> I just handle it all in an ISR
[13:08:46] <N1njaneer> Then you don't have to worry about scheduling reads, etc. Works very well.
[13:08:48] <LeoNerd> Yeah I don't need it quite that much.. I just switch between reading the IREF vs. reading ADC2, as compared to VCC
[13:08:56] <LeoNerd> Former for battery monitor, latter as the analog button read chain
[13:09:46] <LeoNerd> I only need the battery every 10 seconds, but the button chain is read every 50msec while there's at least one button held
[13:09:56] <LeoNerd> So timing that might get awkward
[13:11:17] <N1njaneer> Or just read everything every 50ms :)
[13:11:42] <LeoNerd> Mm.. that might eat more battery
[13:11:54] <LeoNerd> I don't mind code complexity if it saves battery
[13:46:27] <LeoNerd> How can I force a reset?
[13:47:03] <Tom_itx> wdt
[13:48:09] <LeoNerd> Hmmmm...
[13:48:28] <LeoNerd> I'm not currently using WD... perhaps I should
[13:50:35] <Tom_itx> unless it's a mega32U2 then you can take PC1 low
[13:50:39] <Tom_itx> that will reset
[13:51:44] <Tom_itx> ask me how i know...
[13:52:01] <Tom_itx> i wrote a blinky to blink all the ports and it wouldn't get past PORTC
[13:52:52] <LeoNerd> Mmmmm, Atmel say not to do that
[13:53:10] <LeoNerd> Since tristate happens early in the reset process
[13:53:29] <Tom_itx> not to do what?
[13:53:31] <LeoNerd> Also this wdt seems easy enough; I didn't realise it was dynamically configurable
[13:53:57] <LeoNerd> Not to use the device's own IO lines to assert its RESET state
[13:54:12] <Tom_itx> oh, that wasn't intentional :)
[13:59:35] <LeoNerd> Ah
[14:45:45] <LeoNerd> So related question: how do I effectively poweroff?
[14:46:18] <LeoNerd> If the battery hits the emergency "we must really stop now really really" level, I have no choice but to just powerdown the radio, turn off all the LEDs and halt the CPU. Can I just CLI; SLEEP ?
[14:46:32] <LeoNerd> (presumably also using the powerdown register to turn off all the other periphs)
[14:55:50] <Tom_itx> pull the pug
[14:55:52] <Tom_itx> plug
[14:56:03] <Tom_itx> quite effective
[15:43:04] <LeoNerd> Tom_itx: I mean... in software.
[16:22:05] <mark4> if i wanted to zip up an inactive / file system are there any files/directories i do not want to include in the bz2?
[16:25:19] <specing> "zip up"
[16:25:22] <specing> "in the bz2"
[16:25:49] <specing> one does not simply archive /
[17:00:10] <LeoNerd> So the answer is: No. 5msec (200Hz) is too slow to do decent PWM of an LED
[17:03:02] <specing> depends on the period
[17:03:12] <N1njaneer> You want at least 1Khz minimum to not look abysmal. We use 62Khz for our PWM so there is zero flicker ever.
[17:03:35] <specing> if PWM top is > 5 then you have problems
[17:03:41] <N1njaneer> You can also spread-spectrum the PWM with additional logic to reduce preceiver flicker.
[17:03:50] <LeoNerd> I'm doing SS already, yup
[17:04:00] <malinus> but guys
[17:04:01] <LeoNerd> Just 200Hz is messy. I'm gonna try 1k
[17:04:09] <malinus> the human eye can only see 30Hz ;)
[17:04:20] <LeoNerd> Ideally I don't want to be too fast because that wakes up the CPU more often...
[17:04:26] <LeoNerd> Though I could do dynamic clock.. hmm
[17:04:30] <N1njaneer> malinus: If the source or eye isn't in motion, 30Hz is barely enough :)
[17:05:02] <malinus> N1njaneer: I've heard people clame it in all seriousnes.
[17:05:26] <N1njaneer> Yeah, arm-chair engineering is so much easier than having first-hand experience :)
[17:06:20] <specing> malinus: false
[17:06:41] <malinus> it was a joke - hence the ";)"
[17:06:44] <specing> malinus: human vision is not limited in Hz as it is not clocked
[17:07:02] <malinus> are you sure it isn't clocked though?
[17:07:08] <specing> it isn't
[17:07:26] <malinus> are you telling me I'm not harvard architecture?
[17:07:35] <specing> our brains (and with that, the visual cortex) are neural networks
[17:07:45] <N1njaneer> We PWM our lighting fixtured at ~62Khz spread-spectrum for 16-bit depth, then do the actual value updates at 500 updates per second, as you can easily see 30-40 updates/second just in light source value steps if the transition is large enough over about a quarter-second interval. Looks terrible otherwise.
[17:07:54] <specing> essentially super-parallel asynchronous processing
[17:08:06] <malinus> specing: quantum computing?
[17:08:24] <N1njaneer> +fixtures
[17:08:29] <specing> every neuron is a kind of a processor and you have several trilion or so
[17:08:38] <malinus> specing: wait, so an fpga?
[17:08:54] <specing> malinus: like an analog fpga
[17:09:04] <malinus> I wish they made those
[17:09:05] <N1njaneer> malinus: If my brain IS Harvard architecture, that would probably explain a LOT
[17:09:09] <N1njaneer> malinus: They do.
[17:09:24] <malinus> they do? I've searched for it at some point.
[17:09:25] <malinus> Oh well
[17:09:49] <N1njaneer> malinus: http://www.anadigm.com/
[17:10:04] <malinus> time to make a brain on one of those: entity ADDER is
[17:10:10] <specing> malinus: we still do not know what goes on in our brains
[17:10:12] <malinus> *BRAIN
[17:10:22] <specing> it takes whole supercomputers to simulate that of a mice
[17:10:23] <N1njaneer> They've been around a while - lots of very unique things you can do with their products for certain demanding appliations :)
[17:10:51] <malinus> entity BRAIN is: port( inHunger: in std_logic; [...])
[17:11:36] <malinus> FPAA, the name makes sense
[17:13:21] <specing> It is quite possible that a major paradigm shift in both hardware and software will be needed before we can crate a self aware machine
[17:13:26] <specing> create*
[17:13:55] <N1njaneer> Then The Singularity happens, and nothign matters anymore :)
[17:13:55] <Lambda_Aurigae> we have to create self-aware humans first.
[17:14:21] <N1njaneer> Lambda_Aurigae: That's probably 100-200 years off I imagine, if ever!
[17:14:27] <malinus> specing: I can't see how a single neuron is kind of a processor. Isn't it just a fancy mutliplexer?
[17:14:58] <Lambda_Aurigae> malinus, I don't believe we even know everything that happens in a single neuron.
[17:15:00] <specing> Lambda_Aurigae: first kill religion. After that progress will take off
[17:15:01] <N1njaneer> malinus: A neuron is a multiplexer with soul! :D
[17:15:13] <specing> malinus: far from it
[17:27:19] <LeoNerd> Even 1kHz isn't great here.. :/
[17:27:42] <LeoNerd> It's not too bad at ~50% duty cycle, but it looks pretty horrible at the very dim end
[17:29:04] <LeoNerd> Maybe I'm just not meant to do sofware PWM :P
[17:36:29] <N1njaneer> Low end is always very, very difficult to tackle well :)
[17:40:34] <LeoNerd> Buuuuut
[17:40:40] <LeoNerd> Hah! Jammie or what...
[17:41:21] <LeoNerd> At really low brightness (<5%), instead of making an on/off decision, I'll just pulse the LED on for a short duration.. so I'll actually block for up to 5% of the 1msec time, but that's OK
[17:41:52] <LeoNerd> Once the duty cycle is in the 5-95% range, I'll make the usual IDDA on/off decision and return quickly. Then finally at the >95% I'll do the inverse
[17:42:16] <LeoNerd> Hmm.. still some timing noise from the radio interrupts though and I don't know why :(
[18:02:52] <LeoNerd> Things to try tomorrow: sweep 25-75% only, avoid the extremes
[18:29:25] <ferdna> Tom_itx, can i priv msg?