#avr | Logs for 2015-05-12

Back
[01:12:02] <malinus> Casper: what stops the idiot from changing his mac?
[01:15:36] <Casper> his limited knowledge, after all, he's an idiot
[07:10:28] <hypermagic> FL4SHK, http://www.planetpdf.com/codecuts/pdfs/ooc.pdf :)
[07:10:40] <hypermagic> Object Oriented Programming with ANSI C
[07:11:16] <hypermagic> http://www.freebookcentre.net/Language/Free-C-Books-Download.html
[07:20:53] <LeoNerd> Am I right in thinking that a flow of code controlled by conditional skip instruction skipping over a 1-cycle instruction is going to take constant time..?
[07:21:10] <LeoNerd> That effectiely, the skip just controls whether or not it actually commits the result of that instruction; but either way the timing is the same..?
[07:44:59] <skroon> hi
[08:59:39] <FL4SHK> hypermagic: I've got an idea of how to do that already
[09:00:04] <FL4SHK> I mean it's basically just using structs and global functions
[09:00:13] <FL4SHK> I just don't like the syntax for that stuff as much as I like C++'s syntax
[09:00:32] <FL4SHK> What I do in C++ is MOSTLY just better syntax for that though
[09:00:36] <FL4SHK> I don't really use inheritance
[09:00:46] <FL4SHK> (which DOES Mean I don't use virtual functions)
[09:01:05] <FL4SHK> I REALLY like operator overloading for things like mathematical vectors, matrices, etc.
[09:01:21] <FL4SHK> I don't like the use of the bitshift operators for cout/cin though
[09:02:18] <FL4SHK> I like some_struct.some_function () better than some_global_function ( &some_struct )
[09:02:27] <hypermagic> FL4SHK, yes, i don't really like c syntax either, it is too... c, do you like m4 ?
[09:02:48] <FL4SHK> I haven't gotten that far into it yet but I liked what I did do with it
[09:02:58] <LeoNerd> Part of the point of the "bitshift operators" for output/input is that then the compiler knows the types of things
[09:03:12] <LeoNerd> Whereas printf/scanf are effectively a runtime-interpreted dynamic mini-language embedded within C
[09:03:16] <FL4SHK> That's true
[09:03:29] <FL4SHK> I like that the compiler knows the types that you're dealing with
[09:03:29] <LeoNerd> Those actually make more sense on an embedded platform, than most of the rest of C++isms
[09:03:48] <hypermagic> so how d you handle your fixedpoint numbers in an avr?
[09:04:04] <FL4SHK> fixed poitn number can be handled with a wrapper class actually
[09:04:07] <FL4SHK> Due to operator overloading
[09:04:11] <hypermagic> i mean with C
[09:04:13] <hypermagic> :)
[09:04:29] <hypermagic> c++ is simpler obviously
[09:04:30] <FL4SHK> I'd do it with #defines I guess
[09:04:40] <FL4SHK> Fixed point numbers are easier to deal with in C++ IMO
[09:05:01] <FL4SHK> The one thing that C absolutely doesn't have that I would REALLY not like to be without is operator overloading
[09:05:29] <hypermagic> less typing? ;)
[09:07:43] <FL4SHK> Well, kind of
[09:07:58] <FL4SHK> Or rather
[09:08:09] <FL4SHK> There's a lot of typing setting up the wrapper class(es)
[09:08:15] <FL4SHK> But after that it's pretty great IMO
[09:08:43] <FL4SHK> I mostly have been using fixed-point numbers in my Gameboy Advance code, actually
[09:10:52] <FL4SHK> What do you use fixed-point numbers for outside of a video game physics context?
[09:10:58] <FL4SHK> I've only used them for that
[09:16:48] <hypermagic> FL4SHK, well i'd like to control linear axes using mms not steps
[09:17:27] <hypermagic> for example that would be nice with a fixedpoint variable
[09:17:57] <LeoNerd> I would also do that entirely integer-based
[09:18:05] <LeoNerd> Especially since all you're doing is a multiplication
[09:18:13] <hypermagic> i can not.
[09:18:45] <LeoNerd> Work to something like .01 of an mm, if that's enough display resolution, and track the motion using the standard IDDA technique
[09:20:24] <hypermagic> i want my axes in mm :)
[09:20:24] <hypermagic> independent of how many "steps" a motor has
[09:20:24] <hypermagic> you are aware of microstepping, right?
[09:21:04] <LeoNerd> ... yes?
[09:21:28] <LeoNerd> There's no reason you can't *display* units in mm, and work internally to 0.01mm
[09:21:34] <LeoNerd> You just move the decimal point when you shift
[09:21:36] <LeoNerd> Print
[09:27:12] <FL4SHK> mms not steps?
[10:37:21] <hypermagic> FL4SHK, yes
[10:37:40] <hypermagic> it would be straight forward i think to control motion, not stepping
[11:04:09] <FL4SHK> hypermagic: I mean I don't know what it is
[11:04:56] <hypermagic> millimeter :)
[11:05:11] <hypermagic> so, move 0.0106 mm
[11:05:33] <FL4SHK> Er
[11:05:37] <FL4SHK> ...millimeters?
[11:05:44] <FL4SHK> I'll have to reread what you said
[11:06:00] <FL4SHK> Oh I see
[11:06:01] <FL4SHK> Yeah I get it now
[11:06:15] <hypermagic> and i can define my things in SI instead of stepping like in a dance club
[11:06:23] <FL4SHK> You use some kind of DAC then?
[11:06:44] <hypermagic> PWM is much better than steps
[11:07:03] <FL4SHK> Uh, well, isn't PWM integer based
[11:07:05] <FL4SHK> ?
[11:07:07] <hypermagic> and the thing will be much more silent too
[11:07:18] <hypermagic> not necessarily
[11:07:27] <FL4SHK> I don't know what you're doing for PWM then
[11:07:38] <FL4SHK> With an Arduino, it's a byte IIRC
[11:07:48] <FL4SHK> Perhaps that's just the IDE
[11:07:56] <FL4SHK> I don't use the IDE Normally for anything other than uploading code
[11:07:58] <hypermagic> well you can drive a "stepper motor" with nice sinewave steps
[11:08:09] <hypermagic> so it will not vibrate and generate noise
[11:08:23] <hypermagic> this is the secret
[11:10:28] <hypermagic> http://en.wikipedia.org/wiki/Data_strobe_encoding
[11:10:29] <hypermagic> ;)
[11:10:32] <FL4SHK> Okay
[11:10:37] <hypermagic> did you know IEEE 1394b was reclassified for Military Aircraft use this is why usb is here for you now?
[11:10:55] <hypermagic> firewire was too good for your pc :)
[11:10:59] <FL4SHK> I don't know what IEEE 1394b is
[11:11:07] <hypermagic> that is firewire...
[11:11:12] <FL4SHK> I don't know what firewire is
[11:11:23] <hypermagic> a better than usb hardare and software data transmission layer
[11:11:26] <FL4SHK> Oh dang
[11:11:30] <hypermagic> it is similar.
[11:11:37] <FL4SHK> Why didn't they let us use that
[11:11:45] <hypermagic> well you can
[11:11:50] <hypermagic> i have a firewire card too
[11:11:54] <FL4SHK> Oh
[11:12:04] <hypermagic> it is just rare and not really used
[11:12:14] <FL4SHK> Well, USB is generally a very hard to make things work with
[11:12:16] <hypermagic> but video cameras still use it for video streaming :)
[11:12:25] <FL4SHK> I don't understand why they did that
[11:12:31] <FL4SHK> They made it a clusterfart to make new stuff for
[11:16:06] <twnqx> cmos inputs can be directly connected to gnd, right?
[11:16:34] <LeoNerd> Sure; CMOS gate inputs are typically super-high impedence (100M+) so that's fine
[11:25:06] <hypermagic> FL4SHK, because the usb consortium decided you want to have a shitcrap usb bus that they can constantly upgrade and make incompatible over time, so you must throw out all your devices and constantly keep up with the latest junk to feed the economy with money
[11:25:25] <LeoNerd> USB is.... amusing in places :)
[11:26:29] <hypermagic> so they keep their space-wire for the space shuttle and military toys :)
[11:28:45] <hypermagic> also it is great feature of the usb that they could limit your cable length to about 5-7 m, so you can't use it with 1000m cable for anything like datacom, or cameras... whatever
[11:35:16] <FL4SHK> That's just wrong
[11:35:31] <FL4SHK> I'm generally pro-capitalism, but not at the expense of morality
[11:35:50] <hypermagic> the consortium decided it, it is probably the wish of the majority of humans
[11:35:57] <FL4SHK> Why?
[11:36:05] <FL4SHK> Why WOULD it be?
[11:36:09] <hypermagic> ;)
[11:36:34] <hypermagic> well anybody asked your opinion?
[11:37:34] <hypermagic> i was not being asked about anything
[11:47:53] <hypermagic> FL4SHK, so compare this with the usb and decide what would you use on an avr :) http://en.wikipedia.org/wiki/Data_strobe_encoding
[11:49:06] <hypermagic> counting the clock cycles instructions take, and trying to make 0.01% precision clock, or sending your data self clocked?
[11:50:37] <hypermagic> LeoNerd, ? ;)
[11:50:49] <hypermagic> what is your take on this?
[11:51:21] <LeoNerd> hypermagic: ?
[12:50:57] <Jartza> does anybody know, if I use -mcall-prologues, does the prologue and epilogue have their own section?
[12:51:05] <Jartza> ...meaning, how can I move them? :)
[12:51:47] <Jartza> in gcc, that is
[13:06:11] <elektrinis-hme> hi
[13:06:22] <elektrinis-hme> anyone using this? http://www.ebay.co.uk/itm/AVR-USB-JTAG-Emulator-Debugger-Programmer-For-Atmel-ATMega16-64-128-169-3-23-/351198215454?pt=LH_DefaultDomain_3&hash=item51c50b7d1e
[13:06:36] <elektrinis-hme> is it compatible with atmel studio?
[13:06:52] <elektrinis-hme> and is the firmware upgradable?
[13:11:46] <Jartza> the description says "Atmel AVR JTAG is the company's AVR Studio + iccavr compatible interface"
[13:11:50] <Jartza> but I haven't used one
[13:13:49] <elektrinis-hme> my question is about atmel studio, not avr studio
[13:22:40] <hypermagic> FIASCO An Open-Source Fractal Image and Sequence Codec :) it is however lost in space ... http://www.linuxjournal.com/node/4367/print
[13:26:34] <aandrew> quick (I think?) question... what's the equivalent resistance of an AVR port in input mode with the pullup disabled?
[13:32:01] <N1njaneer> Should be at least several hundred KOhm or more. Check the datasheet - should be listed.
[13:44:29] <Jartza> well. the answer to my previous question seems to be .text.libgcc.prologue
[13:46:54] <LeoNerd> Likely many Mohm...
[13:50:07] <FL4SHK> Mohm's day was two days ago
[14:02:47] <aandrew> *nods*
[14:03:00] <aandrew> I'm looking to drive a p-channel mosfet which has its drain at 12V
[14:03:37] <aandrew> I'm using a 10k resistor between the drain and gate to hold the mosfet off but I was concerned about the leakage current to the attiny's 3.3V supply rail being enough to turn the mosfet on
[14:07:05] <aandrew> 12V - 3.3V or 8.7V across a 10k resistor gives me 900uA, but that 8.7V is still well above the Vgsth
[14:07:11] <aandrew> I could swap to PNP transistors, that would help a lot I think
[14:07:14] <aandrew> 8.7V is above the 0.7V turn on voltage but 900uA would keep the transistor off
[14:07:17] <aandrew> or off enough that it doesn't matter
[14:07:27] <aandrew> (copypasted from ##c where I erroneously typed all that a moment ago, lol)
[14:30:38] <abferm> So, I can't find the AVRISP mkII anywhere. Anyone know what the replacement is supposed to be?
[14:33:41] <abferm> I mean, it is on ebay and amazon still, but Atmel shows 0 stock, and it isn't listed on digikey or mouser any more.
[15:04:55] <Jartza> abferm: https://www.olimex.com/Products/AVR/Programmers/AVR-ISP-MK2/open-source-hardware
[15:42:23] <EI24> Hi, with the .macro directive, can a parameter be a string? like: .macro M1 RCALL @0 M1 func1 ?
[15:47:49] <EI24> i think not, it does not seem so
[16:49:53] <aandrew> nope, pnp transistor is remarkably good at turning on