#avr | Logs for 2016-01-21

Back
[02:29:25] <WormFood> Lambda_Aurigae, I've looked over the xml files, and it does appear to be the case, that it does not have default values for the fuses. However, I bet all of the fuse defaults are the same for a given family, and there is probably a set of rules that can be applied to the fuse bits, to calculate their defaults.
[05:32:48] <julius> hi
[05:33:27] <julius> what else beside "avr breakout" "avr to breadboard" would you call this: https://cdn.sparkfun.com//assets/parts/1/1/7/3/05808-02.jpg `
[05:33:39] <julius> aliexpress is giving me a hard time in finding it
[05:42:43] <LeoNerd> That's an ISP header breakout
[05:43:29] <LeoNerd> https://www.sparkfun.com/products/retired/8508 https://www.adafruit.com/products/1465 https://www.google.co.uk/search?q=avr+isp+breakout
[06:11:36] <Jartza> I made similar one, but it also features level shifter and LDO
[06:11:46] <Jartza> and 6 and 10 pin isp headers
[07:21:07] <phinxy> Can you destroy a hall effect sensor with a small 8mm neodym magnet?
[07:21:35] <Tom_itx> no but i bet you can
[07:23:56] <phinxy> i upgraded from the kitchen refridgerator magnet to the superior neodym one but the range is still the same for the hall sensor. It needs to touch the magnet for a trigger to happen.
[07:24:29] <phinxy> i bet its either because of the sensors long wires or that i dont have decoupling caps (do i need theese for digital sensors)?
[07:25:46] <Tom_itx> i defer you to the data sheet
[07:33:06] <WormFood> It's because the hall effect sensor needs to be within the magnetic field of the magnet. I'd expect it to work at a slightly greater distance, but not much.
[07:33:31] <WormFood> A reed switch should operate in a similar manner.
[07:49:55] <phinxy> if this does not work after ive tried everything its good to know i can go grab a reed switch
[07:50:15] <phinxy> i dont see how they could fail
[07:50:30] <phinxy> i actually have some mercury switches. i bet they could work too
[08:01:52] <WormFood> mercury switches are not affected by magnetic fields. :P
[08:30:54] <julius> Jartza, im in germany, so i cant really order from the usa
[08:36:41] <LeoNerd> I want an Atmega328P devboard with a 14.7456MHz xtal on it. What does anyone reckon to my chances of being able to lift and replace the 16MHz xtal on an Arduino Nano clone..?
[08:36:46] <LeoNerd> I can get those for like... £3
[08:40:35] <julius> Jartza, i will build my own too
[08:41:12] <julius> Jartza, with level shifter you probably mean that it can power 3,3v and 5v devices?
[08:41:35] <LeoNerd> I've never had a problem with levels.
[08:41:50] <LeoNerd> My programmer will drive 3.3 or 5V AVRs just fine
[08:42:31] <julius> sure, but what happens if your programmer onyl does output 5v and your device can onyl handle 3.3?
[08:42:46] <LeoNerd> Name me an AVR chip that can't handle 5V ISP
[08:43:03] <julius> could be other hardware connected to VCC/GND
[08:43:16] <LeoNerd> Alternatively: Name me an AVR chip that does not respond to ISP at 3.3V when powered at 5?
[08:43:28] <LeoNerd> I believe that's how they work - logic at 3.3V, power switchable at either
[08:43:28] <julius> like a esp12 for wifi
[08:45:48] <julius> i could be wrong, still pretty new to this
[09:15:02] <WormFood> LeoNerd, hardware wise (obviously), replacing the 16 Mhz xtal with another one of a lower speed, is not a problem, but any software that is preloaded (ie, the boot loader) may have assumptions about the speed, and may need to be compensated for
[09:15:44] <LeoNerd> WormFood: oh I'm gonna wipe that anyway, that bothers me not
[09:15:54] <WormFood> If you're not using their bootloader, and you're programming it another way, then there should be no issues.
[09:16:06] <WormFood> except for...
[09:16:13] <LeoNerd> Yeah, I'm mostly just wondering on the ease of that actual soldering job
[09:16:23] <LeoNerd> And getting hold of a suitable crystal the right size
[09:16:51] <WormFood> extreme xtal changes, may require you to replace the caps off the xtal. But from 16 to 14, you can just change the xtal and nothing else, and all will be good. If you're going to 1 Mhz, you may need to replace the caps too
[09:17:18] <LeoNerd> I'm only changing it so it's a nicer divisor for fast baud rates
[09:17:27] <LeoNerd> the 14.7456 is made for baud divisions
[09:17:44] <WormFood> When I build something, and I have to buy parts, I always spring for an xtal osc. That way I don't have to dick around with 2pf caps, and shit like that.
[09:18:22] <LeoNerd> Yeah.. plus a self-contained osc. will only need one pin, so you get PB6 back :)
[09:18:24] <WormFood> There is another one in the 16Mhz range, that is like the 14.7456, as far as baud rates goes.
[09:18:59] <LeoNerd> There's an 18.mumble
[09:19:09] <WormFood> 18.432
[09:19:48] <WormFood> I know that one off the top of my head. I used the 1.8432 mhz and 3.68Mhz for a lot of different projects in the past.
[09:20:16] <LeoNerd> I generally want as much CPU as possible. :) 14.mumble is useful because it's a nice baud rate that's just below the 16MHz maximum a lot of AVR chips have
[09:20:24] <WormFood> no
[09:20:29] <WormFood> 16 Mhz is not the maximum
[09:20:38] <WormFood> That is just what it's rated for.
[09:20:43] <WormFood> You can run them faster.
[09:21:00] <LeoNerd> Mmmm.. well,.. yes :)
[09:21:03] <WormFood> How fast? Who knows? You'll have to test it. These speeds were picked for their yeilds
[09:21:09] <LeoNerd> I did see someone running a 32U4 at something stupid like 42MHz
[09:21:12] <WormFood> yields*
[09:21:46] <WormFood> nice. I'm glad to see the higher xtal speeds in my baud rate calculator are in fact useful to someone.
[09:22:15] <LeoNerd> You have to apply active cooling at that point. I believe the demo video I saw used a freezer spray
[09:22:48] <WormFood> Awesome!
[09:23:25] <WormFood> But, to be honest, using a 42 mhz xtal is not special. I can do that with most any avr.
[09:23:42] <WormFood> without any extra cooling.
[09:23:57] <WormFood> just set the clock divider to divide it down to something the chip can handle ;)
[09:24:16] <WormFood> /8 maybe :D
[09:24:42] <WormFood> right?
[09:25:32] <LeoNerd> Wellsure
[09:26:04] <WormFood> What are your target baud rates you want to support?
[09:26:27] <LeoNerd> 115200
[09:26:36] <LeoNerd> Which is a clean divide-by-8 on 14.7456
[09:26:53] <WormFood> my baud rate calculator has some pretty cool features, if you know how to use it. I originally wrote it, to be able to find any xtal that'd work at a given non-standard baud rate.
[09:27:44] <WormFood> 16.5888 would also work
[09:28:01] <WormFood> that's a clean divide-by-9
[09:29:00] <WormFood> http://wormfood.net/avrbaudcalc.php?postbitrate=115200&clock_speed_table=1&postclock=16.588888&hidetables=1
[09:29:16] <WormFood> That also shows you a table, of every frequency, that will generate 115.2k baud
[09:30:32] <LeoNerd> Ahyes, that's a more useful way to arrange the table
[09:30:52] <LeoNerd> Usually I don't care what baud rates I can make from a certain crystal; I care about how to make the baud rate I actually want
[09:31:01] <WormFood> 472 Mhz would also work. Gives you every standard rate at 9600 baud and above. ;)
[09:31:30] <WormFood> clean divide-by-255 for 115.2k
[09:31:47] <WormFood> and everything else, 9600 baud and up (it's too fast to do 300 baud)
[09:32:14] <WormFood> I noticed that on the tables. The higher the frequency, the less baud rate errors there are, but you also get fewer low speeds
[09:33:25] <WormFood> Does anyone know of a good IC programmer, that works with Linux? And by IC programmer, I mean something that can read/write flashroms, eeproms, AVRs, etc.
[09:37:07] <Casper> WormFood: SP12 ?
[09:37:18] <Casper> require hardware serial port
[09:37:31] <WormFood> Sounds painfully slow
[09:37:46] <WormFood> Can it program an AVR in high voltage mode?
[09:38:03] <Casper> hmmm don't think so, maybe?
[09:38:45] <WormFood> I'm looking into reverse engineering a cheap IC programmer, so that it can be supported under Linux.
[09:39:06] <WormFood> If the only thing with good Linux support is serial port based, then it sounds like we need something.
[09:40:24] <Casper> whatr the... they scrapped the serial version of it??? forget sp12 it seems...
[10:33:18] <phinxy> can you use a electrolytic capacitor for decoulping/smoothing between Vcc/GND pins? if so - in what direction should it be?
[11:06:44] <Jartza> julius: order from USA?
[11:09:46] <learath> phinxy: er. the right direction?
[11:09:48] <learath> but yes
[11:10:12] <learath> generally the higher the value, the lower the frequency it blocks
[11:10:37] <learath> so electrolytics will provide bulk supply, and ceramics will block higher frequency noise
[11:18:42] <julius> Jartza, the sparkfun.com link, i was assuming then ship out from the usa
[11:19:34] <julius> WormFood, usbasp can do avr. its free
[11:22:14] <nuxil> C question why does C use -> to acces members in a structure? cant it be done using pointers like *p.member ?
[11:22:42] <julius> WormFood, did you never look into python? just scrolling over your about page
[11:22:51] <nuxil> python rocks :D
[11:23:23] <julius> nuxil, try #c or #c++ if nobody answers
[11:27:03] <nuxil> got the answer. its just a syntax sugar. makes it more clear to read :)
[11:27:13] <WormFood> julius, nope, I never finished learning python.
[11:28:14] <LeoNerd> nuxil: it can; the a->b notation is a convenient shortcut for (*a).b
[11:28:14] <phinxy> learath about the smoothing caps, when power dips doesnt the current need to flow backwards from the cap ?
[11:28:27] <learath> phinxy: uhm. what?
[11:28:33] <nuxil> WormFood, did you look at the raspberry way.
[11:28:33] <nuxil> http://www.instructables.com/id/Programming-the-ATtiny85-from-Raspberry-Pi/
[11:28:38] <LeoNerd> It's especially useful when you're doing a->b->c->d which otherwise has to look like (*(*(*a).b).c).d
[11:28:43] <nuxil> WormFood, dont know if it will help you
[11:28:54] <nuxil> LeoNerd, yeah i see it now.
[11:29:14] <nuxil> (*(*(*a).b).c).d is like woooot. compated to a->b->.....
[11:29:26] <nuxil> looks ugly as hell.
[11:30:13] <WormFood> phinxy, no
[11:30:13] <WormFood> The + leg on a cap, is always more + than -, even when discharging
[11:30:14] <WormFood> I mean, think about it this way. You're suggesting that *everyone* is wrong about this. :P
[11:30:47] <WormFood> no nuxil, won't help me, but thanks anyways. ;)
[11:30:57] <nuxil> caps have memory.
[11:31:04] <nuxil> esp electrolytt
[11:31:04] <WormFood> huh?
[11:31:27] <WormFood> I gotta get some of whatever nuxil is smoking.
[11:31:31] <nuxil> it will increase the voltage after its disconnected and dischared.
[11:31:40] <nuxil> its a common thing
[11:31:59] <LeoNerd> Dilectric leakage
[11:32:13] <WormFood> *maybe* electrolytic caps have a memory, but normal caps don't. I guarantee that. They're just 2 plates
[11:32:48] <nuxil> what is a normal cap?
[11:32:56] <WormFood> ceramic
[11:33:18] <phinxy> how much in a ballpark-figure does it cost to order 1-5pcs custom PCB single side or whatever is cheapest?
[11:33:33] <WormFood> elecrtrolytic caps are "special" (expensive).
[11:34:21] <phinxy> does caps increase in voltage when discharging? enough to fry a microcontroller?
[11:34:41] <phinxy> im about to use a 50V 1uF for my 5V
[11:35:45] <WormFood> phinxy, it depends on where you get them from, and how long you're willing to wait.
[11:35:46] <WormFood> There are places that will let you do small boards. They make a bigger board, then cut them up. If you use a place like that, you can get them pretty cheap, but they're slow.
[11:35:46] <WormFood> I should be doing this stuff, because there are sooo many places around me that make PCBs
[11:36:00] <WormFood> How could it possibly increase in voltage?
[11:36:34] <phinxy> quantum tunneling 7s
[11:40:09] <WormFood> phinxy, do you understand what exactly a cap is, and how it works?
[11:40:51] <phinxy> its two plates and electrons jump from one to the other trough a small distance.. it works like a small battery
[11:41:17] <WormFood> how does it work like a small battery?
[11:41:24] <WormFood> a battery produces voltage
[11:41:26] <WormFood> a cap does not.
[11:52:13] <cehteh> mhm
[11:52:39] <cehteh> in a cap electrons should not jump over, that would be loss
[11:53:04] <cehteh> think about a cap analogous to a loaded spring in mechanics
[11:53:38] <LeoNerd> There's a word for that: dilectric breakdown
[11:53:45] <LeoNerd> OK two words
[11:54:33] <Jartza> julius: I don't know why you couldn't order from USA to Germany?
[11:54:48] <Jartza> I've ordered lot of stuff from USA to finland. Same EU?
[12:53:10] <julius> sure i could, but the postage....
[12:53:15] <julius> for just a small item like that
[12:57:59] <phinxy> shoudl i avoid putting hot glue on ceramic capacitors or the external crystal oscillator+
[13:49:46] <julius> im looking into the possibility to flash a avr over the wireless home network. theres this project: https://github.com/jeelabs/esp-link/blob/master/README.md im guessing that they connect a usb to serial converter to the esp chip and program it that way initially. but the documentation is kinda running around the topic
[13:50:06] <julius> esp-12 is my wifi/seriell bridge of choice
[14:26:13] <cehteh> julius: should work somehow with a bootloader supporting that, problen i see is only that you want to flash it reliably, if connection got lost etc
[14:27:03] <cehteh> pure wifi/serial bridge for flashing sounds a bit fragile to me
[14:27:13] <WormFood> phinxy, I doubt hot glue would hurt anything, but I would recommend against it. If you want to keep your parts from moving around, the common thing I've seen used, is wax. It's very common for "precision" radios (radios that transmit) to have wax all around the VCO part of the PLL circuit.
[14:28:35] <cehteh> hotglue is basically wax plus some resins and ethylvinylacetate
[14:28:53] <WormFood> You think so?
[14:28:59] <cehteh> thats often used for embeddings electronics, solar cells etc
[14:29:04] <WormFood> I have some hot glue here that says you're wrong.
[14:29:16] <cehteh> huh
[14:29:19] <cehteh> what does it say?
[14:29:26] <WormFood> I actually have 3 different types of hot glue here.
[14:29:47] <cehteh> there are prolly different types of hotglue bzut most are EVA/Wax basewd
[14:29:55] <WormFood> The typical, common hot glue, is shit. I have some great hot glue, that's like rubber, when it dries.
[14:29:55] <cehteh> the common stuff
[14:30:23] <cehteh> there is good 'common' hotglue too .. if you use some brand stuff
[14:30:25] <WormFood> And I have another one, that I haven't tried yet, but it's extremely hard (for hot glue). It feels like a plastic rod.
[14:30:53] <WormFood> I pay between 15 and 30 cents per stick, depending on the type.
[14:30:58] <cehteh> does the package say what its composed from?
[14:31:05] <WormFood> I've never seen it branded here.
[14:31:11] <WormFood> What package?
[14:31:22] <cehteh> hotglue package :D
[14:31:35] <WormFood> I don't buy it in packages.
[14:31:54] <cehteh> http://www.profi-world.de/WebRoot/Store20/Shops/17680639/5256/CF1C/2489/4202/3547/C0A8/2971/F1F1/Bild_085.jpg
[14:31:56] <WormFood> I just buy however many sticks I want. Packaging increases the price, for no good reason
[14:31:58] <cehteh> i buy those
[14:32:18] <cehteh> they have a stonger variant but this is more transparent and sticks quite well
[14:32:19] <WormFood> Pattex is a good grand
[14:32:26] <WormFood> overall
[14:32:52] <cehteh> well once i worked a bit at a company which produced hotglue, so i know what it is usually composed from
[14:33:10] <WormFood> I used some of that type of glue on a project. Less than a year, it had gotten to a point, where it was literally falling off, but when it was fresh, it felt rock solid.
[14:33:32] <cehteh> which doesnt mean some special variants are different, like there are polyurethane based hotglues and stuff
[14:33:55] <WormFood> I just used some of this extra sticky (like rubber), black hot glue. I don't know how well it will stand the test of time, but it feels really solid.
[14:34:24] <cehteh> prolly containing PIB as well this stuff is creepy :D
[14:35:29] <WormFood> Oh. By the way. I live in China. I'm right near (15 minute walk) from Hua Qiang Bei, one of the largest electronics markets in the world. I buy my hot glue there. They have a big bag of it, and I just pull out, and pay, for whatever I want.
[14:36:10] <cehteh> haha
[14:36:20] <WormFood> If I go to a regular store, I could probably find hot glue in a package, but I never look for it.
[14:36:27] <cehteh> forgot about that, yes i know asian markets
[14:36:43] <cehteh> they are somewhere between frightening and amazing :D
[14:36:52] <WormFood> I love it here.
[14:37:18] <cehteh> hehe
[14:37:22] <WormFood> I can find just about anything I want at HQB
[14:37:22] <WormFood> HQB = HuaQiangBei
[14:37:30] <cehteh> from where are you?
[14:37:36] <WormFood> or, 华强北 if you prefer how it's really written. ;)
[14:37:42] <WormFood> Florida
[14:37:49] <WormFood> or as I like to call it, Floria-DUH
[14:38:19] <cehteh> florida may be good for a vacation once .. but i wont like to live there either
[14:38:32] <WormFood> You don't know Florida.
[14:38:42] <cehteh> not much
[14:38:48] <WormFood> There are 2 parts of Florida.
[14:38:54] <cehteh> well i dont know much about china either
[14:39:10] <WormFood> The tourist traps. You know what I'm talking about. And, the rest of Florida.
[14:39:15] <cehteh> and my florida knowledge is based on Miami Vice :D (j/k)
[14:39:48] <WormFood> I didn't live in, or near, the tourist traps. I was about 75-80 miles from Orlando, which is the biggest tourist trap in my area.
[14:40:33] <WormFood> That has Disney World (yeah, "World", and not "Land"), Universal Studios, and countless other things.
[14:41:42] <cehteh> usa is still on my no-fly list, there are certainly a lot things i'd like to visit there, but its huge and traveling around would be expensive and i dont feel the urge that i *must see* things there
[14:41:59] <cehteh> compared to all the pita one currently has when traveling to usa
[14:42:05] <WormFood> Having lived there for about 35 years, I know the state well. The area I'm from, is famous for their race horses. I don't know if the situation has changed (probably hasn't), but last I knew more winners of the Kentucky Derby (a famous horse race) were born in my county.
[14:42:51] <WormFood> It's not a pita for me to travel there, just expensive.
[14:43:09] <WormFood> I just don't like living in USA at all.
[14:43:13] <cehteh> you still have an american passport?
[14:43:17] <WormFood> Of course.
[14:43:29] <cehteh> so yes prolly not that much pita for you
[14:43:34] <WormFood> But, I've been to usa once in the last 8 years.
[14:44:30] <WormFood> Be glad you don't have an American passport. It's the most expensive passport in the world.
[14:44:36] <cehteh> a friend of mine is currently in china, dunno where exactly but he mails some funny stories once a time
[14:45:32] <WormFood> There are 2 reasons why an American passport is the most expensive in the world. 1) USA charges the most for a visa, so other countries charge American citizens the same price. I typically pay 2x-4x more than any other nationality.
[14:45:33] <cehteh> traveling around, assembling car production lines, programming robots
[14:45:49] <WormFood> 2) You have to pay taxes on money you make outside of USA, even if you're not living in USA.
[14:46:10] <cehteh> unless you are google, facebook or apple :D
[14:46:15] <WormFood> So, simply being an American citizen, and making money overseas, the government wants me to pay taxes on that.
[14:46:31] <WormFood> They have all kinds of little tricks to save their money.
[14:46:56] <cehteh> yeah .. works on a big scale .. but not for a simple person as us
[14:47:47] <WormFood> One way is to have a shell corporation, that is off shore, and registered in a foreign country. That sells your products to your american company at a very high mark-up. They sell it for a slim profit. You pay taxes on that little bit of profit. Meanwhile, the bulk of the profit is offshore. The USA government need no know about that. Unless you want to pay taxes on it.
[14:48:26] <WormFood> I gotta go do some stuff. It's 4:20 am here.
[14:48:39] <cehteh> have fun
[14:48:48] <WormFood> No fun
[14:49:36] <WormFood> I'm freezing my balls off, and my daughter is still awake. I gotta give her a shower, and put her in bed. And I can't give her a shower, without also getting wet myself. No fun at all.
[14:50:12] <WormFood> Bathtubs are very foreign in China. I can honestly say I can only remember seeing one or two bathtubs in people's homes in China.
[14:51:59] <cehteh> no heating?
[14:55:15] <WormFood> It just got cold. I didn't break out my heater yet. I have one in the bedroom, which I just turned on
[14:55:37] <WormFood> Seriously, a week or two ago, I was wearing shorts and short sleve shirts.
[14:58:08] <WormFood> Also, if I'm not uncomfortably cold, I teld to not use a heater. But now my hands are cold, so time to break out the heater
[17:31:59] <nikomo> https://i.imgur.com/cPcE7y0.jpg got device signature, so I'm guessing it works
[17:40:57] <lorenzo> what's that?
[17:51:40] <twnqx> something that made me try to brush a hair from my laptop screen >_>
[17:56:33] <nikomo> lorenzo: quick board I made so I can just plug a programmer in and go, with an attiny85
[17:56:40] <lorenzo> ahh
[19:55:00] <N1njaneer> How goes the AVR world?
[19:59:38] <LeoNerd> Notbad..
[19:59:50] <LeoNerd> I've just been playing with I²C talking to an RTC chip
[20:00:23] <LeoNerd> Couldn't quite be bothered to write the logic to set the time as well as reading it on the AVR chip, so I currently have the bus dual-mastered with an PC-attached FT232H to set the time :)
[23:10:55] <Deskwizard> *sigh* alright, I'm beaten... damn structs
[23:20:39] <Valen> struct all the things!
[23:20:46] <Valen> with pointers!
[23:25:46] <Deskwizard> :| I had a thought that it might be something with pointers...
[23:25:59] <Deskwizard> but it likely myself not understanding C properly somewhere
[23:26:11] <Deskwizard> VERY likely, I'd say I'm pretty sure that's it even hehe
[23:26:50] <Deskwizard> I'm sure its the stupidest little thing... like my variable not declared correctly
[23:29:24] <Deskwizard> anyone interested in finding out how bad I am at this? lol :P
[23:33:46] <Deskwizard> I had an auto-reset function earlier as well...
[23:34:05] <Deskwizard> was overflowing the ram on button presses lol