#avr | Logs for 2016-05-06

Back
[01:28:51] <rue_2bed> best way to restart the microcontroller after a firmware bug that locks it up
[01:37:15] <_ami_> rue_2bed: you mean, when the instruction reaches at return; of main()?
[01:41:12] <Emil> Lambda_Aurigae: does the high voltage programmer also fix the avrs that need external clock?
[01:41:25] <Emil> or crystal
[02:20:57] <WormFood> Emil, yes. If you look at the parallel programming notes, you'll see they also provide clock pulses.
[03:36:58] <sim642> I have a atmega8u2 with DFU and want my own firmware to also do a serial connection over USB. The problem is however that the Teensy usb serial library seems to be too big. Anyone know of any alternative ways?
[03:40:24] <theBear> you mean your own bootloader ?
[03:40:38] <theBear> and you know what bootloader vs program means ?
[05:56:00] <twnqx> http://imgur.com/gallery/Y3gtGnU cute
[05:57:03] <Lambda_Aurigae> encapsulated deadbug.
[05:57:04] <Lambda_Aurigae> nice
[05:57:13] <Lambda_Aurigae> until one of those caps needs to be replaced.
[06:10:15] <Snert__> they want you to not fix the dead one. So you get to lose 200bucks again.
[06:13:18] <cehteh> y
[06:50:23] <NicoHood> I need to recover fuses via high voltage programming for an atmega32u4. Does every chip support serial HVP or are there which only support parallel? because if the 32u4 only support parallel i have a problem
[06:50:54] <WormFood> not all MCUs support high voltage parallel mode
[06:51:20] <NicoHood> nah i mean serial
[06:51:23] <WormFood> what about 8 pin ICs? There aren't enough parallel pins to support parallel mode. Those particular chips have a high voltage serial mode of programming
[06:51:23] <NicoHood> i need serial
[06:51:46] <NicoHood> does the 32u4 support both (it has enough for parallel, but i need serial)
[06:51:51] <WormFood> High voltage serial programming is a fallback for MCUs that don't have enough pins.
[06:51:58] <NicoHood> and for those who have?
[06:52:02] <WormFood> I'm not aware of anything that'd support both. That'd be kinda silly
[06:52:05] <NicoHood> will they suypport both or ONLY parallel?
[06:52:15] <WormFood> xor
[06:52:19] <NicoHood> so it will only support parallel
[06:52:21] <NicoHood> damn
[06:52:21] <WormFood> one or the other, but not both
[06:52:25] <NicoHood> then i need a new board
[06:52:30] <WormFood> just get a cheap programmer.
[06:52:38] <WormFood> what type of package on the ic?
[06:52:43] <NicoHood> i think HVP will destroy the board anyways
[06:52:49] <NicoHood> its an arduino leonardo clone
[06:53:01] <WormFood> you only need high voltage on the reset pin
[06:53:20] <NicoHood> but it has a pullup to 5v
[06:53:26] <NicoHood> which will cause damage
[06:53:29] <WormFood> it's quite likely you can HVP program it, on the board, of course depending on the state of the reset pin
[06:53:31] <WormFood> no
[06:53:56] <WormFood> it shouldn't cause any problems. That should be something like a 10k pullup resistor.
[06:54:22] <WormFood> you need to see what else that is connected to. You may need to isolate that somehow from other ICs, if they share the reset signal.
[06:55:54] <WormFood> look at the datasheet for HVP programming details. Obviously your i/o lines can't be too loaded, or you'll have problems, but you said it's an Arduino, so I'd expect all those lines to be free.
[06:56:57] <Lambda_Aurigae> HVSP is for tiny chips...HVPP is for mega chips(and maybe for larger tinys but I doubt it)
[06:57:37] <Lambda_Aurigae> which is supported for your chip is in the datasheet.
[07:00:21] <Lambda_Aurigae> what was done to make the chip not usable and that you need HV programming?
[07:02:04] <NicoHood> a diode to 5v and a 10k pullup
[07:03:08] <NicoHood> I deactivated ISP by fuses accidentially. Its not that its my first time to change fuses, but now there is the day where i set it finally wrong
[07:03:16] <WormFood> that diode may pose a problem, depending on how it's connected. Perhaps it was put there to allow high voltage programming.
[07:04:03] <Lambda_Aurigae> there is a device called a fuse doctor that can reset it all for you...and easily made from an avr and a few parts.
[07:04:05] <WormFood> NicoHood, that exact same thing happened to me the other day. I programmed the right values, into the wrong fuses. I had it back up and running in less than 2 minutes.
[07:05:14] <NicoHood> I found this:
[07:05:14] <NicoHood> http://www.gammon.com.au/forum/?id=12898
[07:05:35] <NicoHood> but this requires a special ciruit which i do not have. I do not have enough materials here to build it
[07:05:38] <NicoHood> the delay
[07:12:49] <Lambda_Aurigae> well, you can't do HVPP with a usbasp.
[07:13:28] <Lambda_Aurigae> http://mdiy.pl/atmega-fusebit-doctor-hvpp/?lang=en
[07:13:39] <Lambda_Aurigae> this is what I use, or a derivation of it anyhow.
[07:14:16] <Lambda_Aurigae> I also have an avrdragon which can do it as well but only used it once for that purpose.
[07:28:46] <WormFood> Has anyone ever bought a USB VID and/or PID?
[07:29:09] <Lambda_Aurigae> many have, but not I.
[07:29:20] <Lambda_Aurigae> kinda expensive.
[07:29:49] <WormFood> http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1 <-- 15 euros for a PID
[07:29:55] <inflex> cheap enough
[07:30:05] <inflex> I should buy a couple just for the hell of it
[07:30:20] <inflex> will make a machine that goes "ping"
[07:31:25] <Lambda_Aurigae> WormFood, that looks like a unique situation but doable.
[07:31:36] <inflex> Wonder how long before they run out of PIDs
[07:31:41] <inflex> (only got 64K)
[07:32:10] <Lambda_Aurigae> with their VID having been revoked, if you use their vid/pid combo it is not exactly "legal" and all that.
[07:32:49] <WormFood> they want to change the rules after the product/service is sold? That's not cool. They can't reuse that vid anyways. I see they're not doing anything wrong.
[07:33:02] <WormFood> They paid for the right to use that VID
[07:33:09] <Lambda_Aurigae> yup.
[07:33:16] <WormFood> And, they're using it ;)
[07:33:18] <Lambda_Aurigae> that is a quasi-state.
[07:34:11] <inflex> yep
[07:34:14] <WormFood> http://hackaday.com/2015/04/03/usb-pids-for-all/ <-- also this
[07:34:16] <Lambda_Aurigae> if you use them and sell a commercial product with them then usb-org can, in theory, come down on you.
[07:35:33] <inflex> I do find it interesting though that they only used 2-bytes for the VID
[07:36:08] <Lambda_Aurigae> I suspect they will run out of those relatively soon.
[07:36:10] <inflex> That's plausibly more short sighted than IPv4
[07:36:12] <WormFood> Because it was 1993 when they designed it, and my god, 64k vendors?!? That's crazy. There'd never be that many.
[07:36:16] <WormFood> :P
[07:36:30] <Lambda_Aurigae> and 640K of ram is all anyone will ever need!
[07:36:41] <WormFood> But when they do run out, they can laugh all the way to the bank, at $5k usd per vid
[07:36:49] <Lambda_Aurigae> yup.
[07:36:54] <WormFood> leave the mess for someone else to clean up.
[07:36:59] <inflex> They'll probably have one of the VIDs explicitly assigned as an "extended-VID" and then the system must read another 2 bytes or something
[07:37:33] <WormFood> That'd fuck legacy devices.
[07:37:33] <Lambda_Aurigae> that's all software anyhow...just rewrite it!
[07:37:34] <inflex> Thing is,that's only about $320 million
[07:38:00] <inflex> over the lifetime of the corp/body, that's not a lot
[07:38:18] <Lambda_Aurigae> yeah, that's barely enough to pay the CEO for 2 years.
[07:38:29] <WormFood> actually, the vid should have been 3 bytes, and the pid should have been 1 byte.
[07:38:43] <inflex> WormFood, and some vendors can claim multiple VIDs
[07:38:45] <inflex> yeah
[07:38:55] <cehteh> they should have used uuid's and no licensing :D
[07:39:10] <WormFood> And they should have a range of VIDs, that are used by one off products, for companies that don't really need their own VID
[07:39:12] <cehteh> but well that how they enforce usb conformity
[07:39:12] <inflex> cehteh, now that's better thinking.
[07:40:04] <inflex> Hell, they did better with ethernet MAC addressing at least
[07:40:08] <Lambda_Aurigae> just hope nobody reuses a vid/pid pair! imagine the chaos of having your usb mouse and usb joystick getting confused!
[07:40:11] <inflex> (though they're now being recycled afaik?)
[07:40:34] <Lambda_Aurigae> inflex, and some companies just picked their own and didn't bother to register them back in the early days.
[07:40:42] <cehteh> there are enough companies which reusing them
[07:40:43] <inflex> Lambda_Aurigae, MAC or VID/PID?
[07:40:48] <Lambda_Aurigae> MAC
[07:41:05] <Lambda_Aurigae> I've seen duplicated MAC addresses in a single case of cheap ethernet cards.
[07:41:19] <Lambda_Aurigae> duplicated from 3com actually.
[07:41:23] <inflex> I've only ever personally had the trauma of a duplicate MAC on the same network once... it was fun at least.
[07:41:37] <Lambda_Aurigae> half a dozen times here at least.
[07:41:40] <inflex> ouch
[07:41:49] <Lambda_Aurigae> and one of them was actually internet involved.
[07:42:11] <Lambda_Aurigae> try tracking down why one computer can hit a website and another can't when they are identical machines sitting side by side.
[07:43:21] <Lambda_Aurigae> although, idiots using fully routeable IPs as internal IP address range is much more common and causes similar issue.
[07:45:00] <Lambda_Aurigae> I have a bank as a customer who uses 133.133.x.x for their internal IP range.
[07:45:21] <Lambda_Aurigae> they can't do business directly with a certain banking institute in japan because of it.
[07:45:34] <inflex> *sigh*
[07:46:32] <Lambda_Aurigae> whenever they try to hit that bank's servers they get a not found because their router sees the IP and thinks it should be internal only.
[07:47:20] <inflex> Time to just move to IPv6
[07:47:33] <Lambda_Aurigae> they only discovered this when they,,,tried to do business with said japanese bank....seriously horking the odds, eh?
[07:48:57] <Lambda_Aurigae> when I first started working with them I mentioned that it could cause them problems,,about 4 years ago...their IT guy just shrugged it off..said he did it for security as nobody would ever guess their internal IP scheme and they don't have a dhcp server running.
[07:49:08] <Lambda_Aurigae> a year ago it happened.
[07:49:27] <Lambda_Aurigae> which was 2 years after that idiot IT guy left town.
[07:50:07] <Lambda_Aurigae> and their new IT company just left it as it was because they didn't see any harm in it.
[07:50:28] <Lambda_Aurigae> I only do their copiers and printers there so, what do I know about networking?
[07:53:55] <Lambda_Aurigae> anyhoo..time to go break some copiers!
[08:00:02] <Snert__> you should be able to static address your own laptop similiarly and get the same result.
[08:00:29] <Snert__> for a test case I mean.
[08:00:40] <Snert__> but you're already onto the root cause anyways.
[08:01:20] <Snert__> that IT guy was an idiot.
[08:02:10] <Snert__> if you have a packet re-writing engine available at the periphery of the network......
[08:02:47] <Snert__> you could intercept all packets destined for that address and manually send them to the gateway.
[08:03:15] <Snert__> as a temporary fix until you address the whole internal lan into private address space.
[08:04:41] <Snert__> and that might be affected by their subnet mask too.
[08:52:29] <LeoNerd> Mm.. So of my two complaints about Ragworm as compared OSHpark (being that they use HASL instead of ENIG, and their large minimum drill size), one of them is already fixed (they now offer ENIG), and they say they're going to upgrade their drills soon.
[08:52:51] <LeoNerd> So maybe I'll return to using them instead. UK-based so much better postage times for me
[08:57:20] * cehteh remembers, back in time where you got billed for each hole
[09:14:12] <bss36504> $5.78 USD per square inch, for 3 boards. How long is OSHPark shipping to you?
[09:14:52] <LeoNerd> To me? At least a week.
[09:15:26] <LeoNerd> I got lucky on my last board order, and on the day I submitted it someone wanted a fast-turnaround board, so I got panelled onto the same one. So my boards were shipped in 4 days.. took a further 7 to get to my house
[09:42:44] <WormFood> [21:31:21] * cehteh remembers, back in time where you got billed for each hole <-- that is how whorehouses work too.
[09:43:21] <cehteh> but there you dont let them drill for you
[09:50:00] <WormFood> well, they're predrilled, but you can drill them over again, if you have a bigger drill bit.
[09:56:13] <WormFood> Did you hear about the hooker who had her appendix removed, and the doctor sewed up the wrong hole? Now she's making money on the side.
[10:43:47] <bss36504> ba dum tsss
[15:08:23] <cehteh> lol .. just reading that "eating bananas in erotic fashion" on LiveStreams/TV got forbidden in Chinan
[15:08:25] <cehteh> wtf ..
[15:08:33] <cehteh> it cant be that crazy
[15:08:49] <cehteh> but then: https://www.youtube.com/watch?v=FgkxxLUwfqI
[15:11:03] <dsal> Dude. NSFW
[15:11:31] <dsal> I don't understand what's happening.
[15:12:57] <cehteh> nsfw? .. come on
[15:13:18] <cehteh> do you work for the catholic church?
[15:13:39] <dsal> I was joking before it got really weird.
[15:13:43] <dsal> Then I was confused.
[15:14:25] <cehteh> really weird is https://www.youtube.com/watch?v=kv-ieyWqcXI ... but thats not safe for anything :)
[15:22:31] <megal0maniac> I can only blame myself for clicking on that
[15:23:11] <dsal> My client embeds. I can blame others.
[15:35:07] <WormFood> I used to work for a porn hosting company. *anything* was work safe there.
[15:35:23] <WormFood> looking at porn, was part of my job.
[16:41:31] <inkjetunito> is there tolerance of crystal osc caps crucial?
[16:42:15] <LeoNerd> Not -terribly-
[16:42:36] <LeoNerd> 10% or so even should be totally fine... you're unlikely ot be able ot predict board stray that accurately anyway
[16:42:43] <LeoNerd> Unless you have some precision fab
[16:44:14] <inkjetunito> good. 10% is what i have
[16:44:52] <LeoNerd> The crystal just needs something to turn it into an LC filter, basically
[16:45:40] <carabia> cehteh no he works for the islamic church