#avr | Logs for 2016-10-11

Back
[00:23:15] <Grogdor> if i enable pin change interrupt on a single pin, it doesnt influence the functionality of any other i/o pins in that interrupt group?
[00:47:39] <tiblock> Rate my new 2 layer board http://imgur.com/a/dylaj for learning PWM, interrupts and ADC
[00:47:46] <tiblock> First time i made 2 layer board
[01:03:37] <sammyb> ey guys, you know the method to recover bad fuse settings with an external 1MHZ clock on XTAL1?
[01:37:07] <Grogdor> tiblock: cool board, esp for learning :)
[03:35:54] <Haohmaru> Q: suppose you got a populated board, with a pile of things going on around an xmega (or atmega) .. LEDs connected to some pins, signals going into other pins, etc.. the stuff is populated, including the mcu, but the mcu is supposedly brand new, hence not flashed yet ... is it generally a bad idea to apply power to the whole circuit?
[03:39:37] <Thrashbarg> an empty AVR will have all I/O ports floating, so if you want to be sure, tie any pins that activate peripherals (such as SRAM, EEPROMS, etc) so they're off by default
[03:39:52] <Thrashbarg> that is, /CS lines to Vcc
[03:41:17] <Haohmaru> i know the IO ports are "floating" when the mcu is held in reset, but in my case, i got a pullup resistor on the reset
[03:41:36] <Haohmaru> so as soon as i apply power - the mcu will "start" .. even if there's no FW on it yet
[03:42:53] <Thrashbarg> the Flash is all zero's by default isn't it? (Pretty sure it would be) which is the NOP instruction. The MCU will just cycle through Flash executing NOPs
[03:42:56] <Haohmaru> i got some stuff like buttons (3V thru 5K resistor fed to a bunch of pins on port A)
[03:43:29] <Haohmaru> okay, so it's not dangerous for a brand new chip
[03:43:40] <Thrashbarg> yea
[03:43:51] <Haohmaru> what about a chip which is potentially flashed with "some" FW
[03:44:08] <Haohmaru> my nose tells me i shouldn't apply power
[03:44:33] <Haohmaru> so how would you flash it with the "right" firmware?
[03:44:47] <Haohmaru> taking it off the board is not gonna be fun
[03:45:04] <Thrashbarg> it depends on what you've got connected, but in that situation I'd remove the MCU from the circuit and into a breadboard or such, so it can be erased
[03:45:16] <Thrashbarg> there's an AVRdude command to just erase the Flash, without writing anything to it
[03:45:17] <Haohmaru> :/
[03:45:37] <Haohmaru> 100 pin smd package x_x
[03:45:42] <Thrashbarg> I was about to ask
[03:47:25] <Haohmaru> i was thinking, if you could tell the programmer to hold the mcu in reset the whole time, then you could connect the programmer, apply power, and when you do, supposedly the mcu will never have a chance to actually run the "wrong" FW
[03:47:51] <Haohmaru> does that make sense?
[03:48:24] <Thrashbarg> yeah
[03:48:52] <Haohmaru> okay, so now i gotta RTFM to see if there's an avrdude command to do this
[03:49:03] <Haohmaru> there should be, pls pls pls
[03:49:14] <Thrashbarg> -E reset
[03:50:17] <Thrashbarg> leaves the reset pin active
[03:50:27] <Thrashbarg> then plug in your ISP, flash away
[03:50:52] <Haohmaru> will it stay active even after avrdude exits?
[03:51:03] <Thrashbarg> yes that's what the manual says
[03:57:55] <Haohmaru> two xmegas burned so far on this board :/
[04:01:45] <Jartza> wazzup
[04:33:30] <Haohmaru> crap, avrdude says the programmer doesn't support -E
[04:50:11] <Thrashbarg> what programmer are you using?
[04:55:49] <sammyb> hey Thrashbarg
[04:55:57] <sammyb> last i saw you, you had made a pong game out of 555s
[04:55:59] <sammyb> and that was some years ago
[04:56:06] <sammyb> whatcha been up to lately mate
[04:56:28] <Thrashbarg> hey been working on a tube synthesizer recently
[04:56:37] <Thrashbarg> though it's stalled due to money problems... again
[04:56:52] <sammyb> oooh neat project
[04:57:03] <Haohmaru> Thrashbarg olimex avrispmk2 clone
[04:57:29] <sammyb> yeah financing projects is an issue here as well
[04:57:32] <Thrashbarg> heh
[04:57:43] <Thrashbarg> Haohmaru: yeah hmm not sure what to do about that
[04:58:11] <Haohmaru> i think it might be because xmega PDI uses the reset signal as clock
[04:58:26] <Thrashbarg> okay
[04:58:58] <Thrashbarg> sammyb: https://www.youtube.com/user/256byteram there's a few videos here of my stuff :P
[04:59:14] <Haohmaru> one clue is, the two chips that burned, i flashed just the FW without flashing the fuses
[04:59:22] <Haohmaru> and by default, the jtag is enabled
[05:00:00] <Haohmaru> this time, third chip.. i configured the fuses, and let it run powered
[05:00:19] <Haohmaru> it's sitting like this for like 20 minutes, nothing's heating, it looks good
[05:00:27] <sammyb> damn very cool Thrashbarg
[05:00:29] <Haohmaru> now i'm scared to flash the firmware
[05:00:33] <sammyb> sounds really smooth :D
[05:01:20] <Thrashbarg> sammyb: what one? The Bandpass filter? That's on a transistor synth I made in 2011. The all-tube synth is 'MIDI (Voltage) Controlled Theremin"
[05:01:34] <sammyb> yes
[05:01:37] <sammyb> oooh very nice
[05:01:54] <sammyb> tube bandpass filterw/reberb
[05:01:56] <sammyb> reverb
[05:01:59] <Thrashbarg> yeah
[05:02:29] <sammyb> ooh i see you like classic prince of persia :D
[05:02:34] <sammyb> i too am a fan
[05:02:37] <Thrashbarg> yeah hha
[05:03:43] <Haohmaru> if this third chip burns too it would have to mean that it's my FW doing something wrong, most pins are now disconnected
[05:04:55] <anonnumberanon> oh god i think i found my usbasp problem
[05:05:15] <anonnumberanon> didt come from the programmer
[05:05:33] <anonnumberanon> i cant wait to try it
[09:05:49] <bss36504> Haohmaru: did you figure it out?
[09:06:30] <Haohmaru> nope
[09:06:40] <bss36504> Which Xmega?
[09:08:00] <bss36504> brb
[09:10:34] <Haohmaru> the third chip hasn't burned yet
[09:12:35] <bss36504> alright I'm back.
[09:12:51] <Haohmaru> i can't tell what caused the other two to burn, either the combination of wrong FW plus jtag enabled
[09:13:17] <Haohmaru> there was also a spi eeprom on the board which was hot, now it's not connected
[09:13:25] <Haohmaru> xmega128a3u
[09:13:47] <bss36504> Well if the SPI eeprom was hot theres something fucky in your hardware, Id be willing to bet.
[09:13:53] <bss36504> you said 100pin SMD, right?
[09:13:55] <bss36504> what package?
[09:14:15] <bss36504> how good is your soldering? It's totally plausible that you messed up two soldering jobs with shorts
[09:14:32] <bss36504> I've done it and I've been soldering for 80% of my life
[09:16:15] <Haohmaru> no, i got it wrong, it's 64 pin
[09:16:19] <Haohmaru> but it's a big body
[09:16:31] <bss36504> Well either way
[09:16:35] <bss36504> TQFP?
[09:18:27] <Haohmaru> yes, tqfp
[09:18:41] <Haohmaru> i didn't solder it, i don't dare soldering these ;P~
[09:19:14] <bss36504> Oh the QFP types are the easiest of them all, QFNs suck at that size especially if they have a thermal pad
[09:19:16] <bss36504> anyway...
[09:19:35] <bss36504> how is it connected? Did you reverse polarity on it? Does your programmer even see it?
[09:20:05] <Haohmaru> when the xmega was "new" - powering the whole board == nothing
[09:20:40] <Haohmaru> then flashed the firmware, and after a tiny amount of time it made a sizzling sound aaaand magic smoke
[09:21:00] <bss36504> Well in the future dont bother trying to flash if you cant even read the chip ID
[09:21:12] <bss36504> For exactly this reason. Something is probably about to sizzle
[09:21:13] <Haohmaru> ehm, it was flashable
[09:21:29] <bss36504> I'm guessing you are doing something wrong with supply pins
[09:21:34] <Haohmaru> brand new xmega, the programmer talks to it, flashes it, and after that - it burns
[09:21:57] <bss36504> Wait I thought you said the programmer did not "see" it
[09:22:12] <Haohmaru> when?!
[09:22:21] <bss36504> Haohmaru
[09:22:21] <bss36504> when the xmega was "new" - powering the whole board == nothing
[09:22:36] <Haohmaru> with "nothing" i meant that nothing went hot
[09:22:46] <bss36504> Oh. well that was misleading haha
[09:22:51] <bss36504> so you can read the chip ID?
[09:23:06] <Haohmaru> before it burned - yes
[09:23:42] <bss36504> It just seems very unlikely that a firmware could cause both the Xmega to smoke and the external EEPROM to get hot as well, unless you were somehow sinking or sourcing an enormous amount of current through many IOs.
[09:24:12] <Haohmaru> no idea
[09:24:26] <bss36504> Do you have a schematic you can share?
[09:26:09] <Haohmaru> not really, this is a temporary prototype board made out of chunks of existing boards connected with cables, legs, and what not
[09:26:45] <Haohmaru> looks like a bomb ;P~
[09:26:51] <bss36504> lol
[09:27:16] <bss36504> is the board with the MCU just a breakout?
[09:27:22] <Haohmaru> nope
[09:28:16] <bss36504> Do you have a schematic for just that then?
[09:28:22] <Haohmaru> it's an old pcb from a previous project which used the same xmega and eeprom, but from that point onwards it has been modified (uglified) for the current project
[09:28:49] <bss36504> oy.... you dont make this easy haha
[09:29:35] <Haohmaru> i kinda have, altho it's not the same thing on the prototype
[09:30:30] <Haohmaru> anyways, this third one works so far, after flashing the fuses first, then the FW, and the eeprom desoldered
[09:30:58] <Haohmaru> that eeprom is supposed to be FRAM anyways, so it had to get off the board ;P~
[09:32:46] <Haohmaru> why isn't there a cheap way to flash these kinds of chips on a socket before putting them in the circuit :/
[09:33:07] <Haohmaru> i know there are sockets but they are crazy expencive last time i checked
[09:33:22] <Haohmaru> maybe not as expensive as 5 or 10 burnt xmegas
[09:33:27] <Haohmaru> blah
[10:00:41] <bss36504> Because sockets are extremely low volume products
[10:00:47] <bss36504> glad its working though
[10:46:34] <pwillard> Prices used to be near $90... now between $4 and $8
[11:05:10] <twnqx> which ones, 8pin soic?
[11:05:27] <twnqx> ever since chinese fakes of enplas open top sockets exist it's gotten cheaper
[11:05:44] <twnqx> weirdly it's cheaper to buy them with a DIP8 adapter solderen on than buying the socket alone
[11:06:08] <twnqx> reminds me i wanted to create an eagle library item for enplas open top sockets
[11:06:09] <twnqx> >_>
[11:06:33] <twnqx> http://www.costronic.com.tw/isheng/ForImage/Products/is99/OTS-16-1.27-03.jpg looky, even have the drawing open!
[12:37:54] <Levitator> Greetings, sweet homies.
[12:45:28] <anonnumberanon> How good is SimulAvr ?
[13:04:36] <Casper> how good is a crappy simulator that you can't connect much to the virtual avr?
[13:04:55] <Casper> that's the main issue: peripherical
[13:05:29] <Casper> the avr emulation per se is ok, but the lack of peripherical is the real issue....
[13:56:32] <anonnumberanon> So I may have forgotten a linking step in my tool-chain while programming this avr. This could be the source of my woes.
[13:56:39] * anonnumberanon investigates further
[14:26:03] <carabia> oh haohmaru left
[14:27:16] <bss36504> yes apparently
[14:27:20] <carabia> yeah...
[14:27:32] <carabia> so i guess he was repurposing some old board or something
[14:27:36] <bss36504> Apparently he figured it out by programming the fuses before the firmware
[14:27:38] <bss36504> yeajh
[14:27:40] <bss36504> old board
[14:27:49] <bss36504> hacked together with a bunch of other shit
[14:27:55] <carabia> i guess the board must have been for the same mcu anyway though
[14:27:57] <carabia> or similar
[14:28:02] <bss36504> no clue why the fuses would let the magic smoke out of the MCU
[14:28:08] <carabia> haha
[14:28:22] <carabia> i'm sure it was pebkac rather than fuses
[14:28:24] <carabia> but YMMV
[14:28:25] <bss36504> yes, he said it was from an old project but the new one used a similar EEPROM and the same xmega
[14:28:43] <carabia> does xmega do swd?
[14:29:29] <bss36504> I just googled two words from your last two messages. swd I assume is software debug?
[14:29:36] <bss36504> I'm even a native english speaker haha
[14:29:47] <carabia> it's a two-wire debug protocol
[14:30:01] <carabia> used in arm... I guess xmegas just use isp/jtag/dw
[14:30:03] <bss36504> I believe xmega is exclusively PDI
[14:30:14] <carabia> yeah...
[14:30:18] <bss36504> Possibly JTAG on some of the A series.
[14:30:41] <bss36504> I know that at minimum they all support PDI. I have not seen an ISP or DW xmega, mostly because those are shit
[14:30:44] <carabia> well, just figuring ... wtf kind of board doesn't break out the programming header
[14:30:57] <carabia> okay, so just pdi and jtag I guess
[14:30:57] <bss36504> haha I accidently did that once
[14:31:01] <bss36504> felt like such a moron
[14:31:10] <carabia> cause he was after a socket to program it, hah
[14:31:21] <bss36504> right, idk what that was all about
[14:31:23] <carabia> or was it because he was smoking them to no end
[14:31:28] <carabia> :D
[14:31:51] <bss36504> apparently he didnt even solder this board, so idk where the error lies. Like you said, pebkac
[14:31:55] <carabia> i'm /almost/ 100% sure you can't smoke it with just fuses
[14:32:13] <bss36504> or firmware for that matter
[14:32:20] <bss36504> so something in hardware was being fucky
[14:32:26] <bss36504> he couldnt provide schematics though
[14:32:32] <carabia> naturally :)
[14:32:35] <bss36504> So I kind of just bailed on it
[14:32:44] <bss36504> I do have an actual job to do :)
[14:32:52] <carabia> oh yes, 'murica
[14:33:12] <bss36504> Whats that supposed to mean?
[14:33:15] <bss36504> :{
[14:33:18] <carabia> the time really
[14:33:25] <bss36504> ooh, didnt really mean mustache face
[14:33:31] <bss36504> oh gotcha
[14:33:34] <carabia> ha
[14:33:36] <bss36504> whats your time zone?
[14:33:53] <carabia> GMT+2
[14:34:43] <carabia> that's like... EDT+shit ton
[14:34:52] <carabia> i'm bad with timezones.
[14:35:09] <bss36504> yeah about EDT+6
[14:35:22] <carabia> sounds about right.
[14:36:46] <carabia> on an unrelated note i'm becoming a commie...
[14:36:58] <bss36504> Oh yeah?
[14:37:10] <carabia> yeah. I'm not sure if I ought to be sad or not.
[14:37:26] <bss36504> Which commie country?
[14:37:44] <carabia> no i mean... software.
[14:37:51] <carabia> giving me the chills it is.
[14:37:58] <bss36504> Ohhh I see
[14:38:05] <bss36504> Like open source?
[14:38:45] <carabia> yeah. I've been on loonix for the last... month or so.
[14:39:45] <carabia> it's super scary. I see red everywhere. And the old hammer and sickle.
[14:39:53] <bss36504> lololol
[14:40:02] <bss36504> Just buy redhat, problem solved
[14:40:19] <bss36504> then you can bask in those sweet sweet commercial updates
[14:40:28] <carabia> *sweet*!
[14:43:23] <carabia> Anyway. Enough loitering for me. I think i'll watch a tom cruise movie.
[14:43:24] <Levitator> Open Source is not Communism.
[14:49:22] <anonnumberanon> What is the .bss segment lads?
[14:51:03] <Levitator> https://en.wikipedia.org/wiki/.bss
[14:51:06] <bss36504> anonnumberanon: http://www.nongnu.org/avr-libc/user-manual/mem_sections.html
[14:51:10] <Levitator> Looks like zero-initialized static data.
[14:51:35] <anonnumberanon> ty bss36504
[14:51:46] <bss36504> no problemo, my dude
[14:55:03] <anonnumberanon> I thought .bss was bullshit sex
[14:55:56] <bss36504> no, it's my initials haha. I've had this nick since I was a young teensman, and havent bothered changing
[14:56:05] <bss36504> in avr parlence, I have no clue
[14:57:05] <Levitator> Seems like a space-saving mechanism since it's common to initialize things to zero, and there's no point in storing tons of zeroes in the executable image. Basically, a special case of run-length-encoding?
[14:57:40] <anonnumberanon> No Levitator we were having fun, why did you have to ruin it?
[14:58:08] <bss36504> :P
[15:03:28] <Levitator> I don't believe in fun.
[15:04:03] <anonnumberanon> Ah now we're having fun again.
[15:04:22] <Levitator> XD XD XD
[15:05:03] <anonnumberanon> do have to do -j .text -j .data for a good .hex output or leaving those blanks will get me a working .hex but maybe with unused junk in it? like if im not using eeprom?
[15:06:27] <anonnumberanon> or .bss
[16:02:52] <bss36504> Yall want to know of a shit language? Cadence Skill.
[17:02:23] <Tom_itx> bss36504, why you programming AI anyway?
[17:02:44] <Tom_itx> i personally don't find any of that very interesting
[17:17:47] <carabia> Tom_itx: question: what are the slang terms for chewing tobacco (if there are any)?
[17:19:04] <Tom_itx> not sure
[17:19:13] <Tom_itx> there probably are
[17:21:34] <carabia> y'all want some of that there dang...
[17:22:38] * carabia chews on some o dat dere dang ol tobaccos n spits
[17:22:40] <cehteh> Evidlo: did you figured out how to fuse the tiny85 for 16mhz w/o overclocking?
[17:27:35] <carabia> cehteh: ?
[17:28:39] <cehteh> he asked yesterday about pimping the OSCCAL up
[17:29:19] <cehteh> but tiny85 has this PLL and you can fuse it to run at 16mhz by doubling the 8mhz RC osc
[17:29:35] <carabia> yes
[17:30:02] <carabia> and then you can further pop it with the osccal yes, but it won't be the nicest clock in town
[17:30:25] <cehteh> certainly not
[17:30:38] <carabia> not really meant for that anyway
[17:30:46] <cehteh> but i'd expect the PLL to be better than the RC osc alone
[17:31:34] <cehteh> since it runs at 64Mhz and is divided down, that evens out a bit of the jitter
[17:37:08] <carabia> yes, the fuses don't exactly work as you described though
[17:37:17] <cehteh> huh?
[17:37:33] <cehteh> that would be a bug
[17:38:03] <carabia> the pll runs at 64 mhz and it gets fed to an optional prescaler through a fixed scaling factor
[17:38:15] <carabia> and that gets fed to the system clock
[17:38:32] <cehteh> thats described in the datasheet
[17:38:32] <carabia> it's 64 scaled down to 16 -> prescaler -> sysclock
[17:38:45] <carabia> not 8 doubled
[17:39:12] <cehteh> 8mhz * 8 == 64mhz PLL ... /4 =16mhz main clock
[17:39:36] <carabia> oh well you meant the other end. Yea sure.
[17:39:52] <cehteh> the 'normal' prescaler is there too you can divide the 15mhz down
[17:40:27] <carabia> yeah, after all that jazz.
[17:44:51] <carabia> You should be able to get the clock running at ~32 MHz or so cranking the OSCCAL up
[17:45:52] <carabia> then again that's just academic and if you /need/ that i suggest going for another micro :p
[17:59:12] <LeoNerd> So what have I done wrong here? ATtiny841. fresh after booting, I turn on all the bits of PUEA ((except for the UART)), and all the bits of PCMSK0. I enable pinchange interrupt, and print (on the UART) the value of PINA on change. I'm getting tonnnnes of noise though, it's changing a lot
[17:59:19] <LeoNerd> As if my enabling the pullups isn't working
[18:02:15] <LeoNerd> Huh, ohwait. must have been a bad flashing or something; it works now I've rebuilt+reflashed.
[18:02:20] <LeoNerd> Apologies for the noise :)
[18:26:01] <Evidlo> cehteh: Haven't looked into it yet
[18:26:16] <Evidlo> I'll be doing that soon after I finish a few assignments
[22:53:27] <rue_house> *** HELLO ALL, i'D LIKE TO ANNOUNCE AN AVR MAKEFILE COMPETITION ***
[22:53:48] <rue_house> submit your best makefiles for building avr projects and win
[22:53:49] <rue_house> a
[22:54:25] <rue_house> entry deadline is Nov 31
[22:55:40] <rue_house> ^^^^^^^^^^^
[22:55:42] <Tom_itx> a what?
[22:55:59] <rue_house> to win the prize!
[22:56:10] <rue_house> a makefile for avr projects
[22:56:25] <Tom_itx> what prize?
[22:56:34] <rue_house> yes! the prize!
[22:56:51] <rue_house> you cant win it if you dont enter!
[22:57:03] <Levitator> I hope to God you are trolling.
[22:57:06] <rue_house> by submitting your best makefile for avr projects
[22:57:12] <rue_house> no, I'm the channel guru
[22:57:20] <rue_house> I'll prove it!
[22:57:22] <Tom_itx> i'm afraid mine would look too much like yours
[22:57:24] <Tom_itx> :)
[22:57:48] <Tom_itx> no i'm the channel guru
[22:58:13] <rue_house> you can put a hat on too, its all good
[22:58:22] <Casper> Levitator: yeah, that's the issue, he's the channel owner, he's somewhat not too sane, yet knowledgeable. That make him a dangerous person to piss off :D
[22:58:36] <Tom_itx> hah
[22:58:39] <rue_house> we are so excited to have a good competition to get people riled up!
[22:58:54] <Tom_itx> i'm not sure who owns which one really
[22:59:05] <Tom_itx> haven't looked in years
[22:59:12] <rue_house> it was put in my lap for some reason
[22:59:18] <Levitator> So, I mean, why would you announce a prize and then not say what it is?
[22:59:21] <rue_house> I think people briefly thought I was sane or soemthing
[22:59:28] <Tom_itx> cause that's just rue
[22:59:34] <rue_house> Levitator, enter so you dont lose out!
[22:59:47] <rue_house> this is SO exciting!
[22:59:48] <Tom_itx> he's trying to spark motivation
[23:00:09] <rue_house> Tom_itx, you got #robotics, cause at that time, people thought I was crazy or soemthing
[23:00:19] <carabia> HOLY MARY MOTHER OF JESUS THIS IS REALLY EXCITING
[23:00:28] <Tom_itx> and how do they feel about you now?
[23:00:39] <carabia> THIS ////IS//// EXCITING
[23:02:15] <rue_house> good luck to everyone who enters!
[23:02:15] <Tom_itx> some makefiles are pretty complex
[23:03:49] <Tom_itx> be sure to include doxygen in it
[23:04:41] <carabia> okay so, isn't it in order to establish a set of rules?
[23:04:52] <Tom_itx> no
[23:04:56] <carabia> as in, first rule: you don't talk about project makefile
[23:05:04] <Tom_itx> whatever you can do with a makefile and an avr
[23:05:14] <carabia> second rule: see rule #1
[23:05:32] <carabia> third rule: if someone says stop or goes limp or taps out, the makefile is over
[23:06:41] <carabia> entries to be submitted by nov 31st to PO BOX /dev/null
[23:06:50] rue_house changed topic of #avr to: ENTER YOUR BEST UNIVERSAL AVR MAKEFILE TO WIN! ENTRIES DUE BY NOV 31!! GOOD LUCK TO ALL CONTESTANTS! http://tom-itx.no-ip.biz:81/~webpage/index.php
[23:15:37] <carabia> now nudge brian jerkoff at hackaday to get featured!!
[23:49:33] <anton02> if I have a square wave signal connected to one of the digital pins of my avr, what would be the best way to generate a 1millisecond interrupt if the square wave frequencies I have to choose from are 1024Hz, 4096Hz and 9182Hz
[23:53:17] <Casper> your question make no sense