#avr | Logs for 2014-07-11

Back
[00:39:36] <rue_mohr2> who is using what fuse calculator
[03:38:48] <Guest81976> rue_mohr2, use this one: http://www.engbedded.com/fusecalc/
[04:31:41] <Grievre> If you're using the compare out pins and CTC mode, is the pin high for one system clock or one timer tick?
[04:31:43] <Grievre> I would assume the latter
[09:15:15] <rue_mohr2> timer
[09:15:22] <rue_mohr2> you can set the divider
[13:13:54] <Duality_> anyone here got some logic (like 74hc377) knowledge :)?
[13:14:37] <Duality_> it's a octal d flip-flop. i use it as a register.
[13:15:02] <malinus> Duality_, is this a quiz?
[13:15:10] <Duality_> no
[13:15:13] <malinus> :S
[13:15:17] <Duality_> why ?
[13:15:23] <malinus> sounds like a quiz
[13:15:42] <malinus> if you had a specific question, you would surely just have asked, right?
[13:15:46] <Duality_> no quiz here. but i need someone who knows how the thing works. to verify if i know how it works :)
[13:20:34] <Duality_> gues this shows me that i understand how it works from reading the data sheet: http://wiki.nesdev.com/w/index.php/74377
[13:21:51] <mesger> is it so if you want to use an atmega2560 for spi that you can not use the serial rx1 at the same time ?
[13:27:09] <Duality_> mesger: the datasheet suggests that they are on different pins. thus i would asume i could use them at the same time.
[15:17:29] <hetii> HI :)
[15:22:47] <hetii> Q: The idea is to use mcu that operate on 3.3v and use it as a buck converter to produce 5v and 3.3v from 12~48v of input without additional LDO ot other DC converter.
[15:22:51] <hetii> Is that possible ?;)
[15:23:44] <jonored> You need something to get it started at least.
[15:24:04] <hetii> yep some bootstrap
[15:24:11] <jonored> of course. But a crazy arrangement of diodes or something might be enough for that.
[15:24:36] <jonored> No guarantees on whether it'd be better than a dedicated chip at it, but I'm sure you /can/.
[15:25:26] <hetii> sure, just must be a low cost solution :)
[15:29:06] <jonored> Might be worth it if you're doing a lot and there's enough else going on in the mcu.
[15:29:14] <jonored> *making a lot of them.
[15:33:15] <hetii> hmm very interesting topic
[15:33:45] <jonored> else, it looks like the discrete chip can be had for less than 75 cents single count even in through hole...
[15:34:42] <jonored> and that makes it harder to fry the board with bugs in the code.
[15:36:10] <hetii> well it will be produced in thousand if all goes fine
[15:36:22] <hetii> always something
[15:38:55] <Kev> i don't see how this design could be efficient
[15:39:58] <hetii> Its my fourth day where I calculate all costs
[15:40:49] <hetii> And after such period of time my mind can work not right :(
[15:40:54] <jonored> Kev: If you've got the bits you'd need to dedicate to running the converter not used for something else in the mcu?
[15:42:42] <Kev> i meant powering the mcu with diodes and resistors
[15:43:34] <jonored> Just to get it enough to turn on and run the efficient converter.
[15:43:35] <Kev> feels like a lousy hack
[15:45:38] <jonored> A bit, but if it's only ever actually active for startup you half don't care, and if it's cheaper..
[15:45:47] <Kev> you'd need at least some kind of transistor to turn the hack off and power it with the "efficient converter"
[15:46:25] <hetii> true, i think about that also that somehow it need to be off
[15:46:56] <jonored> If you've got a little tolerance on the mcu's power requirements, you can just make the diodes reverse biased a little when the main converter is up.
[15:48:10] <jonored> Ah, won't do if the input power is variable. oh well.
[15:51:20] <hetii> ok this is other crazy idea
[15:52:25] <hetii> ok never mind....
[15:52:29] <hetii> ehh
[15:57:18] <hetii> this was idea the idea, all my nodes will talk over canbus, so I could inform main power supply that all my chips are on and ready to change power supply, then the power supply will send a message to all my nodes to off bootstrap and use power from his step down converter and after that main power supply will use relay to swich on 24/48V
[15:59:18] <hetii> the question is about timing and if there will be enought energy to capacitor to handle switching procedure
[16:00:15] <hetii> is it make any sense ?:)
[16:01:49] <jonored> I think that sounds even more "and it all blows up" prone than the first one :)
[16:02:46] <hetii> haha
[16:03:07] <hetii> just an crazy idea :)
[16:06:25] <hetii> but general i will do some experiment with step down converter on MCU cause this topic is very interesting for me :>
[16:07:14] <jonored> Worth a go if you've got the time, I suppose :)
[16:08:51] <hetii> well I need find a job meantime but everyday I go deeper with designing new things and this is really crazy,
[16:10:11] <hetii> you know this feeling where everything is possible, you need just have a time and resources to make it happen
[16:11:56] <hetii> and the limitation is just made by your imagination, its grate but very dangerous :)
[16:13:45] <hetii> My parents and some friend said why I do it, go find a better job and forgot that you will start your own company. Zero support.
[16:13:58] <hetii> Its frustrating a bit
[16:16:25] <hetii> sorry its wrong topic for such # :)
[17:06:19] <Jartza> https://www.dropbox.com/s/n7nc15ub4ahbwv6/20140712_001.jpg
[17:06:35] <Jartza> first ever pcb assembled
[17:06:43] <Jartza> own pcb, that is
[17:07:15] <hetii> Congratulation :)
[17:07:38] <Jartza> except that blue "daughterboard", which is chinese power booster :)
[17:07:41] <hetii> whay kind of lcd it is?
[17:07:58] <hetii> *what
[17:09:13] <balrog-k1n> hi, not sure what the best place to ask this is: Arduino always passes -Os to avr-gcc, so I tried to use #pragma GCC optimize ("O2") for parts of the program but there binaries come out identical no matter what, avr-gcc is based on gcc 4.7.2. why wouldn't that pragma work?
[17:09:26] <balrog-k1n> attribute((optimize("O2"))) didn't make a difference either BTW
[17:11:37] <Jartza> hetii: spi version, 16x2 alphanumeric
[17:29:10] <N1njaneer> Jartza: Nice job on the PCB!
[17:35:48] <N1njaneer> I want to try milling some copper PCBs on the new mill, just so I know that I can prototype things quickly in-house if I have to. I've actually done really well doing direct-prints on to thin FR4 using a Phaser - can do 6-8 mil traces as long as there's reasonable distance between them :D
[17:35:50] <Jartza> thx
[17:53:04] <Jartza> https://www.dropbox.com/s/3d4ve5pfxvu05zj/20140712_002.jpg
[17:53:09] <Jartza> there's the other side
[17:55:28] <Jartza> actually I could've done a lot thinner traces
[17:55:57] <N1njaneer> Awesome!
[17:56:12] <Jartza> but I wasn't sure how well the toner transfer paper would work
[17:56:12] <N1njaneer> You may want to consider looking in to a tin plating bath if you are doing these regularly.
[17:56:28] <Jartza> yeah, I've been looking at that yes
[17:56:42] <Jartza> already ordered something called "liquid tin"
[17:56:49] <N1njaneer> The tin plating bath is just a compound that you immense the board in to. It's almost magical, since if you clean the copper well and immerse it, it just turns silver in a few seconds.
[17:56:58] <N1njaneer> Yep, that's the stuff I have here. From MG Chemicals.
[17:57:06] <Jartza> yah, same stuff
[17:57:15] <Jartza> didn't get it yet, but wanted to test the board anyway :)
[17:57:24] <N1njaneer> It will help to keep the copper from oxidixing in the long term, and will actually help solder to wet to the surface more readily.
[17:57:30] <Jartza> I also modded a cheap laminator machine, took a thermostat from clothes iron :)
[17:58:09] * twnqx prefers ENIG platig
[17:58:16] <N1njaneer> If you are doing bare boards like this, you may also consider getting some acrylic conformal coating as well. You can get it in aresol cans or in bulk. Nice to give a board like yours a light spray once you've soldered everything in to place.
[17:58:41] <Jartza> seems the laminotor is doing quite nice job: https://www.dropbox.com/s/fycewc62zkafsou/20140711_005.jpg
[17:58:42] <N1njaneer> twnqx: I use HASL or ENIG on production stuff, but that's easy because it's just a selection option to tell our board houses :)
[17:59:25] <N1njaneer> Jartza: I like being able to print straight on to my PCBs with no intermediate process needed. Just click print. Done. :)
[17:59:27] <Jartza> N1njaneer: sure, when I fine-tune my process a bit :)
[17:59:41] <Jartza> N1njaneer: I'd like that too :)
[17:59:55] <N1njaneer> I normally just get all boards fabbed, but it's nice for pinch situations.
[18:00:02] * twnqx just mails gerber files to china, even if it means 2-3 weeks waiting
[18:00:04] <Jartza> but for now, this 20€ laminator with 10€ thermostat and some toner transfer paper is just fine
[18:00:23] <Jartza> for my prototypes, and learning
[18:00:23] <twnqx> how do you deal with vias?
[18:00:24] <N1njaneer> Find an old Phaser printer used on eBay. I got one here locally for about $60 USD. Just needed an encoder wheel cleaned.
[18:00:47] <N1njaneer> Makes it incredibly easy to protoype 1 layer flex circuit boards, too!
[18:01:02] <Jartza> phaser... like what they are called, wax printers?
[18:01:15] <N1njaneer> Yep! Phaser was the series name from Xerox
[18:01:18] <Jartza> I used to have one at work but I think they threw that away
[18:01:29] <Jartza> I have to ask if it's still in some murky storage
[18:01:34] <twnqx> N1njaneer: do you plate vias, or do you just make them large enough and solder some wire in?
[18:01:53] <kastein> I have all my PCBs done by pcb-pool.com for professional shit and barebonespcb.com/33each.com/66each.com/4pcb.com (all the same company, just different offerings) for hobby stuff
[18:01:56] <N1njaneer> They are old and heavy and have been surplanted by laser, but you can't print on to copper with a laser printer because the static charge won't hold on the copper
[18:02:28] <N1njaneer> twnqx: Generally don't do anything but single-layer stuff here. Everything else I fab through our board house.
[18:02:31] <twnqx> i couldn't even prototype with single layer :(
[18:02:41] <twnqx> stuff is just too small
[18:03:00] <jonored> I thought most laser did a transfer off a roller?
[18:03:15] <N1njaneer> kastein: Yeah, have been using Advanced Circuits for hmm about 12 years or so now. Their prototyping prices are great. I run stuff simple protos through BareBones all the time.
[18:03:25] <kastein> yeah
[18:03:34] <kastein> I started using them back in 07 for my senior project
[18:03:35] <twnqx> comparable with the chinese ones?
[18:03:41] <twnqx> or is that just for faster speed?
[18:04:09] <kastein> I dunno about chinese pricing but if you have a student address you can get qty1 board up to like 5x6 inches done for 33 bucks from 33each
[18:04:11] <N1njaneer> Now that we have the mill here, though, I'll probably look at doing the direct copper milling for the future. Nice thing with that is that you can just drill vias at the same time if desired or needed.
[18:04:42] * jonored has been doing osh park, pretty happy with it, but doesn't do frequent or urgent.
[18:04:47] <twnqx> i am still contemplating a miniature reflow oven
[18:04:53] <kastein> a few friends use oshpark and like them, yeah
[18:05:17] <twnqx> so far i only used seed, but i start exceeding their limits with 4mil trace/space
[18:05:26] <N1njaneer> twnqx: AC fabs a barebones order in a single day turn time - just no LPI and no silkscreen. Generally about $70-$100 for an average order, though based off of square inches. $33/$66 is really nice, too, but you have a minimum of 4 boards unless you are a student.
[18:05:32] <kastein> one of the HUGE benefits of pcb-pool is they will give you free paste stencils for both sides and free goldplate if you want
[18:05:53] <kastein> that's worth $200+ to me all day, since I'd have to blow 100 each on just the paste stencils from 4pcb
[18:06:02] <twnqx> mh
[18:06:09] <twnqx> i never used paste so far
[18:06:13] <N1njaneer> If you have access to a laser cutter, you can do actually do pretty well cutting paper stencils.
[18:06:29] <kastein> for work, I can't beat pcbpool though. most of my boards I do for work are 4 layer, extra thin, around 1x2 inches, packed super tight, and I get 5-6 per order, 8 day working time, shipped 1 day, for around 300 every time
[18:06:46] <kastein> with free paste stencils and ENIG gold plate, soldermask/silkscreen both sides
[18:06:48] <twnqx> that's a tad too much for hooby :P
[18:06:51] <kastein> yep.
[18:06:53] <kastein> completely agree
[18:06:56] <kastein> for work? it's worth it
[18:07:26] <N1njaneer> If you are doing features smaller than you can cut on on a laser cutter out of paper, having the metal stencils won't really help much anyhow because it's impossible to get really good prints without at VERY least a good manual printer, and more preferably a semi-automated. At that point just do pneumatic hand dispense. FAR less hassle.
[18:07:35] <twnqx> though i had some stuff done by multipcb and it was neat as well
[18:08:08] <twnqx> though it came at 340€ for 25 pieces
[18:08:24] <twnqx> and my stuff normally fits the 10$ seeed specs
[18:08:34] <twnqx> normally. no BGA so far...
[18:08:43] <N1njaneer> We've gotten good enough that even doing QFN's by hand if you lay a line of paste with the needle across the row of pads, it will reflow the joints near-perfectly with very few bridges.
[18:09:02] <kastein> god, I hate doing QFNs. Mostly because I don't have a hot air station here yet
[18:09:03] <twnqx> qfn you can just solder manually
[18:09:08] <N1njaneer> Everything else production we just do 20" x 20" 40 mil stainless stencils.
[18:09:11] <twnqx> with a regular iron
[18:09:23] <kastein> can? sure. enjoy it? nope. lol
[18:09:27] <twnqx> but obviously that depends on production amount
[18:09:37] <N1njaneer> QFN really needs hot-air if your device has a center-pad.
[18:09:40] <kastein> I can do 144 lead .5mm pqfps by hand all day but QFNs just anger me
[18:09:44] <twnqx> uhhh center pads
[18:09:51] <twnqx> this and bga makes me consider a reflow oven
[18:09:54] <kastein> yeah
[18:10:05] <kastein> everything I care about in a QFN/DFN package needs a center pad
[18:10:13] <twnqx> yeah
[18:10:14] <N1njaneer> You CAN get away with doing them a cheap $10 heat-gun. I'll occasionally do that when I don't feel like running them on the TF2000 or firing up one of the reflow ovens :)
[18:10:35] <Jartza> I actually have a atten 858d
[18:10:38] <N1njaneer> I will have to stream again sometime soon. Have a nice microscope tap on the one scope :)
[18:10:49] <twnqx> friend of mine uses the heat gun approach... put tin to the pad on the pcb, melt with heatgun, drop IC in, solder pins, done
[18:10:50] <twnqx> :S
[18:10:51] <Jartza> it was cheap and I mainly got it for shrink-wrap
[18:11:19] <twnqx> i haven't tried it yet, i try to avoid those chips
[18:11:33] <twnqx> though i have an airgun. contemplating IR though
[18:11:57] <twnqx> since the cheap chinese reflow ovens from ebay seem... how can i put it... sub-par?
[18:12:21] <N1njaneer> You really want convention if at all possible. IR-only can get tricky as it is subject to thermal shadowing if you have larger parts, especially tall ones.
[18:13:30] <twnqx> yeah, i probably would only put in bgas and center pad components
[18:13:34] <N1njaneer> I have a small batch over used for short-run prototypes when it doesn't make sense to waste a bunch of time and power firing up the 5-zone oven for only doing a single board. Unless it's a double-sided board, because doing those in the batch oven is a pain in the ass :)
[18:13:39] <twnqx> and stick to manual solder for everything else
[18:13:43] <N1njaneer> +oven
[18:14:14] <twnqx> 0.4mm pitch parts are tricky as well, but possible
[18:14:55] <Jartza> N1njaneer: would Phaser™ 8560 work?
[18:15:03] <Jartza> that's the model we had at work
[18:15:28] <N1njaneer> Jartza: LOL yep, that's the exact model I have sitting on the floor next to me. :)
[18:15:38] <Jartza> cool
[18:15:47] <Jartza> because I just heard it might still be in storage
[18:15:59] <Jartza> it's ran out of yellow, so they bought a laser :D
[18:16:31] <N1njaneer> Yeah, you can still get it to run black prints if you ask it nicely when it complains about being out.
[18:16:31] <Jartza> I guess I need to go check on monday if that's still there
[18:17:09] <N1njaneer> That or if you don't care about ever printing color with it, you can break up the wax chips that plop in to the discard tray and shove them back in to the printer :)
[18:17:38] <N1njaneer> Hmm I should go get some food!
[18:18:14] <Jartza> I guess I should get some sleep
[18:18:24] <Jartza> again 2 am
[18:19:24] <chickensk> 1am here :P
[18:20:28] <chickensk> is there somebody who use TI TLC5946 led driver ?
[18:42:16] <chickensk> http://www.ti.com/lit/ds/symlink/tlc5946.pdf
[19:09:29] <SilverB36> I have a question regarding the AVR-libc: I'm trying to convert an unsigned char to an ASCII string using utoa(), but I get a compile error, even though I know it should, by all means, compile. Is there another way to convert an unsigned char to its ASCII representation?
[19:26:34] <SilverB36> No need to answer my question anymore, I've decided I'm going to create my own function that does this for me :)
[19:27:24] <hetii> What do you think about such dc converter: http://www.ebay.com/itm/New-DC-DC-Converter-Buck-Step-down-Module-Voltage-LED-Power-3A-12V-To-3-3V-ONMF-/321432150805?pt=LH_DefaultDomain_2&hash=item4ad6d96315
[19:27:56] <hetii> it based on LM2576s
[20:07:20] <N1njaneer> SilverB36: If you know the character is ASCII 0 to 9, you can simply do "value = character - '0';
[20:08:02] <N1njaneer> Same trick if you want to convert ABCD to 0123 etc: value = character - 'A';
[20:08:46] <N1njaneer> Optionally you can also AND out the bottom bits for the numberic conversion: value = character & 0x0F;
[20:09:11] <N1njaneer> Again, in both cases, you'll get (probably) undesirable results if your character is not in the range you are expecting :)
[20:22:56] <SilverB36> N1njaneer, thanks :) I'm looking to convert an unsigned char, or uint8_t in my case, into its human readable string equivalent. If my variable uint8_t foo = 0x0F; I want it to be converted to the string c[4] = "016" :)
[20:26:02] <SilverB36> I can use the mathematical approach and devide the variable by 100 first, the quotient would be the first result (char), after which I can devide the remainder by 10, the result of that would be the second digit and the remainder is the third character.
[20:28:12] <SilverB36> Those chars can be easilly converted to ASCII by adding a certain number (forgot the value), creating an array of three ASCII chars, terminated by an additional \0, making the total array size 4. :)
[20:28:33] <SilverB36> But I was kinda hoping that would already exist
[23:44:33] <tats> quick question. i use an atmega328. on the PCB i use the aref is connected to vcc. is it safe to use the internal 1.1v? basically i'd like to be able to measure the input voltage by comparing with the 1.1v internal ref. using this code: https://code.google.com/p/tinkerit/wiki/SecretVoltmeter
[23:44:44] <tats> but i'm afraid i will short circuit.
[23:45:13] <tats> schematics of the board: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/LilyPad/LilyPad-Simple-v25.pdf
[23:48:05] <Casper> if AREF is hard wired and you set it to the internal ref, then it... will use the VCC
[23:48:19] <Casper> AREF is an highish impedance one
[23:49:10] <Casper> if you disconnect AREF from VCC, then be sure to put a capacitor between AREF and AGND or GND (depending on your chip, some have AGND, if not use GND)