#avr | Logs for 2013-11-19

Back
[01:32:03] <megal0maniac_afk> Quick off-topic question. I have an active subwoofer and often when i switch it off, it "pops" as if it's discharging through the driver. How can I modify it to not do that?
[01:32:49] <megal0maniac_afk> The switch just switches 220vac
[01:33:23] <Casper> relay
[01:33:35] <Casper> that disconnect the speaker when the main is gone
[01:33:59] <megal0maniac_afk> Would that be quick enough?
[01:34:14] <Casper> relay switch within 4ms
[01:35:10] <megal0maniac_afk> hmmm... worth trying. the pop is basically the instant the switch is switched
[01:35:43] <megal0maniac_afk> my gut says a transient will still get through
[01:41:19] <megal0maniac_afk> unless I can fix the problem instead of bypassing the effect. it's inductice charge that causes this, right? if i can discharge the circuit before disconnecting the power, it wont do that
[01:41:36] <megal0maniac_afk> *inductive
[02:14:14] <jerkey> megal0maniac_afk look at the amplifier chip for a shutdown or disable pin, and make sure it is held in the disable mode as soon as the switch is flipped. That way, as the power supply fades away the chip won't send power to the speaker, hopefully.
[02:14:47] <jerkey> or replace the power switch with DPDT or DPST switch (6 or 4 terminals) and make it disconnect the speaker when the power is disconnected.
[02:43:10] <megal0maniac_afk> jerkey: Thanks, I'll look into that
[02:46:43] <megal0maniac_afk> jerkey: The silly thing is that aside from the main switch, it has an on/off/auto switch as well. But it hums slightly when it's "off", and the thing is in my room, so..
[02:47:52] <megal0maniac_afk> And the 110V version has no switch, just a cable coming straight out. Mine has an IEC plug (with no ground pin) and the switch
[03:08:25] <jerkey> thats probably designed that way because of the problem you're describing. it's actually kind of a puzzle to make something like an amplifier shut down gracefully when power fails.
[03:09:02] <jerkey> and since the engineer at the company didn't know how to do it, the sales department just told him to do it that way
[03:16:22] <megal0maniac_afk> Good point :)
[03:17:12] <megal0maniac_afk> I wanted to add a foot switch instead of having to crawl under my desk every night, but I'm not going to do that unless I have a solution for this..
[03:35:50] <Tom_itx> megal0maniac_afk, add a remote to it
[03:42:03] <megal0maniac_afk> Tom_itx: With a DPST low switching-noise relay :)
[03:43:34] <twnqx> jerkey: don't think so, just make the relay powered from something unbuffered (no caps)
[03:50:18] <jerkey> if there's an "on" LED you could connect a FET to its signal and use the FET to turn on the relay that unmutes the speaker... then it's seamless, assuming you control the LED from your desktop.
[03:50:41] <jerkey> although ideally you would just find a shutdown pin on the amplifier and trigger that properly, to eliminate the hum.
[04:23:10] <megal0maniac_afk> jerkey: The "on" LED takes about 8 seconds to fade out after you turn it off :/
[04:23:50] <megal0maniac_afk> Like I said, the 110V version has no such mains switch, so it feels like an afterthought
[04:34:35] <mdorenka> is anybody of you familiar with checksums? https://gist.github.com/mdorenka/b62185767a4d0071b243 i have these readings (beginning from line 18), the last 4 bits are a checksum but i couldnt figure out how it works
[05:14:50] <megal0maniac_afk> mdorenka: Do you have any more info about the source?
[05:15:03] <megal0maniac_afk> i.e. where did you get that dump from?
[05:15:06] <mdorenka> source ist a carrin kw9010 temperature sensor
[05:15:22] <mdorenka> which sends its data via 433 RF
[05:15:32] <mdorenka> i could decode all of the payload
[05:15:36] <mdorenka> but not the checksum
[06:38:48] <megal0maniac_afk> jerkey: Why do you have parts for 20 leolympia boards, if I may ask?
[06:46:08] <ambro718> is this a good place to ask stuff about Atmel ARMs?
[06:46:24] <Tom_itx> not so much
[06:46:52] <Tom_itx> a few here may use them
[07:32:36] <Fornaxian> mdorenka, have you tried contacting the manufacturer on that?
[07:32:44] <Fornaxian> they do have a contact/questions page.
[07:35:05] <mdorenka> Fornaxian, i could already figure it out with some help
[07:35:55] <mdorenka> it the sum of all nibbles inverted but the last
[07:36:15] <mdorenka> the last inverted nibble should be equivalent to the sum & 0xf
[10:48:19] <rootB> Ok avr, you win.
[10:48:27] <rootB> Now i can see why you use AVR.
[10:48:35] <rootB> Texas instrument's community is a joke.
[10:48:38] <rootB> a bad one.
[10:48:49] <rootB> like that akward guy who tries to fit in funny.
[10:52:13] <bsdfox> I have a feeling that guy might be you
[10:54:11] <megal0maniac_afk> I'm officially making a golden quotes page
[10:57:58] * amee2k idly ruffles bsdfox' tail :3
[11:42:01] <awozniak> Is there a channel for xmega? I'm trying to get a working toolchain fo atxmega32a4u, and i'm seeing that avr-libc 1.8.0 doesn't produce a crtx32a4u.o that the linker is looking for
[11:50:16] <awozniak> Bueller?
[11:56:55] <ambro718> awozniak: http://savannah.nongnu.org/bugs/?37850
[11:57:12] <ambro718> why do I have to look at the bug tracker for you? ;)
[11:57:34] <awozniak> because google didn't pull it up for me? Thanks for pointing me in the right direction!
[11:59:20] <ambro718> awozniak: where did you get your toolchain from?
[11:59:30] <awozniak> ambro718: building from sources
[11:59:31] <ambro718> the one from Atmel will probably support all devices
[11:59:55] <awozniak> yeah, just finished downloading that and was about to try it
[12:00:03] <ambro718> http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx
[12:00:12] <ambro718> if you're all right with just grabbing a binary that is
[12:00:31] <awozniak> I sort of trust atmel. =)
[12:01:10] <ambro718> I'm waiting until they have gcc 4.8 (that is 4.7)
[12:02:06] <megal0maniac_afk> Yeah use Atmel's one. It works with everything
[12:02:26] <awozniak> wondering why their changes don't get pushed upstream.
[12:02:47] <ambro718> it doesn't work for me due to incomplete C++11 support, and some bug with some float operation (multiple definitions of something)
[12:03:05] <awozniak> ambro718 megal0maniac_afk:awesome, works, thanks so much!
[12:03:21] <megal0maniac_afk> Oh, I do what I can :P
[12:04:30] <megal0maniac_afk> I can confirm it works with AVR32UC3A1, xmega256a3u, attiny10
[12:04:35] <megal0maniac_afk> And then all the normal ones
[12:20:37] <awozniak> hrm, looks like avr8-gnu-toolchain-linux_x86_64/avr/include/avr/iox32a4u.h doesn't define UDIEN register.
[12:23:30] <awozniak> guess that's a mega only thing? Ok, dig into LUFA and figure out what's wrong there...
[12:45:40] <ambro718> who are the developers of avr-libc anyway? one would expect Atmel would be part of the project, not just someone sending patches.
[12:46:30] <bss36504> I think atmel
[12:50:22] <hjohnson> does anyone know of an avr library to easily handle AT modem commands
[13:31:06] <jerkey> megal0maniac_afk i bought a bunch of leolympia boards to go with the 100 free samples of atmega32u4 i got, a
[13:31:39] <jerkey> and planning to offer them as kits to build at circuit hacking mondays at noisebridge and sudoroom
[13:31:48] <bss36504> maybe you should see a doctor about the leolympia
[13:32:06] <megal0maniac_afk> 100 free samples? O.O
[13:35:25] <megal0maniac_afk> Damn google maps is broken. It refuses to give me directions to sudoroom http://i.imgur.com/hpnrUoO.png
[13:35:45] <megal0maniac_afk> Why can't things just work?
[13:36:00] <bss36504> well have you seen the youtube comments yet?
[13:37:36] <hjohnson> man I never managed to get free samples out of atmel
[13:38:59] <megal0maniac_afk> hjohnson: It seems being honest actually works. Granted I only got 4 chips, and 2 of them are on back-order...
[13:39:50] <megal0maniac_afk> Brb. Going for a ride. Or a walk in the rain. Or something
[13:39:56] <hjohnson> megal0maniac_afk: I was honest, but this was like 10 years ago...
[13:40:35] <megal0maniac_afk> Try again, maybe you'll get lucky. Worst thing they can possibly say is "no"
[13:42:01] <megal0maniac_afk> And if they do, you could always say "jk, I'm actually a massive corporation planning to have a bajillion production units and boost Norway's GDP by 9%"
[13:42:16] <megal0maniac_afk> Then they'll say yes and you'll get your samples
[13:55:45] <jerkey> megal0maniac_afk where are you and how do you know about sudoroom?
[13:56:57] <jerkey> wow awesome!!! what do you do there?
[14:06:41] <megal0maniac_afk> jerkey: The link in my message should give you a hint about where I am, and I didn't know about sudoroom until you mentioned it and I googled it and tried to get directions, and last message was sarcasm. I'm a student :)
[14:06:56] <megal0maniac_afk> Hello RikusW! Hello OndraSter!
[14:07:09] <RikusW> hi megal0maniac_afk
[14:08:23] * megal0maniac_afk is studying MOSFETs
[14:08:27] <jerkey> megal0maniac_afk if you come here i will host you and take you to sudoroom.
[14:08:41] <megal0maniac_afk> jerkey: Wonderful. Unlikely but thanks :)
[14:09:34] <jerkey> mosfets are just the nuts and bolts of electronics
[14:10:57] <OndraSter> hello everybody
[14:11:54] <w|zzy> hello
[14:13:21] <awozniak> any way to get dfu-programmer to tell you anything more helpful than "no device present"
[14:13:22] <awozniak> ?
[14:13:34] <megal0maniac_afk> -v-v-v-v-v-v-v-v-v-v-v-v-v
[14:13:40] <megal0maniac_afk> Or is that avrdude? :P
[14:14:59] <awozniak> megal0maniac_afk: avrdude. dfu-programmer is --debug. found issue, I'm not root
[14:15:35] <megal0maniac_afk> Ah, udev rules bit you
[14:16:09] <hjohnson> anyone here played with avarice and jtagice3?
[14:16:17] <megal0maniac_afk> o/
[14:16:58] <hjohnson> work well? working on a project with an xmega, deciding whether to buy a real jtagice3 or one of the cheapie mk2 clones off of fleabay
[14:16:58] <megal0maniac_afk> Sort of. I compiled trunk avarice and proved that it works with jtagice3 by identifying the target. Nothing further than that
[14:17:05] <hjohnson> ahh
[14:18:35] <megal0maniac_afk> Um.. I <3 my jtagice3. They've recently changed the firmware completely so it no longer relies on Jungo. avarice support is for the older firmware (which you can downgrade to) so there's some work to do there. But it's fast and small and will have future device support. SAM D20 being the latest example
[14:22:13] <hjohnson> cool
[14:22:29] <hjohnson> yeah, building a rather complicated project for my boat... so will be running freertos on it
[14:22:34] <hjohnson> so debugging will be a bit wierd
[14:22:58] <megal0maniac_afk> Oh yeah, I remember that
[14:23:45] <Tom_itx> if not jungo then what?
[14:26:24] <megal0maniac_afk> Tom_itx: HID
[14:26:50] <megal0maniac_afk> From v3.x which is included in studio 6.1
[14:27:34] <megal0maniac_afk> But I don't think there's support for it yet from avarice or avrdude, so Atmel graciously released a utility that lets you downgrade back to 2.x
[14:28:11] <hjohnson> yeah, I do most of my development under linux with make/gcc
[14:28:12] <bss36504> Atmel seems to embrace their low volume customer community a lot more than some other vendors.
[14:28:36] <hjohnson> I wish there was a cheap, compact uC that spoke CanBus
[14:28:45] <hjohnson> the cheapest/smallest I can find are qfp-64
[14:30:03] <megal0maniac_afk> Is CAN / CanBus the same thing?
[14:30:08] <bss36504> maybe try an outboard CAN controller?
[14:30:40] <hjohnson> bss36504: yeah, but in the end that winds up costing more than an inboard CAN controller
[14:31:06] <megal0maniac_afk> hjohnson: http://www.atmel.com/devices/ATMEGA32M1.aspx ?
[14:31:10] <bss36504> I guess it depends on what you want in the end then
[14:32:09] <hjohnson> ahh, cool
[14:33:09] <hjohnson> yeah, that's what i'm looking for
[14:33:17] <hjohnson> looking at some outboard sensors/controllers for my boat project
[14:33:20] <hjohnson> i have a canbus interface
[14:33:25] <hjohnson> (so it will also speak nmea2000
[14:34:09] <hjohnson> damn, expensive in qty 1
[14:34:14] <hjohnson> oh well
[14:34:27] <megal0maniac_afk> Request samples?
[14:42:37] <carabia> megal0maniac_afk: yes it is
[14:43:15] <megal0maniac_afk> I figured. Since CAN is a bus system.
[14:43:51] <megal0maniac_afk> Maybe just a manufacturer specific name for it? Like I2C/TWI/smbus
[14:46:52] <carabia> can or can bus. too hard?
[14:47:07] <jerkey> i like pic32
[14:47:16] <carabia> i like turtles
[14:48:35] <Tom_itx> ur both nuts
[14:51:56] <w|zzy> I like women.
[14:52:08] <w|zzy> which probably makes me the most nuts.
[15:17:00] <megal0maniac_afk> Goodnight, nutters!
[15:23:35] <jerkey> but it's only 1pm!!!
[15:25:37] <awozniak> does dfu-programmer expect a hex file? Or something else?
[15:26:00] <Tom_itx> yes
[15:27:13] <awozniak> sudo dfu-programmer atxmega32a4u flash-user blah.hex ==> Address error. Something went wrong with creating the memory image.
[15:27:13] <jerkey> what is an atsam3 chip good for? i got a bunch of sam-ples.
[15:27:45] <Tom_itx> you ordered samples and don't know what you got?
[15:27:57] <Tom_itx> for that you can read the data sheet
[15:28:16] <jerkey> they are atsam3 but i don't know what to do with them. i wanted to do something like the arduino due
[15:28:35] <jerkey> just wondering if there is any application that is particularly interesting
[15:29:02] <Tom_itx> awozniak, it should accept a hex file just fine
[15:29:14] <Tom_itx> not sure what the address issue is
[15:29:24] <Tom_itx> did you tell it what port to look at?
[15:29:29] <awozniak> the hex file starts at address 0000
[15:29:41] <Tom_itx> are you running linux?
[15:29:59] <awozniak> Tom_itx: I had the port wrong before, and was getting a different error
[15:30:01] <Tom_itx> i use FLIP in windows
[15:30:13] <Tom_itx> i know dfu is supposed to work
[15:31:39] <Tom_itx> awozniak, is this under linux or windows?
[15:31:44] <awozniak> linux
[15:31:47] <Tom_itx> k
[15:31:53] <Tom_itx> under windoz you need libusb
[15:33:29] <awozniak> Tom_itx: yeah, I tried Atmel's flip for x32 on my x64 machine with no joy, loading up an x32 VM now and going to try it that way... *sigh*
[15:34:34] <Tom_itx> is the board in program mode?
[15:34:43] <Tom_itx> take HWB low then pulse reset
[15:34:49] <awozniak> yep, "lsusb" shows it as "DFU bootloader"
[15:35:01] <Tom_itx> i've never had problems with FLIP
[15:35:10] <Duality_> can I do function overloading in avr-C++ ?
[15:45:14] <megal0maniac_afk> awozniak: https://groups.google.com/forum/m/#!topic/mizar32/70QKny4CFqk
[15:45:31] <megal0maniac_afk> Flash image might be too big
[15:46:41] <megal0maniac_afk> Bootloader section I think is 4kb and program is 32
[15:47:08] <megal0maniac_afk> Try a blinky led
[15:47:59] <megal0maniac_afk> Then you can establish whether the hex file is the problem
[16:32:05] <xtra_> hi
[16:32:19] <xtra_> somebody here?
[17:07:16] <ambro718> somebody probably is
[17:10:49] <Valen> 175 somebodies
[17:23:09] <DanFrederiksen> this is slightly OT: this is an opamp peak detector simulation in circuit labs www.zev.dk/web/opampplot.jpg notice the peak droops. is that a bug in circuitlab or is that a response time issue with the opamp. the signal is 100kHz, the TL082 opamp is supposedly 4MHz
[17:24:09] <DanFrederiksen> trying to do current sensing peak as input for atmega
[17:25:54] <zmo> hi! it looks like my avr dragon is broken, when I plug it on my board, my board get inconsistent resets
[17:26:11] <zmo> and starts drawing lots of current from the PSU
[17:26:49] <zmo> (I even burnt my finger when I touched a resistor on the power regulation part)
[17:29:04] <xtra_> cu
[17:29:22] <zmo> well the MCU on the avr dragon is getting really hot
[17:29:29] <zmo> fsck!
[17:30:07] <OndraSter> it idd does
[17:30:15] <Tom_itx> ziiinggg
[17:30:16] <OndraSter> even on mine
[17:30:19] <Tom_itx> go buy another one
[17:30:25] <OndraSter> :D
[17:30:31] <OndraSter> jtagice3 rathrt
[17:30:34] <OndraSter> rather
[17:30:40] <Tom_itx> how much are those?
[17:30:47] <Tom_itx> do they do all the protocols?
[17:34:18] <OndraSter> jtagice3 is now $99
[17:34:21] <OndraSter> they do all debugging
[17:34:23] <OndraSter> no programming
[17:34:34] <Tom_itx> pfft
[17:34:36] <OndraSter> avr dragon does all programming and all debugging (except TPI)
[17:34:39] <Tom_itx> the dragon is better than that
[17:34:41] <OndraSter> yep
[17:34:46] <OndraSter> but - it is easier to damage
[17:34:46] <Tom_itx> no tpi
[17:34:51] <Tom_itx> mine still wins
[17:34:53] <OndraSter> :D
[17:34:55] <OndraSter> does your debug?
[17:35:07] <Tom_itx> sure
[17:35:13] <Tom_itx> led debugging
[17:35:22] <OndraSter> :D
[17:40:41] <zmo> OndraSter - I was actually thinking on buying an AVR One as a replacement
[17:41:46] <Tom_itx> crap you must be loaded
[17:42:21] <zmo> (it's my firm that will be paying for that :-P)
[17:42:32] <Tom_itx> oh hell then get two
[17:42:34] <Tom_itx> send one to me
[17:42:51] <Valen> I'll take the other one
[17:42:56] <Tom_itx> heh
[17:42:59] <Valen> you get a bog standard avr and a LED
[17:43:02] <zmo> hehe ;-)
[17:43:36] <zmo> but, I mean, getting two boards almost burnt because of a failing programmer
[17:43:45] <Tom_itx> does _ANY_ of the avr programmers/debuggers do _ALL_ the protocols AND JTAG?
[17:44:44] <zmo> at the time being I'm only doing ISP (stupid electronician engineer who thought that ISP was "enough") but next rev of the board I'm working on will get JTAG
[17:45:08] <hjohnson> i've exposed both PDI and jTAG on my current project
[17:45:13] <hjohnson> figure betls and suspenders can't hut
[17:45:16] <hjohnson> er can't hurt
[17:46:23] <Tom_itx> does xmega use jtag or other debug interface?
[17:48:15] <zmo> hjohnson - what do you mean with PDI? you're talking about ISP/ICSP port?
[17:48:56] <hjohnson> xmega cn uase iether jtag or PDI
[17:52:58] <Tom_itx> zmo PDI is another programming protocol for the xmegas
[17:53:15] <Tom_itx> TPI is for the attiny4 5 9 10 20 and maybe a couple others
[17:53:43] <OndraSter> PDI has one advantage over JTAG
[17:53:45] <OndraSter> it uses dedicated pins
[17:53:49] <zmo> oh ok
[17:53:50] <OndraSter> (since it is only 2 pins thing)
[17:55:21] <OndraSter> plus I think it is faster... but that is just a something I think
[17:55:28] <OndraSter> (it can run the serial clock faster)
[17:55:32] <OndraSter> by specs
[17:56:11] <OndraSter> PDI uses enclosed JTAG commands
[17:56:16] <OndraSter> basically
[18:29:48] <hjohnson> OndraSter: well, the downside of PDI is that it uses the reset pin to clock the processor
[18:29:55] <hjohnson> OndraSter: if you have a large reset network, that's a problem. :)
[18:31:22] <Casper> just use a jumper :D
[18:36:02] <jerkey> whats the main difference between xmega and atmega?
[18:36:37] <Fornaxian> about 8 bits
[18:36:58] <Tom_itx> internally
[18:37:14] <Fornaxian> xmega tends to be faster, more memory, more configuration options
[18:37:18] <Tom_itx> and the xmega has alot more complex systems inside
[18:37:48] <Fornaxian> Tom_itx, don't some xmega chips have the ability to execute code from external memory too?
[18:38:25] <Tom_itx> i'm not sure
[18:38:30] <Tom_itx> i wouldn't doubt it
[18:39:06] <zmo> btw... I was wondering
[18:39:33] <hjohnson> don't think so
[18:39:44] <zmo> when you get a PCB into production, what tool do you use to flash the firmware+bootloader on the virgin PCB?
[18:39:55] <hjohnson> the xmegas are all harvard architectures, they have an external memory bus (I'm using it) but it's only on the ram bus
[18:39:57] <Fornaxian> zmo, depends on how you build it.
[18:40:02] <Tom_itx> zmo, i use one of my programmers
[18:40:16] <zmo> I'm talking about atmegas
[18:40:18] <zmo> ok
[18:40:20] <Fornaxian> some have header pins where you can connect a programmer.
[18:40:29] <Fornaxian> some have pads where you use pogo pins to make contact.
[18:40:39] <Tom_itx> either a header or ^^^ dammit you beat me to it
[18:40:43] <Fornaxian> some have edge pads where you clip something to the board.
[18:41:00] <zmo> but I'm not necesserally talking about how you wire the stuff to the board
[18:41:11] <hjohnson> yeah... if you look at the mainboard for cisco routers, they all have an edge connector on them, which must be the initial boot loading connection or something
[18:41:24] <zmo> but whether you use an official atmel's programmer, or a DIY one integrated into the testrig
[18:41:34] <Fornaxian> either way there.
[18:41:50] <hjohnson> zmo: if you'r emaking mass mass production (ie 10/100 thousands of units or more) and you're not going to be updating it, you can get uCs with mask ROMs
[18:41:52] <Fornaxian> I'm betting most production systems use a custom one rather than an official atmel programmer.
[18:42:00] <hjohnson> though that's less common
[18:42:07] <hjohnson> er less common these days
[18:42:14] <Tom_itx> or digikey will flash the chips for you
[18:42:27] <Fornaxian> often times the microcontrollers are pre-programmed in a socket,,...even tqfp and other surface mount thingies.
[18:42:49] <hjohnson> yeah, program them before assembly
[18:48:21] <Valen> There any web service I can copy/paste a few pages of C into and it'll reformat it stylistcly to be pretty?
[18:49:46] <Tom_itx> maybe some editor would do that
[18:49:54] <Tom_itx> none i'm aware of though
[18:50:26] <zmo> hum not a bad idea the program before mounting stuff
[18:51:12] <Tom_itx> depends how many you plan to produce
[19:29:24] <Valen> http://indentcode.net/ btw
[19:29:37] <Valen> but watch out it got rid of all my \0 text constants