#avr | Logs for 2015-06-11

Back
[01:51:33] <rue_bed> I need to do some programming one of these days
[06:22:11] * LeoNerd unpacks shiney new Rigol DS1054Z that just arrived :)
[06:45:41] <Lambda_Aurigae> rue_bed, what are you gonna program now?
[08:21:05] <vcore> hello!
[09:19:28] <twnqx> if my programmer is a "ID 1781:0c9f Multiple Vendors USBtiny"
[09:19:39] <twnqx> is that a -c usbasp for avrdude?
[09:19:50] <twnqx> or -c usbtiny
[09:20:11] <twnqx> probably the latter.
[09:20:57] <LeoNerd> I'd just try both until it works ;)
[09:30:08] <twnqx> i am obviously too stuopid to program an arduino...
[09:36:14] <twnqx> hm
[09:39:39] <twnqx> i wonder is this arduino is dead
[09:40:08] <twnqx> seems like the ISP programmer doesn't recognize the 32u4...
[09:41:02] <twnqx> while it works on a freshly unpacked arduino...
[10:05:17] <twnqx> http://i.imgur.com/FoCn6ks.jpg http://i.imgur.com/KUpBlmZ.jpg attempt failed, i'd say
[10:12:49] <Chillum> ohh shiny lights
[10:12:54] <Chillum> what are you trying to do?
[10:28:06] <twnqx> building an infinity mirror
[10:30:02] <Chillum> ncie
[10:30:09] <Chillum> nice even
[10:31:06] <twnqx> not satisfied with the result :P
[10:31:29] <twnqx> the back mirror produces the double images (the lower intensity reflections between the stronger ones
[10:32:17] <twnqx> the LEDs do not mix the colors good enough
[10:32:25] <twnqx> and the print on the flex PCB is too visible
[10:32:26] <twnqx> :(
[10:35:55] <hypermagic> hi
[10:36:14] <hypermagic> hey
[10:43:00] <ayuu> Is there a standard address to access the data flash through pointers?
[10:43:18] <LeoNerd> No, there's functions for it
[10:43:33] <LeoNerd> Wait what do you mean "data flash" ??
[10:44:42] <ayuu> The flash that stores the program instruction code
[10:45:03] <ayuu> The firmware for the uc
[10:45:14] <LeoNerd> Right; so the flash then
[10:45:15] <ayuu> User firmware
[10:45:25] <twnqx> for reading, look at pgmspace macros
[10:45:35] <LeoNerd> http://www.nongnu.org/avr-libc/user-manual/pgmspace.html
[10:45:43] <twnqx> writing is more complex
[11:06:01] <Jartza> evening
[11:34:58] <Chillum> twnqx: have you tried just using an infinite amount of LEDs?
[14:54:48] <LeoNerd> Hrmmmm
[14:55:28] <LeoNerd> So with my newly-arrived scope, I have done some investigation on my board with the dodgy timing... In summary: ATtiny841, XTAL clock source from 14.7{mumble} MHz crystal.. a UART divisor one
[14:55:58] <LeoNerd> On breadboard copy, all is fine. On the real PCB, there seems to be some noise effect, where one end of the crystal doesn't follow a very smooth shape... it quite often gets upset
[14:56:09] <LeoNerd> I would show a picture but I seem to lack a USB key to store a capture from the scope at present :P
[14:57:28] <LeoNerd> It's the XTAL1 end where the noise is; the XTAL2 end appears to be nicely stable
[14:58:43] <LeoNerd> This timing upset manifests itself in far too high a rate of bit errors on the UART channel; when the chip is outputting a constant stream of the same byte (e.g. 'X'), I get about 1 in 20 characters on the receiver end (my PC) corrupted
[15:00:02] <Chillum> that sounds annoying
[15:00:38] <LeoNerd> Yeah.. dunno why this noise would appear
[15:00:52] <LeoNerd> Does anyone know offhand which of XTAL1 and 2 are the output vs. input end?
[15:01:02] <Chillum> is the path between the mcu and the xtal direct?
[15:01:25] <LeoNerd> Yes, direct short copper track on PCB
[15:01:36] <Chillum> are the serial traces going right next to the xtal?
[15:01:45] <Chillum> or the xtal traces
[15:01:47] <LeoNerd> No.. one mo I'll get a shot of the PCB
[15:02:08] <Chillum> (I am no expert, just going through the stuff i know can be an issue)
[15:02:41] <LeoNerd> http://home.leonerd.org.uk/local/screenie/xtal-pcb.png
[15:02:55] <LeoNerd> I wonder if the fact that one of the crystal traces goes around the other pad upsets it
[15:03:08] <LeoNerd> It's XTAL1, this really short one, where the noise appears
[15:03:23] <LeoNerd> Hmm.. and DS says this is the input to the chip
[15:04:07] <Chillum> it may be reflections on the curves
[15:04:43] <LeoNerd> well, it's occasional noise
[15:04:50] <LeoNerd> It's not the same noise on *every* pulse of the clock
[15:04:52] <LeoNerd> Far less often
[15:05:00] <Chillum> if it is occasional then it may just be a bad crystal
[15:05:14] <Chillum> or EM interference
[15:05:19] <LeoNerd> Huh.. I hadn't considered that. I could try another one
[15:05:21] <LeoNerd> I do have three here
[15:05:32] <LeoNerd> What I don't have is a hotair rework station... >.>
[15:06:01] <Chillum> I have one of those tubes that you push down the thing and push the button and it gives a little suck
[15:06:15] <Chillum> they are near useless but i have managed to clear a hole at least once with it
[15:06:36] <Chillum> oh, smt
[15:06:39] <LeoNerd> Mhm :)
[15:21:40] <Jartza> oh, this was #avr :D
[15:22:26] <LeoNerd> Mmm?
[15:22:43] <Jartza> first I looked that this was one of the finnish channels I'm on... if someone says "ssmt" in finnish, it means "sitä saa mitä tilaa" == "you get what you deserve" more or less
[15:22:50] <Jartza> :)
[15:22:58] <LeoNerd> Ah :)
[15:23:46] <Jartza> and some people even shorten it to "smt" ... "saat mitä tilaat"
[15:49:19] <Lambda_Aurigae> LeoNerd, your caps on your crystal,,,are they they right value for that crystal?
[15:49:26] <LeoNerd> 13pF
[15:49:49] <Lambda_Aurigae> I use 22pf regularly on mine, but that's just me and what I have handy.
[15:50:04] <LeoNerd> Well this is just what the crystal told me to use
[15:50:20] <LeoNerd> Or maybe 18. I forget. But either way, pretty sure I put on whatever they said
[15:50:21] <Lambda_Aurigae> ok.
[15:50:38] <Lambda_Aurigae> sounds like maybe a bad cap,,or bad soldering then
[15:50:49] <LeoNerd> Hmm.. That's a thought
[15:50:54] <LeoNerd> I could try giving it a bit of rework
[15:51:01] <LeoNerd> Ohyes I was going to consdier a hotair station
[15:51:03] <Lambda_Aurigae> try 22pf caps even.
[15:51:44] <Lambda_Aurigae> I find that going a bit larger is not a problem generally. At most I have to up the startup delay in fuse settings.
[15:51:54] <LeoNerd> Iseee
[15:52:29] <Lambda_Aurigae> just means the oscillator starts a little slower and (I believe) the signal from the crystal isn't as strong...could be wrong about the last half there.
[15:52:50] <LeoNerd> Ah I see.. I had imagined the caps were somewhat critical to the timing behaviour
[15:53:09] <LeoNerd> What's anyone think of this? http://www.amazon.co.uk/Soldering-Station-Stations-Anti-static-Tweezers/dp/B00Y0HYDE8/ref=sr_1_4?ie=UTF8&qid=1434054543&sr=8-4&keywords=hot+air+station It looks quite cheap, but useable?
[15:53:14] <Lambda_Aurigae> nope..just to the startup of the oscillator really.
[15:53:28] <Lambda_Aurigae> if they are too small then the oscillator might have trouble starting.
[15:53:37] <LeoNerd> Ah OK
[15:53:45] <Lambda_Aurigae> on a solderless breadboard, there is enough stray capacitance there to work without additional caps.
[15:53:51] <Lambda_Aurigae> I do that all the time actually.
[15:54:00] <LeoNerd> Ah that might also explain why it works on BB
[15:54:17] <Lambda_Aurigae> all those little metal plates inside are just nifty capacitors.
[15:56:55] * LeoNerd watches https://www.youtube.com/watch?v=vva2t21sOAs
[15:57:00] <Xark> Lambda_Aurigae: Usually works, but sometimes needs a "kick" to get started. :)
[15:57:09] <Lambda_Aurigae> yup.
[15:57:21] <Lambda_Aurigae> reach out and touch the crystal...
[15:58:53] <Lambda_Aurigae> also, it seems the cheaper the breadboard the better it works that way.
[16:06:09] <Xark> Lambda_Aurigae: Yeah. I have wondered if one of the "fancy" 3M breadboards would actually be worth having (~$50 - but supposedly great quality/reliability vs generic cheapie ones). Like http://www.digikey.com/product-search/en?mpart=922309
[16:06:53] <Xark> I guess I might need to stock up on small xtal pf caps if I get one. :)
[16:20:49] <Lambda_Aurigae> I bet they have just as much stray capacitance.
[16:21:02] <Lambda_Aurigae> what they will have though is good coated contacts...silver or gold.
[16:25:08] <Lambda_Aurigae> interesting that the datasheet doesn't say anything about the contact points really.
[16:25:20] <Lambda_Aurigae> you are probably paying for the name.
[16:25:58] <Lambda_Aurigae> http://www.digikey.com/product-detail/en/MK-9000/MK-9000CA-ND/151997
[16:26:02] <Lambda_Aurigae> now that looks neato.
[16:49:41] <sebus> maaan... why max3232 are so sensitive? :<
[16:51:43] <sebus> they pick up noise, they can be killed easily by just not having solid ground between devices from ttl side
[16:52:23] <sebus> and max202... are ok, but also needs a bit more current from psu :<
[17:08:04] <Lambda_Aurigae> I like the max233 myself.
[17:08:28] <Lambda_Aurigae> mostly because ti sent me a pile of them some years back...4 each in every package the chip came in.
[17:27:08] <Tom_itx> do you tie the unused inputs to GND or leave them floating?
[17:27:42] <Tom_itx> the 2nd rxtx pair
[18:28:35] <Lambda_Aurigae> Tom_itx, I always tie unused inputs to GND or VCC, depending on what they are doing..
[19:09:10] <Valen> never float an input unless the datasheet says to do so
[19:46:29] * Xark links some interesting tidbits about this https://electronics.stackexchange.com/questions/50539/unused-mcu-pins-better-to-tie-to-gnd-or-use-software-to-prevent-floating