#avr | Logs for 2014-03-25

Back
[00:29:57] <megal0maniac_afk> rue_more: I once wanted to do debounce using a timer lockout. When you press the button, the timer starts. If you press the button and the timer hasn't expired then it is ignored. All done in interrupts
[01:34:44] <rue_more> the timer shoudl be reset on every bounce
[01:35:36] <rue_more> that code should flag when the first contact is made, and re-enable after a timeout from the last bounce
[01:35:56] <rue_more> ooo I wonder if it should be a hold thing
[01:36:26] <rue_more> if the dial is usually on fine, should you push to toggle to course or hold and turn to do course adjustments?
[01:36:37] <rue_more> hmmm, dialology
[01:37:10] <w|zzy> If you have 2 ops, 2 cycles, running in an interupt would you bother disabling interrupts for the duration of the ISR?
[01:37:37] * Xark just polls the button every so often from an interrupt (30 ms or whatever, depending).
[01:51:41] <w|zzy> But do you disable and re-enable interrupts whilst you are in an interrupt which only takes 2 cycles?
[01:53:38] <Xark> w|zzy: By default other interrupts are masked inside an ISR (I believe).
[01:54:16] <w|zzy> Thats my understanding...
[01:54:18] <Xark> (or at least from the same interrupt)
[01:55:39] <w|zzy> I doubt it would hurt to disable them.. But just seems like more work.
[01:56:52] <Xark> w|zzy: I don't recall ever needing to do that
[01:57:08] <w|zzy> Cool. So its not just me.. Thanks.
[03:05:00] <jacekowski> Xark: by default interrupts are disabled when in interrupt
[03:06:29] <Xark> jacekowski: Yeah. Is that _all_ types of interrupts, or just the specific one being handled?
[03:06:33] <jacekowski> all
[03:07:01] <jacekowski> basically, any interrupt causes I flag in SREG to be cleared
[03:07:16] <jacekowski> The I-bit is cleared by hardware after an interrupt has occurred, and is set by
[03:07:17] <jacekowski> the RETI instruction to enable subsequent interrupts.
[03:07:26] <jacekowski> page 11 of http://www.atmel.com/images/atmel-2486-8-bit-avr-microcontroller-atmega8_l_datasheet.pdf
[03:07:28] <Xark> Cool. That is what I thought, but I wasn't positive.
[03:09:13] <jacekowski> in GCC if you use ISR_NOBLOCK with your ISR then it will reenable interrupts straight away
[03:09:28] <jacekowski> by default it is ISR_BLOCK
[03:30:58] <OndraSter> but watch out
[03:31:05] <OndraSter> if it fires up the same interrupt it is in right now
[03:31:13] <OndraSter> and then again
[03:31:14] <OndraSter> and again
[03:31:15] <OndraSter> and again
[03:31:22] <OndraSter> and so forth, you might run into stack issues
[03:31:46] <braincracker> hello my friends
[03:31:56] <OndraSter> heya
[03:32:40] <braincracker> i have an offer for a Panasonic Lumix FZ-5 that has been dropped for cheap, should i buy it?
[03:33:02] <braincracker> it is said the optics won't come out but otherwise is fine
[03:33:39] <braincracker> i like this camera btw
[03:33:41] <OndraSter> define cheap?
[03:33:46] <braincracker> $20
[03:34:01] <braincracker> new is like $300 ?
[03:34:04] <OndraSter> hmm
[03:34:13] <OndraSter> are you willing to spare $20 if you can't fix it?
[03:34:28] <braincracker> well it comes with charger, and 2 spare batteries
[03:35:17] <braincracker> and there is a chance i will get another one of this kind in future
[03:36:06] <braincracker> i have no idea what could have failed in it
[03:36:19] <braincracker> and what magic motor runs the optics
[03:36:48] <braincracker> possibly the piezo type motors, those can break like glass
[03:36:57] <OndraSter> or motors made out of unicorn tears.. :D
[03:37:01] <OndraSter> maybe it is just stuck
[03:37:13] <braincracker> that would be nice
[03:37:14] <OndraSter> the optics may have (when dropped) "skipped" a turn in one half
[03:40:24] <braincracker> http://www.dpreview.com/reviews/panasonicfz5
[03:40:25] <braincracker> :)
[03:40:45] <braincracker> old but nice
[03:41:38] <braincracker> great for photos
[03:42:07] <OndraSter> :)
[03:42:30] <OndraSter> a friend of mine was asked to make photos of some equipment at work. But it is an average camera. So we used my phone instead. With better results :D
[03:43:25] <OndraSter> (plus who would want to walk 2 levels down for the camera, then 2 stories back up and then down again?)
[03:43:57] <braincracker> haha
[03:44:07] <braincracker> small device?
[03:44:24] <braincracker> use a "supermacro" lens
[03:44:48] <braincracker> they say a tareget lens from dvd reader is noce
[03:44:52] <braincracker> nice
[03:45:19] <braincracker> the moving eye above the disc surface
[03:46:15] <braincracker> i have tried a phone vga camera too with a simple magnifier glass, and a mini microscope too, with excellent results
[03:46:44] <braincracker> photographed the bond wires clearly with the nokia 6230
[03:46:57] <braincracker> in an eep rom
[03:47:42] <OndraSter> no, it was normal (older) table measuring equipment
[03:48:47] <braincracker> hah found another same type camera used for $60
[03:49:06] <braincracker> i could get a perfect one with spare parts for $80
[03:49:07] <braincracker> :)
[03:49:21] <braincracker> or just fiix the $20 one
[03:49:27] <OndraSter> hopefuly
[03:49:53] <braincracker> it is really not much for this thing
[03:50:12] <OndraSter> anyways, I am getting up. Will be back later today. Cya
[03:50:18] <braincracker> bb
[04:29:32] <abcminiuser> And I'm back
[04:29:36] <abcminiuser> Long day
[04:31:32] <braincracker> hey abcminiuser
[04:31:56] <abcminiuser> Ahoyhoy
[04:32:12] <braincracker> live from australia ?
[04:33:15] <abcminiuser> Indeed
[04:33:18] <abcminiuser> Barely
[04:33:19] <abcminiuser> Tired
[04:33:42] <braincracker> what are you up to?
[04:36:54] <abcminiuser> Working at LIFX these days
[04:37:05] <braincracker> i was thinking about the possibility of me buying a dropped version of this http://www.dpreview.com/reviews/panasonicfz5 and fixing it ;< the optics won't come out
[04:37:05] <abcminiuser> Long day today, new board prototypes
[07:20:18] <anton02> why do AVR microcontrollers have a voltage range rather than a specific voltage?
[07:23:46] <Kev-> so you can use them for different applications.
[07:24:30] <Kev-> Well that's not really they why. The range is there because of how the chips are designed and tested.
[07:25:15] <anton02> Kev-: are more areas of the chip activated with more voltage?
[07:25:22] <Kev-> no
[07:25:33] <Kev-> But you can usually run them faster on more voltage
[07:25:44] <Kev-> Faster and uses more power
[07:25:45] <Kev-> It's all in the spec sheets.
[07:26:08] <anton02> Kev-: how about the voltage you have going to a motor from the microchip? what governs that?
[07:26:38] <Kev-> You don't. Connecting a motor straight to the chip pins will fry the pins or the chip.
[07:27:08] <anton02> so you connect the motor to a vcc? then how do you control the motors operation via the chip?
[07:27:42] <Kev-> With transistors or h-bridges or whatever depending on what the motor needs
[07:28:11] <timemage> anton02, something like that yeah. the avr pins typically don't have more than 25-40ma individually and usually not more than say 100ma in groups. so you're switching via some sort of transistor.
[07:29:12] <anton02> transistors? that confuses me. i thought thats what microchips and cpus are made of
[07:29:32] <Kev-> Sounds like you need to grab a book and read up a bit
[07:29:33] <timemage> anton02, they are, but not the sort that handle lot of current.
[07:29:45] <Kev-> And motors need a lot of current.
[07:30:05] <anton02> if you told me something like 'relay' that would make sense
[07:30:44] <Kev-> transistors make sense. It doesn't make sense to you because you don't seem to have much electronics knowledge
[07:30:48] <Kev-> That's why I'm usggesting a book
[07:31:25] <anton02> Perhaps an independent transistor functions much in the same way as a relay but for smaller applications
[07:31:57] <bss36504> That would be a broad assumption, but more or less correct.
[07:32:16] <bss36504> Kev- is correct though, you need to read a bit.
[07:32:23] <timemage> anton02,right. when you view them from a couple thousand feet they look similar.
[07:33:22] <bss36504> anton02: They operate *kind of* like a relay in some circumstances, thats why it was a very broad assumption.
[07:34:03] <bss36504> anton02: http://www.allaboutcircuits.com/
[07:35:18] <anton02> I see they have 3 pins coming from them in google images. Im guessing one functions like the switch, while the other 2 are the voltage that supply the desired component when the switch is turned on. The value of the transistor must determine the amount the voltage is changed?
[07:36:49] <twnqx> ... you definitely want to read up on transistors before using them
[07:37:04] <twnqx> so many different kinds with totally different behaviors
[07:39:42] <bss36504> ^this, 100 times over.
[07:40:10] <bss36504> anton02: Are you a software guy?w
[07:43:43] <anton02> mechatronic
[07:44:36] <bss36504> makes sense. Seriously dude, you gotta read up on transistors if you want to be able to use them. Follow the link I sent, you can learn many things.
[07:45:11] <anton02> okay, cheers
[07:45:45] <bss36504> cheers!
[08:06:15] <braincracker> anton02 because there is a minimum voltage requirement for certain amount of frequency/stability, and a maximum voltage permissible for the gates.
[08:08:08] <anton02> braincracker: someone earlier said more voltage means it can run faster, were they wrong?
[08:08:48] <megal0maniac_afk> anton02: If anything, what braincracker said confirms that
[08:13:42] <braincracker> yes, it can run faster at higher voltage, like the old celerons run +55% frequency with a little voltage boost
[08:14:18] <braincracker> but overclocking voids warranty
[08:17:28] <anton02> do PWM systems always use transistors?
[08:18:06] <anton02> if the voltage provided by the IC isnt sufficient
[08:18:38] <megal0maniac_afk> anton02: There's more to it than voltage
[08:18:49] <megal0maniac_afk> It depends on your application
[08:19:01] <twnqx> current is the more usual reason :P
[08:19:13] <megal0maniac_afk> Exactly
[08:19:21] <megal0maniac_afk> But voltage too
[08:20:21] <braincracker> anton02 if we call a fet transistor then yes
[08:20:57] <braincracker> but there are optocouplers and leds too
[08:21:24] <braincracker> and you can control things limited by your imagination
[08:21:49] <megal0maniac_afk> And technical ability
[10:17:28] <dufa> Hey! Any people with asm experience on avr here? I'm trying to make a blink program that is as (ridiculously) small as possible, down to 12 opcodes at this point. Is there a way to directly manipulate the DDRB or PORTB io registers? Currently I set a value to r24 and then use "out _PORTB_, r24" to change the state of the LED. So, I'd like to flip a bit in PORTB in a single opcode instead of two, any suggestions?
[10:23:11] <bss36504> dufa: can you do a SBR or CBR on a port?
[10:24:33] <bss36504> oh wait, SBI and CBI: Set/clear bit in I/O register.
[10:27:59] <dufa> hmm, SBI does seem useful, atleast I will save one opcode when setting the DDRB bit for the LED pin
[10:29:27] <twnqx> so xor/out a reg or unroll and sbi/cbi :P
[10:38:59] <kline> since we're on the topic of avr asm, where is avr-as itself documented, particularly its pseudo-ops? for example, the avr docs say use .db to put a (series of) byte into flash, but avr-gcc throws "unknown pseudo-op: `.db'"
[10:45:15] <timemage> kline, pseudo-ops for something like that arn't particularly target specific. i'd expect to find those in the overall gas manual.
[10:45:36] <kline> coolio, thanks
[10:46:43] <timemage> kline, try .byte
[10:47:01] <kline> thanks muchly
[10:47:14] <timemage> kline, there are also a bunch of ones specifically for strings.
[10:49:16] <kline> yeah, .asciz is what i really want
[10:49:59] <kline> but now im on the right set of docs i should be ok for the time being
[10:50:24] <kline> until now ive been working with atmels assembler as packaged with AS6
[10:50:30] <vsync_> are you kevin kline
[10:50:36] <vsync_> gee wiz
[10:50:41] <kline> vsync_: no, calvin
[10:50:54] <vsync_> that's actually klein, german for small
[10:51:15] <timemage> pretty sure i've seen this conversation before.
[10:51:20] <vsync_> in a sense you failed
[10:51:20] <kline> its actually K-Line, freenode user for "OH GOD MARIENZ STOP KLINING ME"
[10:51:46] <vsync_> i think you're a software "engineer"
[10:51:50] <vsync_> am i how far off?
[10:52:08] <kline> yes, im studying software engineering. why the quotes?
[10:52:29] <kline> i mean, im studying engineering maths and later engineering management (noooo!)
[10:52:34] <vsync_> [sic]
[10:52:59] <vsync_> for quotes, that is
[10:53:38] <kline> you arent the guy who insists that you cant be an engineer unless you produce something physical at the end of a project, are you?
[10:54:24] <vsync_> oh snap son you got me there.
[10:54:29] <bss36504> shots fired
[10:54:58] <vsync_> software engineers are a joke
[10:55:04] <bss36504> That's not fair
[10:55:05] <kline> mhmm mhmm
[10:55:08] <dufa> ouch
[10:55:15] <bss36504> I know a lot of very accomplished and capable SEs
[10:55:31] * kline goes to fetch some food, now the flamebait is out in the open
[10:55:37] <vsync_> in their field, for more info, see previous comment
[10:57:37] <bss36504> Ok vsync_, why are SEs not engineers? Do you think that you can do what they do any more than they can do what you do? What do yo do that makes you so much better?
[10:58:09] <vsync_> they make broken things which is the definition of programming
[10:58:19] <bss36504> That's the worst answer ever.
[10:58:36] <vsync_> let me think of some keywords
[10:58:48] <bss36504> Seriously, I'm not trying to be a dick. I'm genuinely curious why you think they are lesser than you.
[10:59:11] <vsync_> at no point i was implying them being lesser than myself
[10:59:24] <bss36504> Lesser of an engineer than yourself for sure.
[10:59:33] <vsync_> i'm not an engineer, per se
[10:59:55] <bss36504> What are you then? What qualifies your assessment of their skills?
[11:01:10] <vsync_> my assessment of their skills is based on a) end products and b) the constant bench "engineering" of freenode, stackexchange, and other cesspools, when given a product and the flamewheel spins up about how everyone in the given cesspool could have done it better, but just can't be arsed to do it
[11:01:36] <vsync_> point a could also be referred to as "the real life" of which software engineers more than not are alienated from
[11:03:02] <tzanger> well you ahve to understand most software engineers are little more than software technicians
[11:03:11] <tzanger> they cobble together code and don't pay attention to actual engineering of the code
[11:03:26] <tzanger> you get away with it in most software becasue that's how it is. it's what people are willing to accept
[11:03:51] <tzanger> the software engineers who write critical software are every bit an engineer as the mech or ees who build the rest of ti
[11:04:24] <vsync_> yeah, but both of which are pmuch the same
[11:05:18] <vsync_> which isn't true if you want to nitpick, but yeah
[11:05:33] <bss36504> vsync_: So you, for example, take a software product, find a bug, and blame the SEs for their mess up. As if an EE or an ME has never made a glaring engineering mistake, and then had John Q. Citizen talk about how they could have done it better. b) I'm not sure who hurt you, but that seems like a harsh assessment of an entire community. tzanger's assessment is essentially what I believe. There are shoddy, un-engineers in both Sofware and Electrical and
[11:05:34] <bss36504> Mechanical etc.
[11:06:20] <vsync_> that's true yeah
[11:06:47] <vsync_> except that software is admittedly more complicated, and is ALWAYS prone to errors, given user-end or the coder itself. It's never problem-free
[11:07:25] <vsync_> even though, that 20-something years old kid, who got his degree and is the self-proclaimed know-it-all, who'd write everything better
[11:07:47] <kline> thats just hubris though, no sensible person would do that
[11:07:50] <kline> i dont ;)
[11:08:47] <tzanger> I kind of miss being a smart ass know it all 20-something
[11:08:51] <tzanger> life was a lot simpler then
[11:09:08] <twnqx> i'd write a lot of stuff better, as n tailored for my needs :P
[11:09:13] <bss36504> HA! as if it's more complicated than a physical system. If you believe that they are not at least equal, then you don't know what you're talking about. Nothing ever works correctly on the first, or fifth or tenth time.
[11:09:15] <twnqx> but i don't have enough time.
[11:09:35] <bss36504> lol, i'm not even 20 yet...
[11:09:49] <vsync_> bss36504: i'm sure they don't, in your case
[11:10:09] <vsync_> there are many a budding software engineer in here :D
[11:10:09] * twnqx looks at wires and transistor soldered beyond deisgn on the board in front of him
[11:10:15] <kline> bss36504: very few bridges collapse 10 times before they get it right
[11:10:30] <twnqx> nope, didn't work on first attempt. didn't even program on first attempt.
[11:10:34] <vsync_> very few smokes...
[11:10:41] <imlach> kline: simulations might, however
[11:11:11] <kline> imlach: simulations are part of design, it would be equivalent of reworking a broken db schema
[11:11:30] <imlach> c, but I presume that's kind of what bss36504 is referring to
[11:11:31] <kline> once you start writing code is the same building process as a bridge, in that the design is already set
[11:11:33] <bss36504> its hard to simulate software. It doesn't make the problem more difficult though.
[11:11:38] <tzanger> I'm working on an electron microscope control design
[11:12:06] <vsync_> nifty
[11:12:09] <bss36504> vsync_: You still haven't shared your background. If you're not an engineer ("per se") what do you do?
[11:12:14] <tzanger> the software is tricky sure, but the electrical layout is a considerable step up in trickiness (just getting everything routed and being midnful of sensitive analog signals and many high speed digitial lines)
[11:12:49] <tzanger> I'm personally writing the FPGA code which is complex but managable. I don't consider the software for the ARM nor the PC side software to be complex at all
[11:12:57] <kline> vsync_: i guess the core of what youre saying is that software engineering isnt licensed and certified in the same way, say, civil eng is? fwiw, im all for formal testing of both grunt coders and the architects who design systems
[11:13:02] <vsync_> bss36504: for the sake of argument and its total irrelativeness, let's say i'm just a guy grown fond of flaming software people
[11:13:10] <tzanger> they have some tricky algorithms but high level software is considerably easier to write and tweak
[11:13:22] <twnqx> kline: i am all in on full product warranties, includign software
[11:13:23] <vsync_> kline: yeah, that would be good.
[11:13:26] <tzanger> kline: I'm not. that's a really shitty idea for a number of reasons
[11:13:33] <vsync_> and even more so of twnqx
[11:13:35] <kline> tzanger: why?
[11:13:39] <twnqx> there should not be a difference between software and hardware, at all
[11:13:44] <tzanger> kline: because buraucracy does not help a goddamned thing
[11:13:48] <vsync_> twnqx: that's the ideal case
[11:13:57] <kline> tzanger: looooooooooool. ok
[11:13:58] <tzanger> all that does is introduce another layer of fees and bullshit testing
[11:14:11] <vsync_> olol.
[11:14:12] <kline> tzanger: theres a difference between buraucracy and standards
[11:14:15] <tzanger> kline: you really thing people want to pay 4x the cost for "certified" software for their iphones?
[11:14:28] <twnqx> no, but i demand unlimited, forever, bugfixes
[11:14:36] <twnqx> and not to take the money and then abandon the software
[11:14:40] <kline> well, id like to be paid 4x as much and be certified as not retarded as the community college coders
[11:14:42] <tzanger> kline: for sure. but you enforce standards where necessary, and that's already done (DO160/DO178 for aircraft, MISRA for automotive, etc.)
[11:14:47] <tzanger> you won't be paid 4x
[11:14:50] <tzanger> that's a joke
[11:14:59] <kline> of course, im just pulling on the same number you claim
[11:15:02] <twnqx> tzanger: and now for android apps and MS windows, too
[11:15:04] <tzanger> most of that will go to the standards bodies and time wasted in recertification
[11:15:14] <tzanger> overhead
[11:15:18] <tzanger> you won't see much more at all
[11:15:25] <tzanger> you'll be able to charge more, but your costs will go up too
[11:15:43] <tzanger> I say for critical systems you do a proper sign off and have procedures/standards in place for accountability
[11:15:46] <vsync_> obviously. But we weren't talking about the profit here
[11:15:46] <kline> thats ok, im cool with a bigger turnover at all
[11:15:50] <twnqx> really, taking money and then say "eff you, i don't care about your problems, i already have your money" gets us arsehole companies like M$ and apple that make you pay for bugfixes
[11:15:56] <twnqx> because they ship you crap first
[11:15:59] <tzanger> but a blanket "you must be part of the software coding industry body to own a compiler" is crap
[11:16:10] <kline> tzanger: so anyway youd vouch for deregulating civil engineering?
[11:16:15] <tzanger> not at all
[11:16:18] <kline> since thats just pesky paperwork?
[11:16:19] <bss36504> twnqx: Woah now, back it up. What bug fixes are you paying for?
[11:17:05] <twnqx> bss36504: i don't get any bugfixes on win xp any more, so i have to pay for the new software called win 7 or the shit that is 8 if i even want my bugs fixed (though i just get new ones)
[11:17:08] <tzanger> but again, I don't think you need to be certified to design your home septic system. you should have it tested against a standard and pass/fail, but nowhere in that test should be "was the work performed by a certified engineer?"
[11:17:12] <kline> bss36504: apple call it iOS n+1, which fixes bugs from current iOS n
[11:17:38] <bss36504> kline: and you had to pay for that how exactly?
[11:17:44] <kline> bss36504: i didnt
[11:17:56] <bss36504> kline: incremental progress ≠ paid bugfixes
[11:18:27] <twnqx> but you get two choices: live with the bugs that won't get fixed because they have your money already, or pay for the update you don#t need
[11:18:36] <kline> but its easy to disguise the latter as the former
[11:18:39] <bss36504> twnqx: Interesting, I just got OSX 10.9 for free...
[11:18:50] <tzanger> not really, no
[11:18:55] <twnqx> i didn't get my win 7 for free
[11:19:02] <tzanger> you got it as a free upgrade to a licensed (and paid for) 10.8 instance
[11:19:22] <tzanger> and 10.8 was an paid upgrade from 10.7
[11:19:33] <tzanger> it just happens that 10.9 was a free upgrade from 10.8
[11:19:39] <bss36504> tzanger: actually no, I went from 10.6->10.9 for free. Even before, it was only $20 which is wicked cheap compared to a windows OS.
[11:19:56] <twnqx> 20$ for bug fixes on software that i paid money for is exactly 20$ too much
[11:20:04] <twnqx> because it wasn't ME who put the bugs in
[11:20:12] <bss36504> They weren't bug fixes though!
[11:20:19] <twnqx> did they fix bugs?
[11:20:23] <twnqx> ANY bugs?
[11:20:32] <kline> knowing apple, no
[11:20:44] <twnqx> where that bugs fixed by some free minor update?
[11:20:50] <kline> but its all about the ~~user experienxe~~
[11:21:00] <twnqx> if not the latter, it's a paid bugfix with new features mixed in
[11:21:04] <bss36504> What is so confusing about distinguishing between progress and fixes? So what if they repaired some things. Every software release should be better than the last. I have no problem paying for certain upgrades if I get MORE functionality than before.
[11:21:35] <kline> bss36504: what about when bugfixes are packaged with paid-for progress?
[11:21:42] <twnqx> i don't want win 8's tablet interface on my touchless multiscreen desktop system
[11:21:59] <twnqx> but how will i get bugfixes for win 7 if microsoft refuses to give them?
[11:22:05] <bss36504> doesn't bother me. So what, I got new features, and most of the time (at least in my experience) bugs were pretty much not an issue.
[11:22:22] <bss36504> it's like "Security fix for such and such". Oh, I didn't even know about it.
[11:22:26] <kline> bss36504: but you have to pay to get the new features!
[11:22:28] <bss36504> thanks Apple/MS!
[11:22:31] <kline> the horror!
[11:22:35] <twnqx> apple user, typical
[11:22:45] <bss36504> kline: Whats wrong with paying for new, never before seen features?
[11:22:51] <twnqx> "oh, i had a security problem. but i didn't know about it, so i don't care."
[11:22:58] <twnqx> nothing
[11:23:03] <kline> bss36504: nothing
[11:23:08] <twnqx> but all is wrong about fixing security issues for money
[11:23:12] <kline> ^^^^^^^^^^
[11:23:19] <twnqx> for money ONLY
[11:24:05] <bss36504> twnqx: Dear lord. Lets take apple for example: I will pay for a full OS update. I won't, nor do I need to pay for a "security update" (also, that was just an example, you people are so literal).
[11:24:07] <kline> this would make a great yospos thread
[11:24:28] <kline> " you people are so literal "
[11:24:29] <twnqx> you do not need to pay for your security update?
[11:24:32] <twnqx> ok
[11:24:33] <twnqx> so tell me
[11:24:42] <kline> its almost like we spend all day telling pcs how to do things on a minute level
[11:24:45] <twnqx> how would you have gotten the security fixes in 10.8 from 10.7
[11:24:51] <twnqx> without paying for 10.8?
[11:25:32] <kline> vsync_: a++ slow burner btw
[11:26:11] <bss36504> it was an update anyway. I had 10.6 and it was as secure (I presume, giving apple the benefit of the doubt) as the shiny new 10.8. The reason being, they don't need to stop development on an OS that they still officially support. MS did the same with XP until they stopped supporting it, which is fair since you can't cover all your legacy products forever (no matter what your company makes)
[11:26:34] <twnqx> no
[11:26:36] <twnqx> it is not fair
[11:26:40] <twnqx> i paid for a product
[11:26:45] <twnqx> i want to use the product
[11:26:47] <twnqx> but i can't
[11:26:52] <twnqx> because of security holes
[11:26:59] <twnqx> i don't want the bullshit that is 8
[11:27:02] <bss36504> I use XP, IDGAF. Win7 is better.
[11:27:09] <twnqx> i don't want the uber-resource waste that is 7
[11:27:26] <bss36504> twnqx: Well then write an OS yourself! or switch to linux?
[11:27:28] <tzanger> I would argue that the product should only be used behind a firewall. I don't mind the current system. It beats having NO upgrades. Remember the software you buy has no implied warranty
[11:27:40] <tzanger> this is a contract you enter into willingly by deciding to buy the product
[11:27:43] <twnqx> see
[11:27:45] <tzanger> if you don't like it, use something else
[11:27:51] <tzanger> it's not like there aren't alternatives
[11:27:52] <twnqx> that "no implied warranty" is the issue
[11:27:55] <twnqx> make it a law
[11:27:59] <tzanger> heh
[11:28:02] <twnqx> that full warranty has to be there
[11:28:03] <bss36504> thank you tzanger! Read the fucking EULA twnqx.
[11:28:05] <tzanger> yeah THAT'LL fix everything
[11:28:08] <twnqx> i READ the eula
[11:28:14] <twnqx> and that eula should be illegal by law
[11:28:16] <bss36504> then what are you complaining about?
[11:28:21] <twnqx> that is all i am saying
[11:28:23] <bss36504> why should it be illegal?
[11:28:32] <Yotson> twnqx, challenge it...
[11:28:34] <bss36504> because you don't believe in free capitalism?
[11:28:35] <tzanger> so you want to wait 50 years for all the software routines to be 100% tested and guaranteed to work? for every minor update? no thank you
[11:28:39] <tzanger> what you are suggesting is unrealistic
[11:28:39] <twnqx> the eula says "i have your money, now i give shit ybout you. bye."
[11:28:52] <tzanger> this is one of the places that software and hardware engineering differ
[11:28:59] <twnqx> for NO right
[11:29:13] <twnqx> yes, i want a law that compensates even consequential damage
[11:29:24] <bss36504> No, thats not what it says. The law protects you from receiving a product that violates what is advertised. The EULA is the proprietor's right when they sell the product.
[11:29:48] <tzanger> it's straightforward (but not trivial) to test the mechanical engineering of a product and guarantee performance. It's straightforward to evaluate signal integrity of a given trace in a circuit and gauge its performance over time/temp/voltage/whatever.
[11:29:50] <twnqx> the trojan that broke in through microsofts's bug in IE and the consequential lsos from online banking account shoulld exactly be microsofts problem
[11:29:55] <tzanger> it is NOT possible to do this realistically for software
[11:30:32] <tzanger> twnqx: I think that if it can be proven that microsoft either did not do their due dilligence (through a documented and signed-off test suite) then yes
[11:30:36] <tzanger> otherwise absolutely not
[11:30:44] <bss36504> hardware has test cases on the order of 10^30 sometimes. Perhaps more. Software could be 10^800. you simply cannot exhaustively test software.
[11:30:53] <twnqx> no. there was a bug, which means they didn't
[11:31:02] <twnqx> period
[11:31:05] <tzanger> this is exactly what DO160/DO178 are. when airplanes fall out of the sky the cause is determined and taken right back to the test on the specific part/component and checked against the spec
[11:31:10] <tzanger> nonsense
[11:31:26] <tzanger> twnqx: it's clear you don't understand the scope of what you're suggesting
[11:31:29] <bss36504> High integrity systems are a thing. It takes a lot of time, money and math to qualify them. MS is not a high integrity system, nor is it advertised as one.
[11:31:40] <Yotson> twnqx, funny thing. if you keep using XP and your account gets robbed. at least here you will have a hard time to get your bank to compensate. let alone MS.
[11:31:57] <twnqx> tzanger: i do understand the scope, as i am writing software too, and i making mistakes too
[11:32:11] <twnqx> Yotson: exactly that is what is wrong with the law
[11:32:15] <bss36504> Clearly, you do not understand the scope of a full software package
[11:32:34] <Yotson> twnqx, i concur. but its what it is. skip Ms altogether imo.
[11:32:34] <bss36504> writing a program and writing software are different animals.
[11:32:47] <twnqx> i am using MS exclusively to play games
[11:32:54] <twnqx> and an XP VM for office
[11:32:58] <bss36504> Oh dear lord, and all this crying...
[11:33:12] <twnqx> and games are a prime example
[11:33:17] <twnqx> you pay 50, 60€ for a game
[11:33:24] <bss36504> By free choice...
[11:33:30] <twnqx> and then it crashes, killing your last 10 hours of progress
[11:34:08] <bss36504> And here I thought we were complaining about software that might, ya know, actually cause a death....
[11:34:18] <Yotson> as long as the maker gets his money he will proceed with what he does now. don't spend the money.
[11:34:30] <twnqx> i wonder how many programs actually even see a SINGLE valgrind run before put anywhere
[11:34:46] <kline> Yotson: btw this all kicked off as "software engineers are the lowest form of engineer"
[11:34:47] <bss36504> Don't like games? Boycott them. I don't know what to tell you, twnqx.
[11:34:58] <bss36504> kline: I know, I'm kind of amused by that.
[11:35:11] <twnqx> kline: and all i see if proof of why
[11:35:18] <Yotson> kline, yeah, i got that part. And those engineers (or their bosses) do the same thing imo.
[11:35:20] <twnqx> "yeah, we fuck up. and take no responsible. screw you."
[11:35:31] <twnqx> that's all i hear from software engineers here the past half hour.
[11:35:39] <twnqx> responsibility*
[11:36:04] <bss36504> twnqx: If you think that the actual individual SEs are the ones calling the shots about their programs and how they are distributed, you are incredibly ignorant of how big companies operate.
[11:36:12] <bss36504> BTW, I'm an EE.
[11:36:35] <twnqx> bss36504: i don't care about the individual or company
[11:37:01] <bss36504> lol, what a cop out.
[11:37:03] <bss36504> In all likelihood, the engineers are screaming about how it's not done yet, and it's the upper management making the call.
[11:37:03] <twnqx> but i have seen too much crap from both sides to agree to more regulation
[11:37:40] <bss36504> Wait, were you not just shouting about how there SHOULD be more regulations?
[11:37:41] <Yotson> hey, as long as those companies still sell their stuff. why should they change? ethics? roflol
[11:37:51] <bss36504> ^truth
[11:38:03] <tzanger> twnqx: you design software, so you should understand the scope of what you're suggesting. it's clear that you odn't though
[11:38:08] <twnqx> ok, wording is disagreeable
[11:38:18] <Yotson> stop giving them your money if you don't want what they sell.
[11:38:25] <twnqx> but i have seen too much crap from both sides, so i agree to more regulation
[11:38:27] <twnqx> better?
[11:38:29] <tzanger> how do you guarantee correct operation of a complex multithreaded application? How do you determine if a software glitch was caused by bad memory or a CPU hiccup?
[11:38:57] <Yotson> hell no. than politicians are going to decide! jeez.
[11:39:14] <tzanger> more regulation doesn't solve this unless it's specific. I *do* agree that anything involving financial transactions should have minimum coding and documentation/testing standards, and those found not following them should be slapped HARD.
[11:39:29] <twnqx> complex multithreaded is just a matter of chosing your locks correctly
[11:39:39] <Yotson> i rather have a ceo deciding than some floating to the top because of lack of weight of some politician.
[11:39:47] <bss36504> "Oh yeah guys, multithreading is trivial..."
[11:39:52] <bss36504> Dude, you have no idea
[11:40:04] <twnqx> not trivial, but from my experience not as complicated as people try to make it out
[11:40:16] <tzanger> that's not legislation so much as industry requirement. Maybe some light legistlation ("consumer bank access software must comply with STD-123 and we will set up a monitoring/enforcement body to verify anything going to market")
[11:40:27] <tzanger> BWAHAHAHAHAHAHAHAHAHA
[11:40:36] <tzanger> "< twnqx> complex multithreaded is just a matter of chosing your locks correctly"
[11:40:54] <twnqx> what
[11:40:56] <tzanger> yes. and complex airframe software is just a matter of writing your code correctly.
[11:41:02] <tzanger> it's just that simple
[11:41:10] <tzanger> c'mon, why are you having such a hard time with it?
[11:41:10] <twnqx> mutithreading is just multiprocessing with shared memory and side effects on that
[11:41:22] <tzanger> "is just"
[11:41:28] <twnqx> yes?
[11:41:29] <kline> guys ive solved the halting problem
[11:41:33] <tzanger> you aren't actually saying anything useful
[11:41:38] <kline> yes.py: return True
[11:41:39] <tzanger> you're hand-waving away the complex bit
[11:41:44] <kline> no.py: return False
[11:41:45] <tzanger> how do you GUARANTEE that you're doing it right?
[11:41:48] <twnqx> what do yu want me to do? post a few k lines of code?
[11:41:50] <kline> ITS JUST A MATTER OF PICKING THE RIGHT PROGRAM
[11:42:09] <twnqx> if you want guarantees, use a software that gives you those
[11:42:17] <tzanger> such as?
[11:42:23] <twnqx> also i am not claiming that software must be error free, that's impossible
[11:42:43] <twnqx> all i say that if you make a mistake, it is your duty to fix it
[11:43:12] <tzanger> some mistakes are impossible to know the impact of until the unthikable happens
[11:43:12] <twnqx> "you" being an individual, or a company
[11:43:25] <tzanger> http://en.wikipedia.org/wiki/Therac-25
[11:43:28] <tzanger> good example
[11:43:57] <tzanger> all kinds of innocuous changes get made and it's sometimes not until many, many years later that the unthinkable happens
[11:45:02] <twnqx> and then you tell the survivors "yeah, sorry, but software has no wa5rranty or liability. bye."
[11:45:13] <tzanger> The failure only occurred when a particular nonstandard sequence of keystrokes was entered on the VT-100 terminal which controlled the PDP-11 computer: an "X" to (erroneously) select 25 MeV photon mode followed by "cursor up", "E" to (correctly) select 25 MeV Electron mode, then "Enter", all within eight seconds. This sequence of keystrokes was improbable, and so the problem did not occur very often and went unnoticed for a long time.
[11:45:20] <tzanger> how are you realistically going to test for that case/
[11:46:25] <twnqx> The software interlock could fail due to a race condition. The defect was as follows: a one-byte counter in a testing routine frequently overflowed; if an operator provided manual input to the machine at the precise moment that this counter overflowed, the interlock would fail.
[11:46:46] <tzanger> now there are other enigneering errors that I agree are something that the company making the Therac25 should have not let pass
[11:46:48] <twnqx> now that is a different angle of the same thing, and sounds like somethign foreseeable and preventable
[11:47:09] <tzanger> no hardware interlocks, no interlock reporting,e tc. THOSE kinds of mistakes I would find fault with a company and say they did not perform their due dilligence
[11:47:20] <tzanger> that kind of stuff is part of what I consider fault analysis
[11:48:02] <tzanger> as I said I'm not against life-threatening or safety-critical systems being very strictly regimented and documented and tested (and the test results documented and signed off)
[11:48:07] <twnqx> also there seems no supervising system or logic validation if the system is not meant to output lethal radiation doses but can be made to do it
[11:48:17] <tzanger> but your blanket statement that puts OSX bugfixes in with this kind of stuff is where I take exception
[11:48:29] <twnqx> well, i don't
[11:48:54] <tzanger> I don't want to pay $30k for OSX. I'm willing to have to reboot or put up with annual/semiannual small fees for updates that include bug fixes.
[11:48:58] <twnqx> i recently learned that my Sony television could lock to the point where it would have to go to maintenance
[11:49:06] <twnqx> just by data in DVB-C streams
[11:49:17] <twnqx> guess who has to pay for the reprogramming
[11:49:27] <kline> i bet it was a porn channel
[11:49:37] <twnqx> no, it was turned off during the time
[11:49:52] <twnqx> also, TV has to encrypted channels
[11:50:07] <kline> it probably wasnt turned off
[11:50:16] <kline> or it wouldnt be looking at stream data
[11:50:29] <twnqx> something about no input validation in EPG data, which of course everyone knows never has never any corruption on public transmission lines
[11:50:31] <tzanger> again, entertainment systems I really don't care that you had to go get fixed, although if I were in your situation I'd be a) very impressed to find out how you determined that was the root cause and b) interested in a class action suit to recoup my costs in something that I would have considered failure from common use that should not have failed
[11:50:45] <twnqx> the repair company told me.
[11:50:47] <tzanger> but to have some bureaucrat come in and say that you can't write TV software unless you're licensed... no thanks
[11:50:51] <twnqx> no
[11:51:07] <twnqx> but if you sell the tv, and it breaks through your faulty sofwtare, you should have to pay for the repairt
[11:51:07] <tzanger> twnqx: I'm surprised they did. they could open up sony to a class action suit over it
[11:51:09] <twnqx> period
[11:51:32] <twnqx> and that would be sufficient liability for me
[11:51:52] <tzanger> depends on the circumstance, but that's a fuzzy line. If my toaster or dishwasher or microwave or fridge or lawnmower (i.e. applicances) had software issues that cause them to malfunction through no fault of my own... I'd be upset
[11:52:48] <tzanger> and then malfunction compared to break down and require me to pay to repair is something different again
[11:53:03] <twnqx> ok
[11:53:19] <twnqx> an i ship you a TV that you have to periodically send in for repair, and charge you every time you do?
[11:53:21] <twnqx> can*
[11:53:35] <twnqx> since you seem ok with that
[11:54:00] <twnqx> seeing that software doesn't have to be correct
[11:54:08] <twnqx> i promise i give you new errors with every update
[11:54:14] <twnqx> you won't hit the same twice
[11:54:56] <tzanger> I didn't say I was okay with it, but if the repairman told me this was a known issue with sony firmware I'd ask the rpair to be covered and if it wasn't, I'd escalate to the point where I'd either get it fixed or not buy another sony tv
[11:55:21] <twnqx> as if that helps you seeing that all vendors are the same, qualitywise
[11:55:32] <tzanger> but again, that's not the same as demanding free updates for all problems, seen and unforseen, for every product with software, ever.
[11:55:41] <twnqx> oh wait, you have the great option others here posted: just don't buy a TV any more, problem solved
[11:55:49] <tzanger> I'm okay with there being firmware bugs, provided they don't cause me great problem
[11:56:12] <tzanger> if I kept hitting a particular bug I'd be upset. but you think all vendors have all the same firmware bugs and those bugs impact all users continuously?
[11:56:30] <tzanger> perfect example. once in a blue moon my appletv goes kaboom and reboots.
[11:56:37] <tzanger> antoher example: my ISP somtimes goes down
[11:56:39] <twnqx> no, of course they all have different quirks and bugs
[11:57:43] <bss36504> I feel like if all products were manufactured with such shitty quality, as you suggest, twnqx, then nobody would buy them and the company would either a) fix them and make them better, or b) go out of business. While I don't consider myself a capitalist, that is the nature of capitalism.
[11:58:01] <twnqx> nope
[11:58:06] <twnqx> the point here is
[11:58:35] <twnqx> that people today are so well trained to say "oh yeah, there's a bug, nothing you can do about it, also it's 1€ cheaper" that this system doesn't work any more
[11:59:40] <Yotson> twnqx, what sort of job do you have? Does it pay more than, lets say, $40 an hour?
[11:59:45] <bss36504> I disagree. There are cheap things and expensive things. Name brand and store brand. Bottom line is, as my dad always said, "You pay shit, you get shit".
[11:59:47] <twnqx> sure
[11:59:58] <twnqx> to both of you
[12:00:11] <twnqx> but the expensive things aren't that much better
[12:00:37] <bss36504> Right, so don't bitch about cheap things breaking. I paid 2K for my macbook when I started college, and it still works like new. I could have bought a dell for 400....
[12:00:41] <Yotson> no, but instead of wasting time on irc you could have worked and had money to buy a freaking update/fresh OS.
[12:00:50] <twnqx> lol
[12:01:01] <twnqx> thanks, i have a few full retail price win 7 ultimates in the cabinet
[12:01:15] <twnqx> and yes, it's less than an hour of work if you compare them
[12:01:22] <Yotson> not what i would have chosen, but fine. :)
[12:02:23] <twnqx> bss36504: yeah, my 5 years old lenovo laptop is also still working. a bit slow today, and sadly there's not a single vendor with decent keyboards in the laptops left, but it's still wokring. also 2k€, plus later SSD/RAM extras
[12:03:04] <megal0maniac_afk> twnqx: My thinkpad and ssd got married
[12:03:17] <bss36504> You make these market accusations like a product tester. Is it your job?
[12:03:23] <twnqx> nope
[12:03:28] <twnqx> i am working in IT security
[12:03:45] <twnqx> most hardware/software development is hobby
[12:03:47] <megal0maniac_afk> ssd is ata password locked (and aes encrypted by firmware). I've forotten the password but the biometric sensor still unlocks it fine
[12:03:59] <twnqx> lol
[12:04:02] <megal0maniac_afk> So it will die when this laptop dies
[12:04:13] <twnqx> no, wiping should still work
[12:04:37] <megal0maniac_afk> Well I can still unlock it, so that's a step in the right direction
[12:04:49] <megal0maniac_afk> But I'm not in a position to wipe it right now :P
[12:04:52] <bss36504> "Not a single vendor". You tested all of them? Yeesh.
[12:05:12] <twnqx> i sampled all of the current standard vendors, yes
[12:05:30] <twnqx> none of them comes near lenovo's standard from 3-4 years ago
[12:05:37] <twnqx> back when they were called IBM
[12:05:40] <twnqx> that quality i mean.
[12:06:38] <megal0maniac_afk> My x220 is still pretty damn solid by today's standards. Not saying it's as good as the original IBMs, but it's better than most imo
[12:06:48] <twnqx> yes
[12:06:57] <twnqx> that also has the old keyboard type
[12:07:03] <megal0maniac_afk> Yip
[12:07:05] <megal0maniac_afk> Which I love
[12:07:43] <twnqx> then you'll be as disappointed as i am with the current iterations of T/X series
[12:08:11] <tzanger> bss36504: I always bought cheapish laptops. I travel a lot and generally abuse my hardware. The last $400 core2 solo system I had I replaced the KB (comes with the usual ridiculous international/french canadian kb) and HDD and it served very well for about 4 years. the plastic was starting to go and the hinge was becoming a problem but it lasted well.
[12:08:12] <megal0maniac_afk> twnqx: I'll likely only see a new thinkpad when this one dies and I have a job :P
[12:08:48] <tzanger> bss36504: I've got a 11" mba now (i7, 8GB, 512G SSD) and I'm not entirely 100% sure it was worth 4x the price
[12:08:49] <twnqx> tzanger: i am on the 3rd keyboard, second set of hinges, and second magnesium frame for the display
[12:09:08] <tzanger> bss36504: I do love the hardware though, I will give you that, and OSX is decent. It's not linux, but that's both a good and bad thing
[12:09:09] <megal0maniac_afk> I'm not fond of the current Acer/Lenovo/Dell/etc 15.6" laptops which are all almost exactly the same
[12:09:16] <twnqx> also core 2 duo, but still better than most things i found
[12:09:16] <tzanger> twnqx: holy crap, how old?
[12:09:30] <twnqx> 5-6 years i think
[12:09:34] <twnqx> and tons of travel
[12:09:36] <myself> I thought I was gonna hate the chiclet keyboard on the new thinkpad, but it's actually really good, only took me a day or two to get used to it.
[12:09:46] <myself> The layout's a bit weird but the feel is fine.
[12:10:03] <twnqx> hm. i sampled the T540s with the 2560 display
[12:10:07] <tzanger> I did buy applecare with this thing which will bring it to I think 3y of warranty coverage. I've had them fix the trackpad twice (set screws jiggle out of place and it rises out of its place) and the hinge they've tightened up on it
[12:10:29] <tzanger> the only real thing I hate about this laptop is the tiny escape key in the recessed corner.
[12:10:43] <tzanger> and it has some usb issues from time to time that I'm not entirely sure aren't related to vmware
[12:10:58] <myself> I tellya my biggest keyboard surprise was the toughbook cf-17, which had an 85%-size netbook keyboard. Good layout, but I have giant hands and I expected it to suck. Actually took me about a week to get used to, and then I loved the fact that I could do things like ctrl-alt-del with one hand.
[12:11:22] <myself> The Eeepc has the exact same *size* keyboard, but worse feel and a horrible layout. I sold my eeepc because I hated the keyboard so much.
[12:12:02] <myself> Hm. Now bringing it back to #avr relevance, I still have a few keyboards from those toughbooks, I should do that teensy keyboard matrix project and make 'em into externals..
[12:12:13] <twnqx> the T500 is just perfect for log time use
[12:12:21] <tzanger> myself: yeah I have big hands too and I type fine on laptop keyboards. also never ever in 20 years had any kind of RSI
[12:13:09] <myself> I'm starting to get a callous on my wrist where it hits the laptop, cuz I balance it on my knee and push too hard with my wrist to hold it.. heh. But yeah, no actual injuries or anything.
[12:13:11] <twnqx> large enough display for decent resolution without straining the eye, superb keyboard, survives most of the things i do with it (i think it got intimate knowledge of coffee, beer and apple juice-soda so far)
[12:13:26] <myself> Oooh, sticky.
[12:13:42] <twnqx> yeah, that's why i needed so many keybords. they didn't break, though.
[12:14:05] <twnqx> replaced the optical drive for a second hdd
[12:14:09] <myself> Ever tried washing one?
[12:14:13] <twnqx> no
[12:15:48] <myself> I've got about an 80% success rate with washing keyboards. The secret seems to be a distilled-water rinse, then letting it sit vertically to dry for a few days.
[13:16:41] <naquad> i've received AVR Dragon and connected ISP to 168P, i'm getting error "Yikes! Invalid device signature." from avrdude, i've triple checked connection and i can say that it is correct. should i tune something on dragon?
[13:17:17] <naquad> signature is all 0s btw
[13:25:54] <myself> naquad: how is the chip powered?
[13:26:06] <naquad> 5v laboratory power source
[13:26:50] <myself> are you feeding that power back to the dragon? I think it has to get that to power its level translators or something.
[13:27:01] <myself> It's been a while since I used it but I seem to recall..
[13:27:31] <naquad> yes
[13:27:53] <naquad> before i've connected VTG/VCC i've had error RSP_NO_TARGET_POWER
[13:28:27] <myself> Well at least it's a different error message.
[13:28:49] <myself> That's all I've got. heh.
[13:35:11] <naquad> how do i change speed with avrdude?
[13:35:16] <naquad> -b 9600 doesn't help
[13:35:22] <synic> what about -B 5
[13:36:16] <naquad> YEZZZ!!!!!
[13:36:17] <naquad> it worked!
[13:36:20] <naquad> synic, thank you
[13:36:21] <synic> woot
[13:36:37] <naquad> i've had my AVR Dragon not working with m168p
[13:36:41] <naquad> and -B5 helped
[13:38:31] <synic> probably because you're not using an internal crystal, and the programmer was running too fast
[13:38:35] <synic> er... external crystal
[13:38:47] <naquad> yes, i'm not using external crystal
[13:41:25] <myself> ooh, neat
[13:41:30] <myself> I learned something
[14:44:08] <bss36504> WormFood: One of my classmates just used your baud rate site as a reference for a design. Nice work!
[14:45:02] <megal0maniac_afk> IT'S FAMOUS!!
[14:45:26] <megal0maniac_afk> I am going to give that link to my class next semester
[14:45:37] <megal0maniac_afk> Oh wait. PIC :(
[15:01:28] <bss36504> That is sad, megal0maniac_afk.
[15:01:33] <bss36504> PICs make me sad
[15:01:41] <megal0maniac_afk> Me too
[15:10:17] <specing> megal0maniac_afk: 'my class'?
[15:10:26] <specing> Are you a TA?
[15:11:09] <megal0maniac_afk> specing: Haha no
[15:11:16] <megal0maniac_afk> My classmates
[15:53:53] <bss36504> Is it possible to malloc in program space?
[15:54:03] <bss36504> sorry, dumb question. carry on.
[16:17:30] <specing> It is a dumb question and the answer is yes
[16:18:19] <twnqx> Oo
[16:18:30] <twnqx> malloc... in flash?
[16:18:43] <twnqx> which you then can't access by normal C means?
[16:20:21] <specing> its an address space, therefore you can allocate parts of it
[16:20:35] <specing> how usefull that would be ... I don't know.
[16:26:08] <bss36504> It would be weird to consider malloc in flash. I apologize. However, can anybody shed light on this "__progmem__ attribute ignored"
[17:02:27] <naquad> i've got avr dragon connected to m168p, it can be programmed and works like a charm. now how do i debug?
[17:08:51] <bss36504> debugwire I believe.
[17:09:17] <bss36504> Seriously, can anybody shed some light on this "__progmem__ attribute ignored" message? I'm going crazy here...
[17:10:18] <Lambda_Aurigae> it is ignoring a progmem attribute.
[17:22:26] <bss36504> You're pretty sharp, Lambda_Aurigae :P I figured it out.
[17:22:38] <Lambda_Aurigae> good.
[17:22:53] <Lambda_Aurigae> as you never posted any code or anything, there was likely no way for us to figure it out for you.
[17:33:52] <Tom_itx> esp
[17:33:55] <bss36504> Well I was more inquiring if anybody had seen it or had any idea what it meant. Some hunting around gave me an answer after a while, however.
[17:37:51] <anton02> if I had 5v worth of AA batteries and I wanted to control a motor with a microcontroller using PWM, I would have to connect a transistor between the batteries and the motor and then attach the microcontroller to the transistor. This is to prevent the motor from drawing too much current from the microcontroller and instead get it's power directly from the batteries. The microcontroller being attached to the transistor means that it can
[17:38:20] <anton02> ower being received by the motor which as i specified in the requirement is needed.
[17:38:47] <anton02> The question is, what value transistor should I use?
[17:47:39] <Lambda_Aurigae> anton02, well, that depends on the motor.
[17:48:03] <Lambda_Aurigae> how much current does the motor draw?
[17:49:12] <anton02> Lambda_Aurigae: Key specs at 6 V: 120 RPM and 40 mA free-run, 10 oz-in (0.7 kg-cm) and 0.36 A stall.
[17:49:30] <anton02> let's say the batteries output 6V and we're using an atmega328
[17:49:45] <Lambda_Aurigae> so you need a transistor that can handle at least 0.36A....I would overrate to about 0.5A
[17:50:41] <Lambda_Aurigae> http://cq.cx/interface.pl
[17:50:48] <Lambda_Aurigae> http://www.nerdkits.com/videos/motors_and_microcontrollers_101/
[17:50:57] <Lambda_Aurigae> those are good sites to read on this subject.
[17:52:06] <Lambda_Aurigae> on the second one there is a circuit that shows switching a 1A 10V load.
[17:53:18] <anton02> thanks
[17:53:42] <Lambda_Aurigae> now, that will only turn the motor on and off.
[17:53:45] <Lambda_Aurigae> it won't reverse it.
[17:53:53] <Lambda_Aurigae> for reversing you need an H-bridge.
[17:55:56] <Lambda_Aurigae> don't forget that diode across the motor..that's a big needed or you could fry things.
[17:57:34] <anton02> if i use a gearbox though, I could just enable the reverse gear
[17:57:42] <Lambda_Aurigae> yeah, you could.
[17:57:43] <anton02> then I wouldnt need a H-bridge
[17:58:09] <Lambda_Aurigae> I use H-bridge chips or build my own from a bunch of transistors.
[17:58:20] <Lambda_Aurigae> makes the rest of the physical hardware much simpler.
[17:59:17] <anton02> Lambda_Aurigae: why is there a diode in parallel with the motor? http://www.nerdkits.com/videos/motors_and_microcontrollers_101/finalcircuit.png
[17:59:34] <Lambda_Aurigae> reverse emf
[18:00:10] <Lambda_Aurigae> http://cq.cx/interface.pl#12
[18:00:12] <Lambda_Aurigae> read
[18:00:14] <Lambda_Aurigae> it's all in there.
[18:00:21] <Lambda_Aurigae> tells all about the diode.
[18:13:09] <Lambda_Aurigae> the nerdkits site talks about it too....called a flyback diode.
[18:35:16] <clixxIO_> Good morning
[18:35:25] <Lambda_Aurigae> you sicko!
[18:35:32] <Lambda_Aurigae> using that dirty 4 letter G word with morning!
[18:35:36] <clixxIO_> why's that?
[18:35:40] <Lambda_Aurigae> didn't your mommy teach you better?
[18:35:41] <clixxIO_> no
[18:36:32] <clixxIO_> I'm looking at this : https://code.google.com/p/picoboot/
[18:36:45] <clixxIO_> http://nerdralph.blogspot.ca/2014/01/avr-half-duplex-software-uart.html
[18:58:07] <anton02> are atmega8's or atmega328's more expensive components?
[18:58:36] <anton02> which is more feature rich?
[19:01:02] <Lambda_Aurigae> atmega328 should be more feature rich...newer series.
[19:01:14] <Lambda_Aurigae> and it has 32K flash vs 8K in the atmega8.
[19:01:28] <Lambda_Aurigae> runs faster,,20MHz vs 16MHz.
[19:01:36] <Lambda_Aurigae> has pin change interrupts on all pins too as I recall.
[19:02:01] <anton02> oh ok
[19:02:18] <Lambda_Aurigae> atmega88 is the updated atmega8...
[19:13:55] <naquad> is there such thing as sleep until ISR?
[19:16:23] <anton02> do lithium-ion and alkaline AA batteries both have the same current and voltage output? Is the main difference just that lithium-ion lasts longer?
[19:25:17] <clixxIO_> usually Lithium-Ions output 3.7v, between 3-4v
[19:25:34] <clixxIO_> AA batteries output 1.2 - 1.55V
[19:27:22] <anton02> AA can come in lithium ion
[19:27:27] <anton02> AA is just a size
[19:27:57] <anton02> I just read this: Battery Pack is made by cascading batteries. Usually similar batteries are used. If you want more voltage, they are connected in series. For more current, they are connected in parallel.
[19:28:45] <anton02> This implies that a battery must have a current limit. How do you find out what that is?
[19:29:03] <clixxIO_> aha, but with an AVR, Lithium-Ions work nicely because they output 3-4v which is AVR friendly
[19:29:43] <clixxIO_> you can add a current limiter if you want but you don't necessarily need it
[19:30:01] <anton02> by current limiter do you mean a resistor?
[19:30:38] <anton02> btw which lithium ions output 3-4V? AA sized one output 1.5V
[19:31:49] <clixxIO_> I don't know any Lithium-Ions that output 1.5V but there could be some
[19:33:09] <clixxIO_> most Lithium-Ions output 3.7V, mobile phone batteries, camera batteries, notebook batteries
[19:38:23] <anton02> if you have a voltage source that's too high for a microcontroller, what circuit component do you use to reduce the voltage? A transistor?
[19:38:41] <clixxIO_> usually a regulator
[19:39:37] <clixxIO_> either 3.3V or 5V depending on what you want
[19:40:54] <clixxIO_> but there are other voltages of regulators available as well
[19:42:00] <anton02> never heard of that. is there another word for it?
[19:42:46] <blathijs> anton02: 7805 is a commonly used 5-volt lineair regulator. For more efficiency, you can also look at switching regulators (also often called step-down converters), but those usually consist of multiple components on a small PBC
[19:44:14] <clixxIO_> another name for them is VREG's (voltage-regulators)
[19:45:43] <clixxIO_> but if you are using batteries, you probably don't need to use regulators unless you are needing to read a voltage accurately
[19:46:33] <clixxIO_> and then, it's best to use a thing called a Reference-Voltage IC to give you a stable voltage for comparison
[19:47:09] <clixxIO_> Regulators themselves use/lose power, so with batteries, they don't always help
[19:47:42] <anton02> but if the voltage is too high it would destroy the battery wouldnt it?
[19:47:47] <anton02> i mean the IC
[19:47:49] <anton02> not battery
[19:48:40] <anton02> My setup is that I have two 6V DC motors that I want to control with an atmega328 which has a maximum voltage of 5V
[19:49:33] <anton02> and everything will draw power from the same power source
[19:50:05] <anton02> so I would have to use a regulator, yeah?
[19:50:24] <anton02> Or do you think it would be better to have a separate battery just for the IC?
[19:50:49] <anton02> and use the other batteries for the motors only?
[19:50:59] <clixxIO_> you could. It wouldn't be a bad idea
[19:51:27] <clixxIO_> but you can use capacitors/supercapacitors
[19:51:54] <clixxIO_> a button battery is enough to power an atmega328p
[19:51:54] <anton02> i wonder what a good voltage to supply an atmega328 would be. it says the range is 2-5.5V and I want the chip to run at maximum capacity,
[19:52:34] <clixxIO_> if you want to run it faster, use 5.0v. If it can run slower, use 3.3V
[19:52:34] <anton02> a capacitor may be a good idea
[19:53:19] <clixxIO_> When the motors start, they will bring down the voltage, but once they are going, voltage on the battery will go back up
[19:54:15] <anton02> okay so I'll use two 3.7V lithium-ion batteries in series and have a capacitor to reduce the voltage being supplied to the motors to 6V (from 7.4V). Also a cap to reduce the voltage from 7.4V to 5.0V for the microchip. Does this sound reasonable?
[19:54:22] <clixxIO_> having a 'big' capacitor will allow the processor to ride the voltage changes
[19:54:58] <clixxIO_> capacitors won't reduce the voltage, they just buffer the voltage
[19:55:49] <anton02> oh okay, i misunderstood you at "but you can use capacitors/supercapacitors"
[19:56:28] <clixxIO_> they are like a battery, only work for much less time. They hold less charge than a battery
[19:56:48] <clixxIO_> they are like temporary batteries
[19:57:11] <anton02> yeah so are you saying i should use a vreg along with a cap if i want to go with a single power supply?
[19:57:21] <clixxIO_> yes
[19:57:28] <anton02> And no cap or vreg required if i go with a button
[19:57:43] <clixxIO_> something like that
[19:58:04] <clixxIO_> yes
[19:58:27] <anton02> okay, i guess the button might be the way to go. only downside is that its not rechargable
[19:58:38] <clixxIO_> some are
[19:59:29] <clixxIO_> solar rechargeable led keyrings usually have a rechargeable CR2032 in them. And cost less than the coin-cell-battery alone
[19:59:54] <clixxIO_> just something I discovered
[20:00:04] <anton02> when using a vreg would it dissipate the whole 5.5-7.4V for the IC as thermal energy?so i would waste 1.9V
[20:00:15] <clixxIO_> and you get the bonus solar cell to power that to boot
[20:00:42] <anton02> interesting
[20:02:11] <anton02> P=VI I would waste
[20:02:14] <anton02> from the batteries
[20:02:31] <anton02> 300mA * 1.9V
[20:03:31] <clixxIO_> actually - you gave me an idea I never thought of - I can hack an LED-solar-keyring to power an Attiny
[20:03:47] <clixxIO_> I have to run to the shops - buy another
[20:04:13] <clixxIO_> last one I pulled down, I didn't have a use for and it was just pulled to bits
[20:04:21] <anton02> i cant do it unforunately. needs to be very reliab,e
[20:04:25] <clixxIO_> and the solar cell went in the bin
[20:04:53] <clixxIO_> define reliable
[20:05:15] <anton02> car will be competing against others indoors
[20:05:17] <clixxIO_> you need to learn how to spell 'reliable' first, before you ask for it
[20:05:49] <anton02> i can, it was a typo. The comma is below l on qwerty keyboards
[20:06:08] <clixxIO_> how reliable it is will depend on many factors, including your soldering skills which others have no control over
[20:06:34] <clixxIO_> even the best designs can be let down by bad soldering
[20:07:18] <clixxIO_> but I think you are on the right approach now
[20:10:46] <anton02> clixxIO_: i just searched for CR2032 batteries and apparently they're 3V, not 5V
[20:11:18] <anton02> maybe i should go with a low powered atmega16-L?
[20:12:19] <anton02> if i put two in series, that would give me .5V too much
[20:16:14] <anton02> I just read the spec sheet and at 3V i can get 10mhz which might be good enough
[20:29:42] <Casper> anton02: you sure about 10MHz? from memory avr run at 8MHz at 3.3V
[20:32:41] <anton02> Casper: it says 0 - 4MHz@1.8 - 5.5V, 0 - 10MHz@2.7 - 5.5.V, 0 - 20MHz @ 4.5 - 5.5V
[20:38:13] <Casper> ok
[20:39:06] <Casper> I'll check back the doc for the -20 I have and see what it say... I'm sure I read 8... but if your say 10 then good!
[21:11:42] <clixxIO_> the output voltage of a battery is never fixed. It's always in decline by design
[21:12:42] <clixxIO_> and if you are brave you can run overvoltage, the tolerance is usually about 20%
[21:13:14] <clixxIO_> so if it says 5V, some will run to 7V but others won't. All will run at 5V
[21:13:46] <clixxIO_> it's safer just to go with a lower clock speed and lower voltage
[21:14:05] <clixxIO_> I'd be surprised if 1Mhz was too slow
[21:38:28] <Casper> or just make a small boost smps
[22:59:03] <clixxIO_> and not a bad idea, because the motors will pull down the voltage, but with that, the voltage will always be held up to what the AVR needs
[23:01:31] <clixxIO_> not many motors run at 3V though
[23:01:47] <clixxIO_> not as fast as you probably need
[23:49:43] <sirpatrick> any of you have any weird problems with serial output on linux? I have an AVR outputting a string and it works fine on windows with putty but comes in a weird order or incomplete on linux with both putty and screen
[23:51:09] <Valen> one would imagine that in terms of serial output linux should be the best lol