#avr | Logs for 2013-01-03

Back
[01:15:35] <MrCurious_> guessing abcminiuser doesn't come here of late?
[01:49:41] <sabesto> nick seen 2 weeks ago
[01:50:36] <inflex> MrCurious_: probably has a life :\
[01:50:59] <MrCurious_> a life. ok, now i am jealous
[01:51:57] <MrCurious_> any LUFA experts here?
[02:20:30] <inflex> not me
[02:20:42] <inflex> I'm too much of a primative and still fall back on nasty bitbashed serial
[03:07:44] <OndraSter_> abcminiuser, !!
[03:07:45] <OndraSter_> heya
[03:07:55] <OndraSter_> how's it going in the norway again? :)
[03:08:19] <abcminiuser> Heihei
[03:08:29] <abcminiuser> Dealing with jetlag, got back yesterday evening
[03:08:39] <OndraSter_> jetlag?
[03:08:41] <abcminiuser> Now I've got a ton of unpacking to do, plus apparently I need to bake the weekly cake :S
[03:08:51] <abcminiuser> Ja, it's a 9 hour time zone difference
[03:08:54] <OndraSter_> oh that
[03:09:36] <OndraSter_> btw, I am doing my USB stack for xmega - it works on my laptop just fine, on PC it enumerates on 3rd try (3rd reset from PC) but when I reset it via button or power on, it does not receive single packet. But only on PC! On laptop it always works! :D
[03:11:04] <OndraSter_> if I Reset it via PDI (programming, or just by opening tools to read fuses etc) it works just fine
[03:11:43] <MrCurious_> abcminiuser: i want to use atmega8u2 or atmega16u2 with arduino ide and flash over usb. is that something that you have seen done before? and might perchance have a tip on what i can search out to get up to speed on how to do it?
[03:12:20] <OndraSter_> poor abc, still unpacking and adjusting to nearly UTC ... :)
[03:12:28] <OndraSter_> already overwhelmed by questions
[03:12:36] <abcminiuser> BRAIN MELT
[03:12:48] <MrCurious_> ignore my question, it can wait. i will re-find you and re-ask in a few days
[03:13:04] <MrCurious_> welcome back to atmel land :D
[03:13:16] <abcminiuser> MrCurious_: do you mean you want to reprogram a custom board with Arduino sketches? If so you can use my CDC bootloader on the USB AVR parts and it should work with AVRDude
[03:13:46] <MrCurious_> that is exactly what i want. thanks i will research that and give it a go :)
[03:13:49] <abcminiuser> And since Arduino uses AVRDude internally for programming, that means it should work with the IDE
[03:14:15] <abcminiuser> OndraSter_: Hrm, how are you resetting the USB controller?
[03:14:26] <MrCurious_> ty vm
[03:14:45] <OndraSter_> resetting from the bus? detaching the USB data lines, resetting all endpoints, attaching back on
[03:20:17] <OndraSter_> the weirdest part is that on laptop it works. Always.
[03:22:12] <OndraSter_> oh and during USB Reset I am of course setting address to 0 again
[06:58:09] <sabesto> what does this notation mean? "ax == 0.0f", its from some PIC C code
[06:58:26] <sabesto> float?
[06:58:40] <sabesto> like casting
[06:59:34] <yunta> yes, http://www.cplusplus.com/doc/tutorial/constants/
[07:34:20] <lumpe3> Bom dia
[07:34:51] <lumpe3> alguém V aí ?
[07:51:56] <treva> Alguém aí pode me dar v uma ajuda com um Crystal para atmega 328
[08:00:21] <Steffanx> Uhm..
[08:01:07] <Steffanx> Who speaks Portuguese ? :)
[08:16:09] <GuShH> Steffanx: I do...
[08:16:15] <GuShH> he asked for help with a xtal for the atmega 328
[08:16:33] <GuShH> then timed out, presumably because he got caught stealing wifi?
[08:16:35] * GuShH nods
[08:17:10] <OndraSter_> haha
[08:18:30] <GuShH> "could someone there give me some help with a crystal for the atmega 328" I can read portuguese, even when it's horribly broken. I just can't speak or write the damn thing... too difficult.
[08:18:41] <GuShH> Likewise with Italian, why do I suck so much?
[08:18:57] <GuShH> At least it helps to know when someone is insulting you.
[08:19:03] <OndraSter_> heh
[08:19:07] <OndraSter_> I know only english
[08:19:10] <OndraSter_> and a little bit of german
[08:19:24] <OndraSter_> VERY little.
[08:19:30] <OndraSter_> and czech of course
[08:19:48] <Steffanx> They don't teach you german in Czech?
[08:22:04] <OndraSter_> they tried for 4 years
[08:22:06] <OndraSter_> :P
[08:22:28] <OndraSter_> whole 2nd half of the primary school
[08:22:32] <OndraSter_> (those 4 years)
[08:22:40] <OndraSter_> and then I had german no more
[08:22:42] <OndraSter_> on middle school
[08:32:19] <GuShH> lol
[08:32:32] <GuShH> I had Engrish at school...
[08:34:46] <Steffanx> You are not from yankeeland?
[08:44:01] <Steffanx> abcminiuser_ is alive
[08:44:33] <abcminiuser_> Steffanx, allegedly
[08:45:15] <abcminiuser_> Jetlagged from the trip back last night
[08:48:37] <OndraSter_> abcminiuser_, how's it going... I have noticed that atmel has got now new chips in xmega.. e5 series
[08:48:49] <OndraSter_> I suppose they will be something like 32 pins
[08:48:53] <OndraSter_> and they go down to 8kB of flash
[08:49:00] <OndraSter_> but what E series will pack..
[08:49:02] <OndraSter_> ethernet?
[08:49:15] <OndraSter_> or mix of C and A series? :D
[08:49:19] <OndraSter_> damn this tension!
[08:49:41] <abcminiuser_> OndraSter_, the XMEGA E?
[08:49:47] <abcminiuser_> How'd you hear about that?
[08:49:56] <OndraSter_> ASF release notes
[08:49:59] <OndraSter_> or AS6SP2 release notes
[08:50:02] <abcminiuser_> Ah :)
[08:50:04] <OndraSter_> actually
[08:50:07] <OndraSter_> I can open its xml
[08:50:08] <OndraSter_> in AS
[08:50:13] <OndraSter_> and check what peripherals are there :D
[08:50:17] <abcminiuser_> Well I can't spoil the suprise, but you can do so yourself
[08:50:26] <abcminiuser_> Yes - check the part header or the part XML
[08:50:27] <OndraSter_> module XCL
[08:50:28] <OndraSter_> hmm
[08:50:29] <OndraSter_> that is new
[08:50:35] <OndraSter_> EDMA module, too
[08:51:26] <abcminiuser_> Aren't we a clever kitty :)
[08:51:52] <OndraSter_> Enhanced DMA controller
[08:51:57] <OndraSter_> let's see if I see some differences to regular DMA
[08:52:13] <abcminiuser_> It can do data matching
[08:52:22] <OndraSter_> data matching?
[08:52:42] <abcminiuser_> "If the sequence XY appears, fire a transfer"
[08:52:43] <OndraSter_> XMEGA
[08:52:43] <OndraSter_> CUSTOM
[08:52:44] <OndraSter_> LOGIC
[08:52:48] <OndraSter_> I see LUT!!
[08:52:49] <OndraSter_> yay
[08:52:51] <OndraSter_> FPGA?
[08:52:52] <OndraSter_> or CPLD
[08:52:54] <OndraSter_> builtin
[08:53:00] <abcminiuser_> 10 points to Gryffindor
[08:53:19] <OndraSter_> nice
[08:53:21] <OndraSter_> :)
[08:53:21] <abcminiuser_> It's not all that powerful, but you can do fancy-pants stuff like hooking it to the USART for custom framing
[08:53:51] <OndraSter_> I see some timer stuff in it too
[08:54:18] <OndraSter_> yep 32 pins
[08:54:20] <OndraSter_> package
[08:54:21] <abcminiuser_> There are examples inside ASF
[08:54:22] <OndraSter_> sounds nice
[08:54:48] <Richard_Cavell> are you talking about the new avrs again?
[08:54:52] <OndraSter_> yes
[08:54:55] <OndraSter_> they are completely new
[08:55:11] <abcminiuser_> Richard_Cavell, again?
[08:55:11] <OndraSter_> not announced other than in atmel studio release notes... unless I have missed some email from atmel
[08:55:29] <GuShH> New! New! New!
[08:55:30] <OndraSter_> I am now doing stuff on xmega128a4u though -- I like how the difference between 32 and 128 was $0.5 in 100pcs volume :D
[08:55:41] <abcminiuser_> OndraSter_, they were demo'd at Electronica in October
[08:55:41] <abcminiuser_> Not sure if there's a press release tho
[08:55:45] <OndraSter_> oh
[08:55:54] <Richard_Cavell> abcminiuser_: yes again
[08:56:00] <Richard_Cavell> So what do I need to know about the new ones?
[08:56:02] <OndraSter_> not again - still :)
[08:56:12] <OndraSter_> Richard_Cavell, some "FPGA"-like stuff
[08:56:19] <OndraSter_> onboard
[08:56:23] <Richard_Cavell> what?
[08:56:26] <OndraSter_> that explains the small flash
[08:56:29] <Richard_Cavell> FPGA stuff onboard an 8-bit AVR?
[08:56:37] <OndraSter_> it reminds me of those old Megas that had FPGAs on them, too
[08:56:59] <OndraSter_> I have never seen anybody use them though
[08:57:50] <abcminiuser_> Nothing quite so amazing
[08:58:03] <abcminiuser_> Just a couple of LUTs that can be connected to do a limited set of things
[08:58:09] <abcminiuser_> Like custom USART framing using a timer, etc
[08:58:17] <abcminiuser_> There are XCL examples in ASF
[08:59:12] <OndraSter_> PSoCs from Cypress have got something similar, but a bit bigger
[08:59:15] <OndraSter_> and with analog stuff too
[08:59:23] <OndraSter_> but they cost much more :)
[09:18:28] <OndraSter_> abcminiuser_, why did you put AES and DES into xmegas?
[09:18:31] <OndraSter_> it is pain to import them :(
[09:18:34] <OndraSter_> from the US
[09:18:36] <OndraSter_> well, export from the US
[09:19:31] <abcminiuser_> OndraSter_, heh I didn't do it
[09:19:45] <abcminiuser_> Incidentally, that's why we have seperate "S" versions of some UC3 devices
[09:19:56] <OndraSter_> heh
[09:19:59] <abcminiuser_> The non-S has no HW crypto, so they can be imported
[09:20:18] <abcminiuser_> I wonder when governments will figure out encryption works in software, too...
[09:20:24] <OndraSter_> probably never
[09:20:29] <OndraSter_> it is the US we are talking about :)
[09:28:59] <OndraSter_> yay!
[09:29:01] <OndraSter_> abcminiuser_, http://clip2net.com/s/2Fzjj
[09:29:03] <OndraSter_> my USB stack! :D
[09:29:26] <OndraSter_> now, test with fire. Reset via button!
[09:29:31] <yunta> I'm actually happy about AES in xmegas.....
[09:29:42] <OndraSter_> nope. nothing
[09:29:44] <OndraSter_> after reset
[09:29:47] <OndraSter_> I do not receive single packet
[09:29:57] <OndraSter_> but if I reset it via PDI it works.
[09:30:02] <OndraSter_> yunta, if you are in the US, sure.. :D
[09:30:05] <OndraSter_> but I dare you to export it
[09:30:27] <yunta> I'm in finland, not even trying to export.
[09:30:30] <OndraSter_> oh
[09:30:37] <OndraSter_> how do you import them then?
[09:30:52] <OndraSter_> Atmel told me to send email to the closest Atmel HQ -- which would be germany for me
[09:31:40] <yunta> I don't know, just marked "I'm the final customer" on digikey page, I guess.
[09:31:46] <OndraSter_> lol
[09:31:58] <OndraSter_> you know that if you sell them further you are obeying the law?
[09:32:08] <OndraSter_> err
[09:32:08] * abcminiuser_ puts on the Monty Python "Finland" song
[09:32:09] <OndraSter_> the opposite
[09:32:11] <yunta> yes
[09:32:18] <OndraSter_> heh
[09:32:49] <yunta> but if it's american export law - I don't care
[09:32:50] <yunta> :D
[09:32:54] <OndraSter_> :D
[09:32:55] <OndraSter_> lol
[09:32:59] <OndraSter_> you could be prosecuted.
[09:33:04] <OndraSter_> as a traitor
[09:33:04] <yunta> not here
[09:33:13] <OndraSter_> well you are selling military stuff
[09:33:15] <yunta> unless import is illegal
[09:33:25] <yunta> american law doesn't apply here
[09:33:28] <OndraSter_> I haven't read all the papers about it (tl;dr)
[09:33:29] <OndraSter_> heh
[09:33:49] <yunta> and btw, I'm not selling them anyway
[09:34:07] <yunta> I only do rental of the stuff I build.
[09:34:17] <yunta> makes things even more confusing :)
[09:34:32] <OndraSter_> lol
[09:34:47] <OndraSter_> chmpf I don't get it
[09:34:51] <OndraSter_> if I open tools -> device programming
[09:34:55] <OndraSter_> and let it eg read the device's ID
[09:34:58] <OndraSter_> it resets the chip via PDI
[09:35:02] <OndraSter_> and it enumerates on the PC just fine
[09:35:07] <OndraSter_> without single unneeded reset
[09:35:10] <OndraSter_> but when I reset it via button
[09:35:15] <OndraSter_> it just does 5 times reset on the bus
[09:35:16] <OndraSter_> and that's it
[09:35:19] <OndraSter_> I DON'T GET IT
[09:36:08] <yunta> just connect some bloody line monitor to it finally
[09:36:21] <yunta> maybe it never goes up/down or something
[09:36:26] <OndraSter_> I don't have any bloody line monitor
[09:36:30] <OndraSter_> but why does it not go up/down?
[09:36:38] <OndraSter_> what is the difference between external reset and PDI reset?
[09:36:50] <yunta> xmega / adc
[09:36:53] <yunta> I don't know :)
[09:37:04] <abcminiuser_> FINLAND FINLAND FINLAND, THE COUNTRY WHERE I QUITE WANT TO BE
[09:37:07] <abcminiuser_> Goddamnit
[09:37:11] <yunta> lol
[09:37:28] <OndraSter_> oops
[09:37:31] <OndraSter_> disconnected
[09:37:34] <yunta> OndraSter_: xmega/adc
[09:37:43] <OndraSter_> I got that line
[09:37:45] <OndraSter_> but what with that?
[09:37:55] <yunta> line monitor
[09:37:58] <OndraSter_> oh
[09:38:01] <OndraSter_> I could just use scope
[09:38:08] <yunta> oh, didn't know you have one
[09:38:18] <OndraSter_> 40MHz analog one :D
[09:38:25] <OndraSter_> Kikusui from the 80s
[09:38:31] <yunta> oh, analog... may not fill your need
[09:38:55] <OndraSter_> yeah
[09:38:59] <yunta> anyways, if you want I can send you web-ui that displays adc readings from xmega as graphs
[09:40:15] <OndraSter_> I would have to assemble 2nd board
[09:40:24] <OndraSter_> lol when I was just about to make a video about it, it does not work via PDI reset now either
[09:40:26] <yunta> or do it in-the-air :)
[09:40:33] <yunta> lol
[09:41:07] <yunta> last time I checked my pc evaluated when: after dragon pdi programming (that's pdi reset, right?), after hw reset, after self (sw) reset
[09:41:10] <OndraSter_> and it works via PDI reset again
[09:41:14] <yunta> s/evaluated/enumerted/
[09:41:17] <yunta> enumerated
[09:41:44] <OndraSter_> well, dragon enumerates almost every second
[09:41:46] <OndraSter_> and it drives me nuts
[09:41:53] <OndraSter_> because if my device is stuck the dragon cannot enumerate :P
[09:42:03] <yunta> piece of crap
[09:42:05] <yunta> dragon that is
[09:42:11] <OndraSter_> since there cannot be two ongoing enumerations per hub
[09:42:16] <OndraSter_> (or per whole PC?)
[09:42:25] <OndraSter_> that is not dragon's fault :)
[09:42:42] <yunta> nvm, it's not opensource so it's piece of crap ;)
[09:42:52] <OndraSter_> lol
[09:49:06] <OndraSter_> hmm do I even have empty power socket for a scope..
[09:49:38] <OndraSter_> yes I do!
[09:49:43] <tzanger> heh
[09:49:46] <tzanger> that's my issue as well
[09:50:02] <tzanger> I bought four 16-socket power bars, plugged into four separate 15A circuits
[09:50:31] <OndraSter_> wow
[09:50:34] <OndraSter_> and full?
[09:50:50] <tzanger> not all
[09:50:53] <tzanger> but close
[10:07:50] <theseb> Do any of the registers r1, r2, r3, ..., r31 have a special side effects or do they all "just" store numbers?.....(I'm trying to understand some arduino (avr) asm and had to ask what to watch out for that is special.)
[10:08:23] <OndraSter_> if you mean on hardware level - no
[10:08:27] <OndraSter_> for gcc - yes
[10:08:35] <theseb> OndraSter_: for gcc?
[10:08:47] <OndraSter_> yes
[10:08:52] <theseb> OndraSter_: what do you mean?
[10:08:54] <OndraSter_> gcc uses r1 as 0
[10:08:56] <OndraSter_> always
[10:09:06] <theseb> OndraSter_: i'm using gcc so that raised an eye brow
[10:09:26] <OndraSter_> check gcc register usage
[10:09:42] <theseb> OndraSter_: funny you said that...I *did* notice early instruction is "eor r1, r1" which zeroes out r1
[10:09:52] <OndraSter_> yes
[10:09:53] <theseb> OndraSter_: what is the big deal of putting a zero in r1?
[10:10:04] <OndraSter_> so they can do sts <anywhere in memory>, r1
[10:10:32] <OndraSter_> also for 16bit arithmetic you often need 0
[10:11:19] <theseb> OndraSter_: interesting..glad i asked! thanks
[10:11:57] <OndraSter_> np
[10:20:06] <jacekowski> theseb: r16-32 can't be used for some functions
[10:20:15] <jacekowski> theseb: and some form things like Z register
[10:23:44] <OndraSter_> yep
[10:23:51] <OndraSter_> X Y Z are "16bit" registers
[10:23:53] <OndraSter_> = two 8bit pairs
[10:23:59] <OndraSter_> (something like AH+AL = AX on x86)
[10:24:11] <OndraSter_> yunta, I can see only some "reset" on the bus when it fails to enumerate
[10:24:17] <OndraSter_> it is analog, I cannot record it
[10:24:42] <OndraSter_> when it enumerates just fine I can see SOF being sent just fine and counting the frame number :)
[10:25:23] <yunta> what about length of bus reset depending on type of reset you do?
[10:26:50] <OndraSter_> I am not the one making the bus reset
[10:29:44] <yunta> but you're making device reset
[10:31:16] <OndraSter_> yunta, I am
[10:31:24] <OndraSter_> by holding reset button
[10:31:25] <OndraSter_> for a second
[10:31:44] <yunta> how long is pdi reset?
[10:31:48] <OndraSter_> very short
[10:31:51] <OndraSter_> but the device reenumerates
[10:31:56] <OndraSter_> I can hear it plus see it on the serial console
[10:32:01] <yunta> ok ok
[10:32:26] <yunta> nothing comes to my mind
[10:32:32] <OndraSter_> neither to mine
[10:32:35] <OndraSter_> and it drives me nuts
[10:32:40] <OndraSter_> mostly because it works on laptop just fine
[10:33:52] <yunta> my rc32k drove me nuts that way... spent ~20hours trying to find the reason my usb doesn't work on some devs :(
[10:34:04] <OndraSter_> hmm
[10:34:10] <OndraSter_> I tried it with and without RC32K
[10:36:52] <OndraSter_> I am fairly glad that it actually enumerates on my PC at all
[10:36:55] <OndraSter_> which it did not before
[10:37:32] <yunta> well, rc32k just caused transmission errors for me, but pc always attempted to enumerate correctly
[10:38:25] <OndraSter_> hmm
[10:41:11] <yunta> any weird capacitors on board that could be affected by too long reset time?
[10:42:48] <theseb> jacekowski: thanks
[11:47:49] <_abc_> Hello. Can someone point me to an app not on doing a software RTC on atmega?
[11:47:58] <_abc_> As usual the atmel.com search engine betrays me.
[11:55:00] <jadew> _abc_
[11:55:01] <jadew> http://www.atmel.com/Images/doc1259.pdf
[11:56:07] <_abc_> Thanks jadew. Is the problem area described in some 2003 forum messages still valid? Timer losing ticks on 33kHz xtal if supply is above 4.0V?!
[11:56:47] <jadew> no idea, I never played with RTC so far
[11:56:58] <_abc_> :)
[11:57:18] <jadew> why don't you implement it with a timer tho?
[11:57:28] <jadew> I mean, what's wrong with software time keeping?
[11:57:39] <_abc_> Nothing, the hardware can be hairy, however.
[11:58:14] <jadew> I would guess that you get less drift if you're using a higher frequency
[11:58:24] <_abc_> Not true.
[11:58:34] <_abc_> Good oscillator design is key to good performance.
[11:58:37] <_abc_> All the rest is bity.
[11:58:40] <_abc_> *bits.
[11:59:21] <jadew> still, shouldn't a small drift on a 20Mhz clock be way less than a small drift on a 33khz one?
[11:59:38] <_abc_> no
[11:59:49] <_abc_> oscillator error is expressed in ppm and is a percentage
[12:00:32] <grummund> Howdy peeps
[12:02:30] <grummund> Anyone know where __stack points to on AVR? is it the first byte of stack or the one just beyond?
[12:03:36] <jadew> IIRC, the stack advances in reverse order
[12:04:17] <jadew> I don't know what the __stack keyword is, but if it's a pointer to the position of the stack, I would guess it points to the next free byte
[12:04:40] <grummund> ya but the linker script supplies __stack constant which can be used in code (to do weird stuff :-P)
[12:05:46] <grummund> the linker supplies various symbols like that
[12:05:48] <grummund> http://www.nongnu.org/avr-libc/user-manual/malloc.html
[12:06:04] <grummund> but __stack is not mentioned on that page
[12:26:07] <tzanger> bleh
[12:26:10] <tzanger> curve fitting sucks
[13:54:09] <OndraSter_> I say what what
[13:54:19] <OndraSter_> when I plug out of the wall socket my high beam lamp
[13:54:24] <OndraSter_> I get hardware disconnected sound
[13:54:30] <OndraSter_> and device manager refreshes
[14:00:10] <hackvana> FAIL
[14:03:06] <OndraSter_> yeah electronics is fairly funny in this house
[14:03:09] <OndraSter_> 20 years old
[14:04:06] <_abc_> Only in Germany. Faster than all? Optimization? You Broke The Rules! http://www.thelocal.de/society/20130103-47117.html
[14:04:48] <_abc_> Seriously, where do I find a paper on software real time clock and calendar implementation? You know, leap years, funny months and all that math
[14:12:20] <Tom_itx> OndraSter_ did you get your usb stack figured out?
[14:13:47] <OndraSter_> it is still acting up
[14:13:50] <OndraSter_> when I reset I get zero data :(
[14:14:06] <Tom_itx> no help from dean?
[14:14:11] <OndraSter_> nope
[14:14:35] <Tom_itx> i thought he worked at the help desk
[14:15:05] <OndraSter_> :D
[14:15:34] <Tom_itx> too busy stuffing out fancy pants chips i guess
[14:25:13] <jacekowski> _abc_: i think you can find some code in linux kernel
[14:25:56] <jacekowski> _abc_: linux only uses RTC to get time at boot and from then it's all done in the kernel
[14:27:12] <_abc_> jacekowski: yes but I prefer the written up version on paper
[14:27:39] <jacekowski> there is nothing better than real code
[14:27:43] <_abc_> I can implement my own code and crib from Atmel's application notes, but there are subtleties to it. I need to eventually make an astronomical clock which runs a bit off from 'normal' time
[14:27:58] <jacekowski> _abc_: i've done that
[14:28:04] <_abc_> So I need to be a nice man and do my homework...
[14:28:18] <jacekowski> to work out sunset and sunrise times
[14:28:24] <jacekowski> to turn on the lights
[14:32:22] <soul-d> abc can't you beter use julian time ?
[14:32:36] <_abc_> no :)
[14:34:15] <_abc_> "software clock algorithm implementation astronomical site:.edu" <- this search key works for me
[14:34:56] <_abc_> http://graphics.stanford.edu/~seander/bithacks.html
[14:34:59] <_abc_> fun
[14:40:15] <_abc_> http://emr.cs.iit.edu/~reingold/calendars.shtml ahh the real sh*t
[14:51:41] <OndraSter> mm I like power supplies with short circuit/overcurrent shutdown
[14:51:47] <OndraSter> because you know, THEY DO NOT BLOW UP
[14:51:51] <OndraSter> unlike the cheapos
[14:51:57] <OndraSter> which do fancy light
[14:52:01] <OndraSter> and burn their (at least) fuse
[14:52:05] <OndraSter> and throw up the circuit breakers
[14:53:02] <Honeyclaw> anyone here experience AVRs getting the first byte of EEP corrupted when using a flaky reset circuit / no reset circuit?
[14:54:02] <slidercrank> http://i.juick.com/photos-512/2186069.jpg
[14:54:09] <OndraSter> errata?
[14:57:22] <tzanger> heh
[14:57:33] <tzanger> well.. thermostat code written and being tested
[14:57:49] <tzanger> if this works I should be able to turn on the heat from remote so it's warm in my shop before I get there
[14:58:27] <GuShH> slidercrank: neat
[14:58:47] <GuShH> tzanger: cheaper to just train the cat
[14:58:57] <tzanger> that would entail hiring a cat
[14:59:11] <GuShH> :3
[15:00:28] <GuShH> tzanger: I might convert the analog thermostat at home to an analog one, but what really kept me from doing it is that it has to look good
[15:00:42] <GuShH> I can't just drop a 16x2 inside a crappy plastic box and shove it on the wall
[15:00:47] <tzanger> an analog-analog conversion? nice. :-)
[15:00:54] <GuShH> err digital
[15:01:01] <tzanger> yeah wife acceptance factor doesn't exist in the shop, but is in full force at home
[15:01:24] <GuShH> well yes you perform an analog conversion afterwards if you count the output drive
[15:01:42] <GuShH> so until I find something that looks good, it won't happen.
[15:01:44] <tzanger> ?
[15:01:47] <GuShH> might as well buy one.
[15:01:56] <tzanger> there'd be no analog output on the drive, thermostats are generally relay
[15:02:02] <GuShH> tzanger: you could argue the output is analog.
[15:02:11] <GuShH> everything really is analog
[15:02:17] <tzanger> sure, but then nothing's digital
[15:02:18] <GuShH> digital is just a constraint imposed by us
[15:02:45] <GuShH> in reality 1 or 0 is nothing but the result of reaching an analog threshold
[15:03:28] <tzanger> oh trust me i know
[15:03:36] <tzanger> most of my contracts involve educating people about that :-)
[15:03:45] <GuShH> I can't trust a catless person!
[15:04:48] <GuShH> tzanger: actually as I was researching a few months ago, some modern thermostats use a voltage level to signal the burner/heater controller
[15:05:36] <tzanger> GuShH: really
[15:05:43] <tzanger> that would break almost every existing system out there
[15:05:55] <tzanger> I had a cat. she was awesome
[15:06:09] <GuShH> old school is just switching a solenoid on or off and would be depending on whatever analog controller the burner runs off of to properly restart.
[15:09:29] <GuShH> tzanger: there are fancy central hvac systems out there that will monitor per-room and actuate vents, such as the AC on your car does with a servo.
[15:09:39] <GuShH> doubt these systems are residential
[15:10:36] <GuShH> but I've seen instances where specific air filtering was required due to allergies, etc. and that includes monitoring the air quality of the rooms. think hospital but on a small scale.
[15:11:22] <GuShH> some people have acute allergies
[15:11:47] <GuShH> and/or require it due to illness.
[15:14:10] * GuShH killed the channel with boredom
[15:21:39] <_abc_> GuShH: you can call them residential heh as long as the residence has a hefty price tag
[15:21:56] <_abc_> GuShH: servo dampers have become quite popular (and break down a lot)
[15:22:21] <GuShH> just sayin' those systems have evolved a bit from the old ON/OFF
[15:22:29] <_abc_> Not quite
[15:22:46] <GuShH> They have, specially the controllers and user interfaces
[15:22:51] <_abc_> Some of the damper actuators are dumb motors which are on to turn until they hit a mechanical stop, and off to be returned by a spring
[15:22:57] <GuShH> It's all digital now
[15:23:05] <GuShH> _abc_: so are the "servos" from car ACs
[15:23:08] <_abc_> You wish. All the bugs are digital, yes.
[15:23:19] <GuShH> in instances where the ECU reports a bad servo, you often just have to reset it's location
[15:23:36] <GuShH> I know because I had to take apart half a car just to figure that out.
[15:25:29] <GuShH> Inside each actuator box there's just a 12v dc motor, a couple gears and a mechanical switch.
[15:25:40] <GuShH> Makes you wonder why they spares are so expensive
[16:41:59] <MoL0ToV> hi! any suggestions? http://ideone.com/aPVaKh
[17:24:07] <inflex> GuShH: simple, they don't want you repairing your car - get a new one
[19:07:35] <tzanger> GuShH: I worked for an HVAC company designing devices. :-)
[19:11:56] <Casper> tzanger: must have been a boring job
[19:12:40] <OndraSter> yunta, did I tell you? When I reset it, I see on the data lines only some small reset pulses, no data being transmitted
[19:12:46] <OndraSter> and I can see the SOF "counting" :)
[19:12:47] <OndraSter> when it works
[19:13:39] <tzanger> Casper: Hardly. Embedded design can be fun in any industry. I was designing electronic hot wire anemometers for next-gen HRV/ERV systems
[19:13:41] <OndraSter> the strangest thing - atmels stack works.
[19:14:08] <OndraSter> designing anything can be fun!
[19:14:13] <OndraSter> just blow stuff up, if it gets boring :)
[19:14:21] <yunta> hm...
[19:15:49] <OndraSter> I was quite surprised that my stuff worked "on the first try" (except the FIFO counter thing) -- considering that I wrote my own ZLP/multipacket transfers
[19:17:05] <tzanger> how does that saying go? If at first you do succeed... don't try to look too surprised.
[19:17:14] <tzanger> er I mean try not too look too surprised
[19:17:34] <OndraSter> hehe
[19:19:41] <yunta> lol
[19:20:17] <yunta> well, I'm going to sleep, early wakeup tomorrow (10am) ...
[19:20:17] <yunta> gn
[19:20:42] <OndraSter> gn
[19:20:47] <OndraSter> I should be getting up at 0930
[19:20:52] <OndraSter> that is 7.5 hours from now
[20:25:20] <creep> tzanger<< must have been hard to arrange the metal wire in the measuring tube, and measure its resistance
[20:25:39] <creep> whole year project?
[20:26:15] <creep> i remember the days in school... :) a big project like this would take 2 years at minimum
[20:41:08] <tzanger> creep: this was done with a pair of matched transistors and a PID loop
[20:41:25] <tzanger> b-e transistor junction makes an excellent temperature sensor
[20:41:54] <creep> how is that more professional than a piece of wire?
[20:42:42] <tzanger> way easier to manufacture
[20:42:56] <tzanger> more accurate, smaller, more repeatable measurements...
[20:43:06] <creep> wanna know what i used in my industrial hotplate?
[20:43:19] <tzanger> sorry two pairs of matched transistors, one in the windstream and the other not
[20:43:51] <tzanger> you drive current through the one in the windstream until it matches the temp of the ohter, and that gives you a measure of the windspeed
[20:43:52] <creep> 0.2% precision platinum resistor
[20:43:57] <tzanger> yep
[20:44:10] <tzanger> how much did your 0.2% precision platinum resistor cost, and how many vendors could you choose from?
[20:45:54] <creep> mine cost ~$6 and its fine from -50 to 550C, there are a few vendors making them, sounds simple though, it has a platinum "wire" in it, that's all...
[20:46:00] <tzanger> DMMT3904 is abotu $0.20 in small quantities ($0.10 in 1k quantities) and that's just one manufacturer and one supplier; I can use *any* dual transistor without tuning the rest of the circuit around them
[20:46:39] <tzanger> I definitely didn't need that wide a temp range, we were measuring -40-40C
[20:46:51] <tzanger> for that range I would have used a K thermocouple I think
[20:47:01] <creep> if you want difference then yeah
[20:47:20] <tzanger> actually a J would have probably worked well too
[20:47:54] <creep> i dislike things need calibration to work
[20:48:22] <creep> and you must pair the transistor junctions to get useful measurement
[20:48:23] <creep> ;/
[20:49:01] <tzanger> creep: yes, but matched pair transistors (one package, two transistors in the package) are plentiful and cheap, and you don't need to calibrate between vendors
[20:49:15] <tzanger> since you're measuring the current to get the temperature the same, not the absolute temp
[20:49:51] <tzanger> I could use two resistors and do the same as well but that'd be $12 instead of $0.50 just for the sensors
[20:50:30] <tzanger> or I could build my own platinum wire jig but that would have really driven the cost up since this was a ~250/yr type thing and I needed three anemometers per ERV
[20:50:37] <creep> :)
[20:52:20] <creep> just create a thin layer of platinum on a substrate, then cut a track in it with a laser until you get desired resistance
[20:52:56] <tzanger> yeah, that's a LOT cheaper than buying 2 dual transistors. :-)
[20:53:44] <creep> it would be cheap long term
[20:54:12] <creep> a few hundred years for your volume
[20:56:37] <tzanger> heh I'm not sure of any product that has that kind of lifetime
[20:57:27] <creep> tzanger<< http://en.wikipedia.org/wiki/Resistance_thermometer
[20:57:28] <creep> :)
[20:58:00] <creep> i think i'd grab a thin copper wire from anything, a current generator, and use opamps for signal conditioning
[20:59:07] <creep> the basic idea is to heat the wire with a current, and measure the resistance -> temperature
[21:17:47] <creep> http://en.wikipedia.org/wiki/Anemometer
[21:17:50] <creep> nice new page
[21:20:40] <creep> Hot wire anemometers use a very fine wire (on the order of several micrometres) electrically heated up to some temperature above the ambient. Air flowing past the wire has a cooling effect on the wire. As the electrical resistance of most metals is dependent upon the temperature of the metal (tungsten is a popular choice for hot-wires), - does this light up a bulb? :)
[21:21:03] <creep> a little light bulb with broken glass can be an anemometer
[21:24:13] <Tom_itx> ping pong balls
[21:24:44] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/temp/anemom.jpg
[21:27:17] <creep> do you use that? ^^
[21:27:37] <tzanger> creep: that's exactly what I did, but with transistors which are cheaper to use
[21:27:38] <creep> position sensor from a mouse optical encoder?
[21:29:10] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/temp/anemom5.jpg
[21:29:29] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/temp/anemom3.jpg
[21:31:51] <creep> i'll need an anemometer too for planes and helicopters
[21:54:23] <ferdna> need an android irc app recommendation anyone?
[22:07:16] <Grievre> Can AVR chips emulate open-collector behavior in software?
[22:07:26] <Grievre> i.e. can you switch atomically between high-z and low states on a pin?
[22:10:10] <ferdna> :)
[22:10:42] <tzanger> Tom_itx: great, now scale it down so I can fit three in 4" ducting :)
[22:11:32] <tzanger> Grievre: yes. set the port latch to 0, then set the pin as an input for '1' and output for '0'
[22:11:37] <tzanger> that's the standard way of doing things in software
[22:11:49] <tzanger> are you bit-banging I2C?
[22:12:02] <Grievre> just wondering in general
[22:20:19] <theseb> I noticed when creating an executable for arduino (avr) that gcc added asm boiler plate that zeroed out a bunch of memory and copy one region of memory to another....anyone have any idea why gcc linker would have to add that to a simple object file to make the ELF executable?
[22:36:34] <Casper> Grievre: open-collector: output 0, set to input for your 1. input is high impedance, so open
[22:37:48] <Grievre> theseb: I'm going to take a wild guess: it's copying constants into ram?
[22:46:22] <theseb> Grievre: YES
[22:47:41] <Grievre> theseb: Well iirc the AVR is kind of harvard architecture. it reads instructions out of flash and data out of RAM. Since RAM is volatile it has to keep strings and such in the flash
[22:47:53] <Grievre> to read out of flash you have to use different instructions than to read out of RAM iirc?
[22:48:59] <theseb> Grievre: avr does have instructions to copy values to I/I memory and other instructions to copy to the other kind of memory if that pertains to your question....(sorry ..i'm a newb)
[22:52:02] <Grievre> theseb: So like if you do Serial.print("Foo"), "Foo" has to be in flash because it has to persist across hard resets, but it has to be copied to regular memory because Serial.print() takes a pointer to data memory, not a pointer to instruction memory
[22:54:08] <Grievre> theseb: Otherwise, the Serial.print() function would have to know ahead of time whether the string was in flash or in RAM
[22:54:27] <theseb> Grievre: makes sense.....i'm going to try writing some little apps in pure asm and seeing if i can omit that init stuff...hopefully all will be well
[22:54:41] <theseb> Grievre: when i do C for "real work" i'll put that boilerplate back in
[22:54:46] <theseb> Grievre: thanks for the help!
[22:55:36] <Grievre> theseb: iirc if you use PSTR (or is it _PSTR?) around your strings
[22:55:40] <Grievre> it won't get copied to ram?
[22:55:48] <Grievre> but it will have a different type from normal strings
[22:55:49] <theseb> i don't know
[22:57:08] <Grievre> hmmm
[22:57:33] <Grievre> how is memory addressed on AVR anyway? I would assume addresses would be two bytes since there is more than 256 bytes of memory on most AVR chips
[22:58:04] <Grievre> in which case, I don't see why they used separate instructions for progmem and non-progmem
[23:11:46] <theseb> Say is it possible/easy to add/remove/tweak asm instructions in an ELF file created from gcc?
[23:16:44] <timemage> theseb, generally that would throw off all the addresses. unless you wanted to use -S and edit the intermediate assembly file.
[23:17:07] <timemage> theseb, why though?
[23:19:42] <theseb> timemage: well i'm trying to avoid the boilerplate gcc throws into my binaries
[23:20:12] <theseb> timemage: instead of finding all switches in gcc to remove all boilerplate is there another barebones tool to convert asm to ELF or ihex?
[23:20:42] <timemage> theBear, well, there is avr-as, right?
[23:21:06] <theBear> i spose :)
[23:21:07] <timemage> err, s/theBear/theseb/
[23:21:13] <timemage> theBear, heh =), sorrry.
[23:21:24] <theBear> thas cool
[23:21:37] <inflex> lo theBear
[23:22:47] <theseb> timemage: yea......i'll have to read up on that...gcc -nostdlib seems to remove gcc crud too
[23:24:21] <theBear> yo
[23:24:38] <Casper> theBear: https://www.youtube.com/watch?v=RtlYi1yLTVQ you'll laught
[23:25:44] <theBear> gege
[23:25:45] <theBear> hehe
[23:26:44] <theBear> very nice
[23:36:01] <Casper> I wonder if it was intentional
[23:36:07] <Casper> or if he's an idiot