#avr | Logs for 2016-03-07

Back
[01:03:59] <Jartza> morning
[01:04:43] <Casper> morning? already?? really??? WHA... oh it's only 1:38am... phew.... Jartza ! don't scare me like that again! :D
[01:46:16] <Jartza> Casper: :)
[01:47:23] <Casper> http://www.amazon.ca/CanaKit-Raspberry-Complete-Starter-Kit/dp/B01CCF6V3A/ref=pd_cp_147_1?ie=UTF8&refRID=0518GS7ADBG6JBK2904C
[01:47:25] <Casper> tempted...
[01:47:35] <Casper> but it don't have an ir receiver... so... no good...
[01:48:54] <Casper> might just go orange pi plus ...
[02:04:19] <Jartza> I just got my rpi3
[02:04:27] <Jartza> no idea what I'm going to do with it, yet
[02:04:47] <Casper> oh
[02:05:00] <Casper> what about a media player?
[02:07:28] <Jartza> well, I see no point in that
[02:07:41] <Jartza> I have smart tv and chromecast, those play all the media I need
[02:07:49] <Jartza> and my Oppo plays dvd and bd
[02:08:35] <Jartza> I also have rpi1 and rpi2 unused :)
[06:29:00] <julius> hi
[06:29:25] <julius> http://paste.pound-python.org/show/4T8epjBpzJiFLA9HffJE/ <- these 19 lines should run on a atmega168 and blink a led, right?
[06:30:05] <julius> my circuit was working before the weekend (counting a frequency on T0) but now i cant even make it turn on a LED
[06:30:35] <liwakura> the code seems correct
[06:31:57] <julius> yeah, thats what i figured. crap
[07:31:58] <cehteh> fuses and F_CPU!
[07:33:00] <cehteh> or maybe you hosed the mega
[08:20:56] <julius> i dont kill megas
[08:21:03] <julius> im not a monster
[08:21:30] <julius> started working again, at least the LED code. now back to the frequency measurement
[12:35:04] <malcontent> is there an easy way to tell if a variable has been assigned to a register vs. the stack when programming an attiny85 with the arduinio ide?
[12:40:37] <WormFood> malcontent, there is a set of rules, you should be able to use to determine that.
[12:42:20] <malcontent> I'm supposing the arduino ide manual is the one I should read then? Atmel suggests a 'hint' to the compiler in C, but that doesn't seem definitive
[12:42:38] <WormFood> There are hints that you can give the compiler.
[12:42:54] <WormFood> And, of course, it depends on the compiler, as to the details of how everything works together.
[12:43:06] <malcontent> yes, is there a way to determine if the compiler 'took the hint'?
[12:43:30] <WormFood> look at the asm code it creates.
[12:43:40] <malcontent> OK
[12:54:52] <limpkin> quick question... is it faster or slower to right shift instead of dividing on AVRs?
[12:57:01] <lorenzo> limpkin: I think shift is faster since it's a single instruction
[12:57:14] <WormFood> of course it's mutch faster
[12:57:27] <WormFood> same with multiply.
[12:57:34] <lorenzo> LSL / LSR iirc
[12:57:44] <WormFood> right.
[12:57:45] <limpkin> LSL and LSR are single instructions though
[12:57:55] <limpkin> so if you right shift 3 times, 3 instruction calls
[12:58:06] <WormFood> single cycle instructions, I think you mean. Right?
[12:58:10] <limpkin> (single shift i mean)
[12:58:59] <WormFood> I don't think the AVR has a divide opcode.
[12:59:04] <WormFood> Most CPUs don't.
[12:59:21] <lorenzo> yeah, no hw div
[12:59:21] <limpkin> hmmm
[12:59:22] <WormFood> Actually, the CPU I learned asm on, the 6809, was one of the first CPUs to include a multiply command.
[12:59:29] <limpkin> right
[12:59:31] <limpkin> that makes sense then
[12:59:39] <limpkin> thanks :)
[13:00:15] <WormFood> I believe some CPUs have a divide opcode, but if they do, it's not many. Division is more hairy than multiplication.
[13:01:56] <WormFood> ASL effectively multiplies by 2, and ASR divides by 2
[13:02:35] <lorenzo> http://www.atmel.com/Images/doc0936.pdf
[13:02:58] <WormFood> lorenzo, what's that?
[13:03:49] <lorenzo> it's an application note for multiply and divide on avr
[13:06:07] <WormFood> https://en.wikipedia.org/wiki/MIPS_instruction_set <-- has some interesting notes on the MIPS hardware multiple and divide command (which appears to have been removed, so they could more easily increase the clock speed).
[13:06:58] <WormFood> "One major barrier to pipelining was that some instructions, like division, take longer to complete and the CPU therefore has to wait before passing the next instruction into the pipeline."
[13:09:15] <WormFood> "Do not use a multiply or a divide instruction within two instructions of mfhi (that action is undefined because of the MIPS pipeline)."
[13:10:54] <WormFood> Some interesting issues to deal with in hardware, when doing multiply and divide.
[15:11:13] <julius> hi
[15:12:54] <julius> for fuse settings i wrote down "full swing crystal" (for the things with 2 pins i use here), using this fuse calculator:http://www.engbedded.com/fusecalc/ for the atmega32 theres no such option. what else can i choose? this is my crystal: http://shelfkey.com/prodimg/48747050.jpg
[15:25:00] <megal0maniac> julius: CKSEL=1111 SUT=11
[15:25:39] <megal0maniac> (Ext. Crystal, high freq, start up time 16K CK + 64ms
[15:25:59] <megal0maniac> What is the speed of the crystal just by the way?
[15:49:16] <julius> 12mhz
[15:49:51] <julius> so why is it full swing crystal for the atmega168 and crystal high freq for the 32?
[16:41:50] <julius> hm, great. got a sensor which outputs a frequency....worked before, but now it only outputs data if i touch the wire
[16:42:31] <julius> otherwise T0 does not count any pulses and outputs 0
[16:56:53] <julius> sounds like a connection might be broken, but since i do not touch + or ground but just the sensor output...i dont really see a relationship
[17:46:15] <Lambda_Aurigae> static
[17:46:22] <Lambda_Aurigae> the sensor use any fets?
[17:46:35] <Lambda_Aurigae> they are static sensitive...your body acts as a big static charge/capacitor.
[17:48:31] <julius> let me check
[17:49:50] <julius> transistor and some schmitt triggers: https://www.mikrocontroller.net/attachment/71741/bodenfeuchte.png
[17:49:54] <julius> as far as i can tell
[17:51:23] <Lambda_Aurigae> 74hc is cmos meaning fet meaning static sensitive
[17:51:43] <julius> oh, let me look up fet again
[17:52:07] <Lambda_Aurigae> field effect transistor
[17:52:37] <LeoNerd> FETs usually have sufficiently low gate leakage that static charge from just touching it can hold it in a given state for minutes, if not hours
[17:53:20] <julius> aha, so by attaching the sensor to another circuit for testing i could have loaded the fet and now its just giving out weird data?
[17:55:39] <Lambda_Aurigae> 74hcXX chips are usually protected against that static charge hold like that, but, 74hc chips can behave strangely sometimes.
[17:55:54] <LeoNerd> They have clamp diodes
[17:55:59] <Lambda_Aurigae> yup.
[17:56:30] <Lambda_Aurigae> but they tend to have fits on solderless breadboards, specially if you don't pull all inputs high or low.
[17:56:56] <LeoNerd> Mm.. gotta love ~10pF of stray capacitance
[17:57:15] <Lambda_Aurigae> hehe.
[17:57:28] <Lambda_Aurigae> it's enough that I usually don't need start caps on crystals.
[17:57:33] <LeoNerd> (I still don't understand why they sell disc capacitors down to the 1pF range)
[17:57:34] <julius> cant translate "fits" to german...what does that mean?
[17:57:44] <Lambda_Aurigae> fit/problem
[17:57:46] <LeoNerd> "have fits" = "get upset"
[17:57:48] <julius> ah
[17:58:28] <Lambda_Aurigae> sorry, didn't realize I was dealing with a non-english speaker. I will try to keep it less flippant.
[17:59:09] <julius> do i see that right that the sensor only uses 3 schmitt triggers of the 6 available in the chip?
[17:59:29] <Lambda_Aurigae> yes..what kind of sensor is it?
[17:59:36] <julius> no, i like to get slang and quirks
[17:59:42] <julius> moist
[17:59:44] <Lambda_Aurigae> it looks like static touch sensor.
[17:59:53] <julius> gives out a value between 0 and ~360.000
[18:00:30] <Lambda_Aurigae> I don't see how that can be a sensor other than touch sensor. no way it can give out numbers depending on moisture.
[18:00:51] <julius> it converts a capacitance to a frequency
[18:01:07] <julius> so by being inside the earth of a plant or water it can measure its moist level
[18:01:15] <julius> its rather a rude estimate
[18:01:33] <Lambda_Aurigae> ok....
[18:01:44] <Lambda_Aurigae> rather crude oscillator circuit I guess.
[18:01:51] <julius> but it has to be in contact with the water...cant just hold it next to a glass of water
[18:01:58] <julius> is rude, but its also very cheap
[18:02:07] <julius> crude
[18:03:00] <Lambda_Aurigae> hmmm..might be a resistance measurement then.
[18:03:17] <Lambda_Aurigae> resistance controlled oscillator.
[18:03:21] <julius> theres a project page for it, but its in german
[18:03:38] <julius> let me check
[18:03:46] <Lambda_Aurigae> I bet it is...
[18:04:06] <Lambda_Aurigae> the first one, ic1a will cycle automatically...self fed oscillator through r2
[18:05:14] <julius> he doesnt really go into detail, just that a capacitance is converted as a freqeuncy
[18:05:20] <Lambda_Aurigae> the second one will oscillate in a similar manner, effectively cutting the frequency down and the resistance between jp4 and jp3 will vary how fast the feedback charges the input of ic1a
[18:05:30] <Lambda_Aurigae> I bet it's resistance, not capacitance.
[18:05:42] <Lambda_Aurigae> but, stray capacitance will affect it as well.
[18:05:48] <Lambda_Aurigae> well,,stray electric charge.
[18:05:50] <julius> as long as it works i take it
[18:06:06] <cehteh> eventually i should finish my humidty sensors :D
[18:06:15] <cehteh> using a tiny13
[18:06:45] <Lambda_Aurigae> that schmidt trigger will charge slowly and trigger..the higher the resistance the longer it takes to charge and the lower the frequency that circuit will put out.
[18:06:55] <julius> any idea on how to reduce stray capacitance in this circuit?
[18:07:27] <Lambda_Aurigae> keep traces very short, lots of GND traces between things maybe.
[18:07:55] <julius> http://www.dietmar-weisser.de/images/stories/Analogtechnik/BodenFeuchte/Feuchte_BRD.png
[18:08:06] <julius> i bought two of those
[18:08:25] <julius> not the biggest picture though
[18:08:38] <Lambda_Aurigae> should be ok.
[18:08:56] <Lambda_Aurigae> I don't see any ground plane though but shouldn't be too big of a problem.
[18:09:37] <julius> it worked quite well for some days now, just today when i experimented with different circuits it failed me
[18:10:12] <Lambda_Aurigae> that circuit is called a relaxation oscillator by the way.
[18:10:13] <cehteh> check the ground connection from your avr to the sensor
[18:11:05] <cehteh> and try to isolate the plant pot where you test it (or whatever) vs sticking a nail with a ground wire into the soil
[18:11:13] <cehteh> i guess somewhere there is a problem
[18:12:37] <julius> the plant is standing in a ceramic pod, should be isolated well
[18:13:16] <cehteh> stick you finger in the soil .. any changes?
[18:13:21] <julius> as was just discussed here, theres a chance i introduced a capacitance into the circuit by touching it
[18:13:27] <julius> let me check
[18:14:45] <julius> no, i get a constant zero
[18:15:10] <cehteh> ok i dont like that sensor :D
[18:15:22] <Lambda_Aurigae> time for an oscilloscope.
[18:15:22] <julius> give me a better one
[18:15:31] <cehteh> the electrodes are isolated?
[18:15:38] <julius> yes, i dont own one yet
[18:15:52] <cehteh> i planned to do a better one, yes
[18:15:57] <cehteh> with digital output
[18:16:02] <cehteh> but not yet
[18:16:22] <julius> cant i just disconnect + and use a grounded wire to touch all contacts to discarge any lingering crap?
[18:16:49] <cehteh> this days i building quadcopter frames ... after that i hope i find some free time to work on my mµOS
[18:16:56] <Lambda_Aurigae> that chip self-discharges.
[18:17:04] <Lambda_Aurigae> so lingering capacitance in it will not be a problem.
[18:17:07] <cehteh> later then i may work on the humidty sensors
[18:17:41] <julius> hm ok, so its not like a single mosfet which will just jump into action after being left alone a day?
[18:17:56] <julius> if it isnt grounded on the gate
[18:19:52] <cehteh> why is R2 only 100k
[18:20:27] <cehteh> well i think it ougt to be working this way ..
[18:21:24] <cehteh> you may try a high resistance between the electrodes .. 1MOhm or more
[18:21:49] <Lambda_Aurigae> lower the resistance the higher the frequency.
[18:21:52] <cehteh> but that should also reduce the sensitivity and detune the signal
[18:21:57] <cehteh> yes
[18:22:29] <Lambda_Aurigae> have used cmos inverters to generate RF in the past.
[18:22:38] <Lambda_Aurigae> AM radio with nothing but a bunch of inverters.
[18:22:43] <cehteh> ahah
[18:22:49] <Lambda_Aurigae> AM radio transmitter that is.
[18:23:04] <cehteh> when i was a child in the 70's i made a FM radio jammer :D
[18:23:13] <cehteh> that gave some trouble
[18:23:56] <Lambda_Aurigae> I bet
[18:24:21] <Lambda_Aurigae> a guy a few blocks from us had a small klystron from an old radio station transmitter
[18:24:32] <Lambda_Aurigae> he built a transmitter from it, liquid cooling system and all.
[18:25:00] <Lambda_Aurigae> the lady next door to him kept calling the police and priest complaining that there were voices coming out of her bathtub.
[18:25:27] <Lambda_Aurigae> he fucked with tv and radio reception for many blocks around.
[18:25:33] <cehteh> lol
[18:25:34] <julius> were there no drugs available in your youth? ;)
[18:25:55] <Lambda_Aurigae> I remember the FCC van driving around the area with the parabolic antennas on top.
[18:26:06] <Lambda_Aurigae> julius, never did drugs beyond some alcohol as a teenager and adult.
[18:26:12] <Lambda_Aurigae> at least, not illegal ones.
[18:26:35] <Lambda_Aurigae> I've taken a couple of things legally that caused hallucinations...I will never take either again willingly.
[18:27:02] <cehteh> playing quake on shrooms rocks :D
[18:27:10] <cehteh> VR Quake
[18:27:36] <cehteh> everything in 3D and bright colors w/o any expensive equipment, years ago
[18:27:39] <julius> yeah the ;) was meant to make it sound like a joke
[18:27:40] <Lambda_Aurigae> I've had payote...that was bad enough....legally prescribed by a tribal medicine man.
[18:27:56] <cehteh> you are in the US?
[18:28:05] <Lambda_Aurigae> then I took imitrex as an adult...that shit is worse!
[18:28:11] <Lambda_Aurigae> yeah, Iowa, USA
[18:30:17] <Lambda_Aurigae> the payote was part of a tribal initiation/adulthood ceremony.
[18:30:35] <Lambda_Aurigae> my imagination is waaaaay too vivid for hallucinagens.
[18:31:06] <cehteh> lol
[18:31:22] <julius> the wiki page reads like biological LSD ;)
[18:31:26] <cehteh> yes you shouldnt take them lighty
[18:31:38] <Lambda_Aurigae> julius, which is that? for shrooms?
[18:31:43] <julius> payote
[18:31:48] <Lambda_Aurigae> oh, yeah.
[18:31:53] <cehteh> even when shrooms and cactus are bilogoc they are quite potent and hard to dosage
[18:31:53] <Lambda_Aurigae> pretty close actually.
[18:32:22] <Lambda_Aurigae> had I not had some "guidance" from the medicine men I might not have come out of that with any of my sanity intact.
[18:32:36] <julius> i was in the hospital once for a operation, the things they give you after the operation for the pain....can make you smile :)
[18:32:49] <Lambda_Aurigae> I was prepared for it mentally before and guided during...it was fucking scary actually.
[18:32:55] <cehteh> but still i think its bad that this things are illegal while alcohole and nicotine gets support
[18:33:02] <cehteh> (while i dont take drugs)
[18:34:02] <Lambda_Aurigae> hell, if you were to try to get caffeine past the FDA these days they would shoot it down.
[18:34:30] <cehteh> or raspberries :)
[18:35:13] <cehteh> §what what . .you saied there are zillion of intrigents you cant even analze yet?"
[18:35:54] <Jartza> oops
[18:35:58] <Jartza> I accidentally a 3D printer
[18:35:59] <Jartza> is this bad?
[18:36:10] <Lambda_Aurigae> yes
[18:36:13] <Lambda_Aurigae> send it this way
[18:36:19] <Lambda_Aurigae> I will put it out of its misery.
[18:36:23] <Jartza> it'll arrive in a week
[18:36:30] <Jartza> but it'll be in million pieces
[18:36:34] <Jartza> because it's a diy-kit :D
[18:36:53] <cehteh> have fun
[18:37:07] <cehteh> and duh .. i want a CNC mill
[18:37:11] <Lambda_Aurigae> hehe.
[18:37:14] <Lambda_Aurigae> making one.
[18:37:15] <cehteh> https://twitter.com/CehtehCt
[18:37:21] <Lambda_Aurigae> out of old printers
[18:37:26] <cehteh> lots manual work for copters without
[18:37:48] <Jartza> cehteh: yeah... let's see after 7 months what it'll look like
[18:37:56] <Jartza> when I finally get it assembled (wrong)
[18:37:57] <Jartza> :D
[18:38:29] <cehteh> maybe it can do milling then .. and world domination
[18:38:31] <Lambda_Aurigae> all I see is a blank page there cehteh
[18:38:34] <julius> Jartza, any idea what to print first?
[18:38:44] <cehteh> blank page?
[18:38:46] <Lambda_Aurigae> maybe becuse I have twitter.com redirecting to a blank page.
[18:38:52] <cehteh> hah
[18:38:56] <cehteh> is it really that bad?
[18:39:07] <Lambda_Aurigae> twitter?
[18:39:09] <Lambda_Aurigae> yeah.
[18:39:15] <cehteh> i only using it as photo upload thingy
[18:39:19] <Jartza> julius: I guess I'll print the standard "calibration cube"
[18:39:22] <Lambda_Aurigae> twitter, facebook, linkedin, all go to a blank page here.
[18:39:29] <Jartza> most probably about 30 times
[18:39:32] <cehteh> no other social networking thing
[18:39:34] <Jartza> to get settings correct
[18:39:56] <cehteh> yeah facebook is blocked here too and the other stuff as well
[18:40:13] <cehteh> i always thought twitter is the least evil of this services
[18:40:33] <Lambda_Aurigae> http://www.buyprinters.com/p46-okidata-microline-320-turbo I have 9 of these that are going to be scavenged for their rails and positioning systems to make a woodworking CNC
[18:40:38] <cehteh> while i am not intending to bekome much of a tweeter and blogger there
[18:40:39] <Jartza> after calibcation cube I probably print filament roll holder
[18:40:43] <Jartza> :D
[18:40:59] <Jartza> and some more parts that are "essential add-ons" for repraps
[18:41:23] <Lambda_Aurigae> think I might buy an odroid-C2 this week.
[18:41:40] <Lambda_Aurigae> is either that or an fpga dev board.
[18:41:46] <Lambda_Aurigae> haven't decided which.
[18:42:21] <Jartza> odroid is pretty nice too
[18:42:25] <Jartza> I got my rpi3 today
[18:42:42] <Lambda_Aurigae> odroid-C2 blows away the rPI3 for processing power and memory.
[18:42:49] <Jartza> no idea what I'll use it anyway
[18:43:03] <Jartza> yes it does, but I got this without asking and for free
[18:43:04] <Lambda_Aurigae> no built in wifi but I have a usb wifi adapter already for my rPI-B+
[18:43:07] <Jartza> so still not complaining
[18:43:08] <Lambda_Aurigae> aahh.
[18:43:15] <Lambda_Aurigae> I'm selling my rPI-B+
[18:44:33] <Lambda_Aurigae> http://ameridroid.com/products/7-inch-hdmi-display-with-multitouch
[18:44:37] <Lambda_Aurigae> so I can buy this.
[18:47:37] <Jartza> oh, nice
[18:47:49] <Lambda_Aurigae> the odroid-c2 will mount on the back of the display.
[19:02:11] <julius> anybody tried the orange pi with linux yet?
[19:03:50] <Casper> dairy queen sell a drink, the orange julius...
[19:04:19] <Casper> julius: do you have one?
[19:04:23] <Casper> the opi...
[19:05:51] <Lambda_Aurigae> julius, haven't got an orange pi. just a raspberry one
[19:11:53] <julius> got a rpi2 planned as a car pc with openelec
[19:13:05] <Jartza> I have attiny84 with 3 * attiny85 in my car ;)
[19:13:41] <julius> what kind of display do you use?
[19:13:43] <Jartza> the latter acts as VGA controller for 5" display, the former reads stuff from ALDL diagnostics and acts as "driving computer"
[19:13:48] <Jartza> 5" VGA monitor
[19:14:34] <Jartza> once I get my 3D printer working I'll print nicer mounting parts to it and then you'll see pics :)
[19:14:49] <Jartza> julius: 3*t85 is of course OctaPentaVeega
[19:14:59] <Jartza> julius: https://github.com/Jartza/octapentaveega
[19:15:36] <julius> ah yes, youre the guy with "the" display
[19:15:39] <julius> sorry, i forgot
[19:15:52] <Jartza> heh
[19:16:03] <Jartza> well. it fits my -94 Astra perfectly :D
[19:18:48] <julius> got pictures?
[19:19:02] <Casper> one day I'll replace my radio with an homebuild solution, but for now the radio do it's job...
[19:19:21] <Jartza> julius: pictures of the car?
[19:19:24] <Jartza> not yet
[19:23:41] <Jartza> julius: https://drive.google.com/file/d/0B2dTzW9TMeBxYm50T25yZ1hIajA/view?usp=docslist_api
[19:24:01] <Jartza> that's the 5" display with octapentaveega, though
[19:25:24] <Jartza> I haven't really mounted it into my car, but I've tested the setup in car
[19:25:40] <Jartza> just a lot of wire and the display hanging from rear view mirror :D
[19:25:54] <Jartza> so, no pics from that setup yet... I need 3D printer to make new mounting case for that display
[19:30:09] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxV1pWUWxrQ3IxYVU/view
[19:30:16] <Jartza> close-up-pic from that 5" monitor
[19:50:23] <Jartza> well. time for some sleep. night all!
[20:31:00] <julius> whats that like 9 inch?
[20:31:24] <julius> thats 5"
[20:31:27] <julius> looks bigger
[20:32:19] <julius> Lambda_Aurigae, you can also get a 7" from saint smart, its touch. dont know about multi
[20:32:25] <julius> for 35€
[20:36:32] <julius> this nice step down converter: http://www.aliexpress.com/item-img/1PCS-Supply-Module-replace-LM2596s-Mini-3A-DC-DC-Converter-Adjustable-Step-down-Power-C1/32408413526.html got no markings for the input voltage, does that mean it got diodes in place that prevent +/- being connected the wrong way?
[20:37:48] <cehteh> not really
[20:39:05] <cehteh> you see on the backside (pics) that - is common on both sides
[20:40:20] <cehteh> the best you can get from wrong polarity is that it just shuts down and nothing is on the positiv output, but more likely you'll see magic smoke
[20:41:18] <cehteh> also you can google for lm2956
[20:41:35] <cehteh> 2596
[20:42:27] <julius> how is - common on both sides?
[20:42:38] <julius> its only labeled on one end
[20:43:08] <cehteh> the traces
[20:43:52] <cehteh> and looking at the datasheet of that regulator .. then see that pcb ..
[20:44:04] <cehteh> i dont believe that the caps are within specs
[20:44:50] <cehteh> means its likely quite inefficent ..
[20:45:06] <cehteh> and lots of noise/ripple
[20:45:53] <julius> also it wont survive 3a with no cooler
[20:47:36] <julius> is it true that the only thing preventing ground to connect with + are the white rectangles?
[20:48:48] <julius> im gonna get some sleep
[20:48:52] <julius> gn8 :)
[20:51:08] <cehteh> white rectangles?
[20:51:32] <cehteh> look at the traces on the backside .. tomorrow :D .. n8