#avr | Logs for 2013-06-05

Back
[06:06:47] <tomatto> hi
[06:07:07] <tomatto> how could be atmega8 signature this => avrdude: Device signature = 0x535353 ?
[06:14:33] <RikusW> wrong connections
[06:14:48] <RikusW> too high isp clock
[06:14:58] <RikusW> avcc not connected to vcc
[06:15:20] <tomatto> RikusW: Using SCK period of 10 usec
[06:15:31] <tomatto> as usual
[06:15:51] <RikusW> tomatto: check all three
[06:16:26] <tomatto> board is checked, i did some of these before
[06:17:22] <RikusW> try a much lower SCK clock
[06:17:36] <tomatto> avcc is not connected, but it works 3 times before
[06:17:47] <RikusW> avcc should be connected to vcc
[06:18:51] <tomatto> maximal minimum: Setting SCK period to 250 usec
[06:20:12] <tomatto> RikusW: does it matter when other boards works fine? (this avcc to vcc connection)
[06:20:33] <RikusW> won't hurt to try connecting it
[06:21:00] <tomatto> in smd version :(
[06:21:15] <tomatto> ok, i do my best
[06:23:36] <tomatto> thanks for now
[07:22:24] * RikusW just used strncpy instead of strncmp, must have been a type :-P
[07:22:33] <RikusW> typo...
[07:23:26] <Tom_itx> i said that yesterday then looked up the word to find I was wrong :)
[07:23:58] <theBear> hehe
[07:24:19] <Tom_itx> after the school bell rings, we forget so much
[07:25:05] <RikusW> heh
[07:25:56] <theBear> i still remember when i 'finished' school, oh those were happy days
[07:26:24] <theBear> monday tuesday happy days, wednesday thursday happy days oooh, i started wrong and now it's too late
[07:28:14] <twnqx> lol
[07:28:25] <twnqx> you... normally sound too old to remember that :P
[07:29:01] <theBear> these days are our r r r r r's these days are ours \/ OUR HAPPY DAYS ^
[07:29:12] <theBear> huh ? too old to remebmer something ? how does that work ?
[07:29:21] * jadew is gonna have the 10 years highschool reunion one of these days
[07:29:24] <theBear> you suggesting my memory is fading ?
[07:29:39] <theBear> i hope to catch the next one... missed the last.... regrets....
[07:30:08] <jadew> I don't think it's gonna be anything special, but i'm curious how some of the people turned out
[07:30:12] <theBear> recently one of the twins married a friends sister, that was kinda interesting to see him again.... friends i see every once in a while, not that i didn't like the twins, but i aint seen him for a long time
[07:30:29] <theBear> yeah, i just wanna see them, maybe kick the shit out of a couple
[07:30:35] <jadew> lol
[07:31:24] <theBear> not that i didn't then, well, maybe i missed a couple, there's a reason i got called theBear, and it ain't cos i was small in school
[07:32:10] <jadew> so you were the fat guy? :D
[07:32:59] <theBear> fwoooooo, and no, i was near 90kgs of pure muscles, i eats me spinach and fights to the finish
[07:33:06] <theBear> look at them muskles
[07:33:13] <theBear> ug gug gug gug gug
[07:33:18] <theBear> *toot toot*
[08:54:28] <beaky> hello
[08:54:51] <beaky> How does one use a soldering iron
[08:57:44] <kdehl> Hi.
[08:59:39] <kdehl> Heh.
[08:59:50] <kdehl> I'd ask youtube if I were beaky, but it's too late.
[09:00:40] <kdehl> Um. I have a question not too relevant to the topic of this channel, but since there seem to be a bunch of retro people in here, I'll ask anyway.
[09:01:58] <jadew> the interent is a series of tubes
[09:02:10] <kdehl> I just won an IBM PS/2 P75 on an auction site (no, not ebay), and it has a SCSI disk built-in. I assume it's this old 50 or 68-pin cable that one uses for it. Would it work to buy a parallel to SCSI converter, kinda like this to be able to access the drive?
[09:02:16] <kdehl> http://www.ebay.com/itm/Adaptec-MiniSCSI-DB25-Parellel-CN50-Cable-APA-358-STSI-/370782847143?pt=US_Drive_Cables_dapters&hash=item56546140a7
[09:02:26] <kdehl> It seems to be supported in Linux.
[09:03:23] <kdehl> But it has a dsub connector. I've never used those with SCSI. Would it work if I were to buy a dsub to 50-pin flat cable connector?
[09:05:39] <specing> < beaky> How does one use a soldering iron
[09:05:43] <jadew> sounds like a PITA
[09:05:43] <kdehl> I wish there were cheap usb to SCSI adapters, but the ones I find on ebay are around $100, which is way more than I paid for the computer itself.
[09:05:51] <kdehl> PITA?
[09:05:55] <specing> I think it is reasonable to say he has room temperature IQ
[09:05:56] <jadew> pain in the ass
[09:06:06] <jadew> kdehl, why do you want to do it anyway?
[09:06:11] <jadew> isn't the PC working already?
[09:06:12] <kdehl> Immoral Traffic Persons (Prevention) Act, Prostitution in India, according to Wikipedia.
[09:06:18] <kdehl> It's working, yes.
[09:06:24] <jadew> so why?
[09:06:25] <kdehl> It's a 486DX-33.
[09:06:34] * thetruthisoutthe steps out of an event horizon in midair waving hi
[09:06:45] <kdehl> Nostalgia. A friend of mine's father had one when we were kids.
[09:06:59] <kdehl> I'm going to run NetBSD on it.
[09:07:02] <thetruthisoutthe> huge CRT monitor brought in from cold, and turned on, died right?
[09:07:39] <jadew> kdehl, yeah, but why would you want to run the HDD outside of the PC?
[09:08:02] <thetruthisoutthe> all 3 fuses are ok now, high voltage ok, but not displaying meaningful picture
[09:08:17] <jadew> even if it's scsi, I wouldn't expect it to be fast enough for modern standards
[09:08:19] <kdehl> Oh. Heh. Well, the floppy is broken (probably just needs to be cleaned out), but I want to dump whatever is on it before I erase it.
[09:08:30] <jadew> kdehl, ah ha!
[09:08:36] <jadew> then why not go for a null modem?
[09:08:46] <kdehl> And if that costs me $20 on ebay, it's fine with me.
[09:09:12] <kdehl> jadew: Only DOS is installed, I can't even start an installation without getting to the hard drive first.
[09:09:12] <jadew> kdehl, you can copy stuff using a null modem cable (still on the paralel port)
[09:09:16] <kdehl> True that.
[09:09:22] <kdehl> I wanted to dd though.
[09:10:05] <jadew> the null modem approach sounds less risky :)
[09:10:24] <jadew> I'm sure that if you'd damage the controller board, you'd have a hard time fixing it / finding a replacement
[09:11:00] <kdehl> Well, like I said, I can't even start the installation of an OS without putting stuff on the computer to begin with.
[09:11:19] <kdehl> And since I can't use the floppy, I need to take out the hard drive.
[09:11:51] <jadew> I'm fairly sure you can download FX (an old null modem client) with out having it there already
[09:11:58] <jadew> IIRC they have instructions for that in the help files
[09:12:21] <jadew> I guess the challange is in finding FX :)
[09:12:21] <RikusW> get an 8029 ISA network card ?
[09:12:34] <kdehl> RikusW: PS/2, it's microchannel.
[09:12:34] <jadew> RikusW, what would he do about the driver?
[09:12:42] <kdehl> That too.
[09:12:42] <kdehl> Heh.
[09:13:15] <kdehl> Hm. It has windows 3.1 installed. Maybe you could download files via null modem that way...
[09:13:34] <kdehl> To be honest, I haven't received the computer yet. It waits for me at a friend's house.
[09:14:03] <kdehl> I thought I should buy all the stuff I need so that I have it once I get the computer.
[09:14:03] <jadew> kdehl, FastLynx is the program I'm talking about
[09:14:32] <jadew> ah, Windows 3.1 might have something for null modem already in there
[09:14:53] <jadew> http://www.youtube.com/watch?v=GDW7z3yCUxs
[09:14:53] <jadew> YouTube: FastLynx 2 Remote Upload
[09:15:02] <kdehl> Ah.
[09:15:04] * kdehl checks
[09:15:44] <RikusW> #AncientVeryoldResource channel ? :-P
[09:15:47] <kdehl> Hah. I remember that program.
[09:16:13] <kdehl> RikusW: Oh, we're not even getting close... We're still in the 90s...
[09:16:36] <jadew> which is 20 years ago :P
[09:16:40] <jadew> and the last millenium :P
[09:18:23] <kdehl> ctty! I had no idea you could change the standard I/O in DOS.
[09:18:51] <kdehl> Well, there you go.
[09:19:18] <jadew> how big is the HDD?
[09:19:20] <kdehl> I should be able to load install files this way for NetBSD, at least.
[09:19:26] <kdehl> Dunno. Think it's about 500 MB.
[09:19:36] <jadew> oh, that's big
[09:19:36] <kdehl> But whatever, if it takes a day or two, I don't mind. Heh.
[09:19:57] <jadew> it won't take that long
[09:19:59] <kdehl> Yup. It's a high-end computer for sure.
[09:20:08] <RikusW> *was
[09:20:12] <jadew> I have an IBM PC too, my first one
[09:20:29] <jadew> it originally had a 100Mb SCSI hdd
[09:20:37] <jadew> mine was a 486sx
[09:20:41] <jadew> *is
[09:21:07] <jadew> I added another 200Mb hdd when I was a kid
[09:21:31] <jadew> one thing never changed since then, even now I run out of space and I have to delete stuff
[09:22:30] <jadew> maybe someday we'll have storage devices so big we won't have to ever worry about running out of space
[09:23:56] <jadew> but we haven't had a jump in storage size in a while, seems like technology got stuck in the few TB range
[09:24:34] <jadew> I guess the shift to SSD might get us there, but we'll have to go trough the same stuff we did with the magnetic disks
[09:34:27] <thetruthisoutthe> jadew <= the magnetic storage tech used now is limited to a few TB
[09:35:38] <thetruthisoutthe> btw hitachi made the 4TB disk possible, then retired
[09:36:00] <jadew> probably because the disks sucked
[09:36:32] <jacekowski> 4TB drives just have extra platters
[09:36:41] <jacekowski> not so much a density increase
[09:37:06] <Badaboom> morning
[09:37:28] <jadew> anything in the TB range is not meant to store important data
[09:37:34] <thetruthisoutthe> https://www1.hgst.com/hdd/technolo/gmr/gmr.htm
[09:37:41] <thetruthisoutthe> http://arstechnica.com/gadgets/2007/10/hitachi-unveils-new-spin-on-old-hard-drive-technology-promises-4-terabyte-drives-by-2011/
[09:38:12] <thetruthisoutthe> hitachi made a GMR...
[09:38:19] <jadew> I want the 2TB SSD
[09:38:24] <thetruthisoutthe> sure
[09:38:25] <jadew> so I can afford a 250Gb one
[09:38:27] <jacekowski> jadew: same size limitations
[09:38:40] <jacekowski> jadew: 250GB samsung 840 are cheap
[09:39:00] <jadew> I'll look them up
[09:39:01] <jadew> thanks
[09:39:40] <tomatto> what is recommended VCC for atmega8/16 ?
[09:39:46] <jadew> 5V
[09:40:40] <jadew> I think there's a series that can work down to 2.8 or similar
[09:40:51] <Badaboom> afternoon?
[09:40:52] <jadew> they should have L at the end I think
[09:40:56] <jadew> Badaboom hi
[09:41:04] <Badaboom> :)
[09:41:05] <tomatto> is 5.5V not destructive?
[09:41:07] <thetruthisoutthe> those work down to 3.3V
[09:41:08] <twnqx> thetruthisoutthe: s/retired/sold/
[09:41:20] <Badaboom> eol?
[09:41:27] <jadew> tomatto, haven't tried it, you have to check the absolute maximum ratings
[09:41:33] <twnqx> no. hitachi was bought by WD
[09:41:44] <jadew> so both crappy companies
[09:41:50] <Badaboom> who bought motorola?
[09:41:53] <twnqx> then WD had to spin out parts of them again for reasons
[09:42:04] <Badaboom> the semiconductor devision?
[09:42:14] <twnqx> several, i think
[09:42:21] <tomatto> jadew: absolute maximum rating is 6V, but can cause permanent damage
[09:42:21] <twnqx> i found traces recently in ON Semi
[09:42:28] <Badaboom> ahh ok
[09:42:42] <thetruthisoutthe> hitachi got bored being leader in hdd technology
[09:43:09] <jadew> I have yet to see a HDD I can trust
[09:43:19] <jadew> it seems the recent philosophy is "redundancy"
[09:43:20] <thetruthisoutthe> unfortunately none can be trusted
[09:43:26] <jadew> if you don't use RAID, you'
[09:43:30] <jadew> you're screwed
[09:43:41] <thetruthisoutthe> even a hitachi can develop bad sectors ;/
[09:43:47] <twnqx> all can
[09:43:49] <jadew> my 20 years old IBM hdd is still working
[09:43:51] <twnqx> raidz2 <3
[09:43:54] <twnqx> sure
[09:43:57] <twnqx> the smaller the disk
[09:44:00] <thetruthisoutthe> haha
[09:44:02] <twnqx> the larger the structures
[09:44:02] <thetruthisoutthe> haha
[09:44:07] <twnqx> the less likely the failure
[09:44:20] <thetruthisoutthe> a few hairs and a little dust does not matter in those
[09:44:32] <jadew> thetruthisoutthe, yeah :P
[09:44:44] <jadew> I saw opened up ones working properly
[09:44:50] <thetruthisoutthe> talking about hairs lol
[09:45:05] <thetruthisoutthe> i have found some technician hair inside a quantum hdd
[09:45:17] <jadew> heh
[09:45:20] <thetruthisoutthe> seal was broken by me
[09:45:21] <thetruthisoutthe> !
[09:46:05] <jadew> I guess manufacturing hdds was a job you could do from home, in the kitchen, back then
[09:46:17] <thetruthisoutthe> definitely
[09:46:22] <jadew> "I'll be working from home today!"
[09:46:45] <thetruthisoutthe> now wonder why maxt0r and quantum hdds went bad so easily
[09:47:34] <thetruthisoutthe> hey granny, after you done cooking rice would you put together a few maxtor hdds ?
[09:48:33] <jadew> I think the process is automated now, but I'm sure they're not doing their best
[09:49:01] <thetruthisoutthe> in china there may not be a machine for everything
[09:49:05] <jadew> like... if they really wanted, they could probably come up with a good 2Tb hdd, it would just be expensive
[09:49:45] <thetruthisoutthe> consumer grade...
[09:49:51] <thetruthisoutthe> not rocket science
[09:50:55] <tomatto> can work mega8/16 work with 5.5V safely when absolute maximum rating is 6V?
[09:51:29] <thetruthisoutthe> yes
[09:51:51] <thetruthisoutthe> it can even be overclocked better
[09:59:20] <Gumboot> I was under the impression (from a quick google search) that AVR had a hardware multiplier; but I can't coax avr-gcc into using it. Have I got the wrong idea, there?
[09:59:59] <thetruthisoutthe> try using '*' operator
[10:00:24] <Gumboot> It either calls a library function or it tries to break it down to shifts and adds.
[10:00:37] <thetruthisoutthe> because it is 8 bit architecture
[10:00:51] <Gumboot> My operands are 8 bits each.
[10:00:51] <thetruthisoutthe> and you want to multiply more bits
[10:00:56] <thetruthisoutthe> ok.
[10:01:04] <Gumboot> One's a constant.
[10:01:06] <thetruthisoutthe> you multiply 8 bit by 8 bit, what is the result?
[10:01:10] <Gumboot> 16 bits.
[10:01:20] <jadew> the restul is 8 bit
[10:01:25] <Gumboot> ouch!
[10:02:04] <jadew> the reason why it might call library functions is because one might be a floating point number or if it's a 16bit operand
[10:02:54] <jadew> 16bitVar * 2 is a 16bit operation
[10:03:02] <Gumboot> Yeah, no, the AVR instruction set PDF I just pulled from Atmel says it's 8x8->16.
[10:03:46] <jadew> are you using ASM?
[10:03:47] <thetruthisoutthe> well sometimes shit happens with gcc
[10:03:51] <Gumboot> (r1:r0) <- Rd * Rr -- it's exactly what I want. uint16_t t = (uint8_t)x * (uint8_t)CONSTANT;
[10:03:57] <Gumboot> I'm using avr-gcc.
[10:04:16] <thetruthisoutthe> like i had to inline asm some sse instructions to forbid gcc call some lame libs
[10:04:16] <Badaboom> That was fun
[10:04:18] <jadew> well, in C 8bit * 8bit = 8bit
[10:04:55] <Gumboot> In C everything is promoted to int. An 8-bit int isn't legal... but maybe that's what avr-gcc uses anyway?
[10:05:11] <thetruthisoutthe> typecast.
[10:05:30] <Badaboom> jadew: before we split i asked if maybe you would help with that programmer if you have free time this weekend
[10:05:35] <Gumboot> uint16_t t = (uint16_t)(x & 0xff) * (uint8_t)CONSTANT; ?
[10:05:53] <jadew> Badaboom, if I have time, sure
[10:05:55] <thetruthisoutthe> you missed a typecast
[10:06:02] <thetruthisoutthe> possible confucion?
[10:06:02] <Badaboom> thanks:)
[10:06:09] <jadew> nope, that operation is fine
[10:06:13] <Gumboot> Basically I tried throwing a few different idioms at gcc and then thought maybe it was configured to compile some older version of the AVR instruction set that lacked multiply or something.
[10:06:19] <jadew> the result will be uint16_t
[10:06:44] <jadew> Gumboot, ah, yeah, that's possible
[10:07:04] <jadew> however, you're not multiplying 8 by 8 in there
[10:07:09] <jadew> you're multiplying 16 by 8
[10:07:17] <thetruthisoutthe> note that this will not get compiled
[10:07:20] <thetruthisoutthe> ...
[10:07:30] <jadew> sure it will
[10:07:32] <thetruthisoutthe> it is an initializer
[10:07:43] <jadew> x is not a constant
[10:07:57] <thetruthisoutthe> if you know all values, it will just be initialized to a value
[10:08:00] <jadew> so the result has to be processed at runtime
[10:08:21] <thetruthisoutthe> x is unknown?
[10:08:42] <jadew> I suppose, otherwise he wouldn't & 0xFF it
[10:09:00] <Gumboot> Sure x is unknown. It's still valid C even if it's not a constant; however if avr-gcc has some limitation then I have to admit I didn't actually try it as an initialiser. I just wanted to express it in here as a single line.
[10:09:01] <thetruthisoutthe> but still
[10:09:02] <jadew> I guess he might have tried with different types
[10:09:13] <thetruthisoutthe> you multiply a 16 bit number with a 8 bit number...
[10:09:27] <jadew> yep
[10:09:27] <thetruthisoutthe> (uint16_t)(x & 0xff) first operand...
[10:11:00] <thetruthisoutthe> (uint8_t)x * (uint8_t)CONSTANT; will not do ?
[10:11:12] <Gumboot> That's what I'm using now.
[10:11:22] <thetruthisoutthe> the high byte is dropped automagically
[10:11:26] <Gumboot> It makes a huge list of shifts and adds.
[10:11:34] <Gumboot> I do want the high byte.
[10:11:44] <thetruthisoutthe> no you discarded it
[10:11:51] <thetruthisoutthe> (x & 0xff)
[10:11:57] <Gumboot> Oh, yes, correct.
[10:12:00] <Gumboot> I want the high byte of the result.
[10:12:15] <jadew> Gumboot, it won't happen
[10:12:32] <jadew> you could probably do it in ASM tho
[10:13:25] <jadew> also, the shifts you're seeing there
[10:13:29] <Gumboot> It looks like sdcc can do it -- but for 8051 instead.
[10:13:33] <jadew> is probably an artefact of optimisation
[10:13:42] <jadew> depending on your constant
[10:13:48] <thetruthisoutthe> i'm not even sure what your problem is
[10:13:50] <Gumboot> mul is two cycles, and the shifts are dozens. That's not much of an optimisation.
[10:13:53] <jadew> gcc might think it's faster to shift it x bits and then do something
[10:14:08] <jadew> but that particular AVR might be able to only shift once
[10:14:14] <jadew> so you'll end up with even crappier code
[10:14:43] <thetruthisoutthe> yes.
[10:14:45] <thetruthisoutthe> you multiply by 8, gcc can shift instead.
[10:14:45] <Gumboot> thetruthisoutthe: I have a pair of 8-bit values, and I want to multiply them together to get a 16-bit result, and I don't want the compiler to make hideously inefficient code.
[10:15:12] <thetruthisoutthe> optimizations enabled?
[10:15:28] <thetruthisoutthe> -O3 makes the fastest code
[10:15:34] <thetruthisoutthe> (or breaks it)
[10:16:42] <Gumboot> Looks like I need -mmcu=XXX; what's a safe bet for XXX which will definitely have a multiplier?
[10:17:05] <thetruthisoutthe> no
[10:17:16] <thetruthisoutthe> you want that for your part you actually want to run on
[10:18:42] <Gumboot> I have no parts. I'm just trying to check that my code is building efficiently on various platforms.
[10:18:50] <jadew> Gumboot, are you sure the result will get promoted tho? I haven't personally tried it, but given the fact that it's an 8bit mcu, I'm skeptical
[10:18:52] <thetruthisoutthe> oh cool
[10:20:19] <thetruthisoutthe> try -mmcu=atmega168
[10:21:46] <Gumboot> Well, C says they all become int, and C also mandates that int be at least 16 bits.
[10:22:12] <jadew> ah ha, that's something I didn't know
[10:22:17] <Gumboot> It's the compiler's job to do whatever optimisation and truncation it likes, so long as it behaves as if it were a conformant implementation.
[10:22:33] <jadew> I tend to use the uintxx_t types and avoid overflowing them
[10:22:38] <thetruthisoutthe> yes, you enter a number and gcc will decide it as int unless otherwise stated
[10:22:41] <Gumboot> However, there are no guarantees when people start tweaking things to make it more efficient.
[10:23:41] <thetruthisoutthe> using int is not portable...
[10:25:10] <thetruthisoutthe> int is cool for function error codes
[10:27:07] <Gumboot> I'd like to think that the compiler will auto-size ints after analysing the code thoroughly.
[10:27:20] <Gumboot> But that's bound to fail 80-90% of the time.
[10:27:42] <thetruthisoutthe> sure it will size int to int
[10:28:11] <jadew> if it would do that you'd end up with unpredictable behaviour
[10:28:18] <jadew> and sizeof(int) wouldn't work
[10:31:31] <Gumboot> Well, it only needs to behave as if it were conformant. It's free to lie to you.
[10:31:53] <jadew> that would break tons of stuff
[10:31:54] <Gumboot> For example; int i ; for (i = 0; i < 128; i++) ... ;
[10:32:06] <Gumboot> That could use an 8-bit register for i, and simply not tell anybody it was doing so.
[10:32:13] <jadew> for one, you couldn't copy memory anymore
[10:32:44] <Gumboot> Anyway; setting the right architecture did make gcc produce mul instructions.
[10:33:08] <Gumboot> And it seems approximately right in the way it used them.
[10:33:43] <thetruthisoutthe> uint64_t i ; for (i = 0; i < 128; i++) this is much more predictable
[10:33:49] <Gumboot> It did, however, compute three sequential addresses using six ldi instructions, rather than doing anything sensible like incrementing the base address.
[10:34:46] <thetruthisoutthe> what is the problem?
[10:35:38] <thetruthisoutthe> (again)
[10:38:04] <tzanger> wait, you can optimize better than the compiler? *shock*
[10:40:02] <jadew> sometimes it's pretty hard to match the compiler, especially for size optimizations
[10:41:08] <jadew> when it starts calling chunks of code from a different function, you're out of the game
[10:41:26] <thetruthisoutthe> i think in most cases it is hard to do so
[10:41:29] <Gumboot> thetruthisoutthe: compile this efficiently: http://pastebin.com/qfHtmmue
[10:41:29] <Gumboot> For that function the compiler came out a lot less disappointing than I feared.
[10:41:29] <Gumboot> But I think it could still do better.
[10:42:16] <tzanger> jadew: nah, that's what us old timers used to do
[10:42:25] <tzanger> that and self-modifying code althrough that's not as easy in flash :-)
[10:43:27] <jadew> I'm farily sure I've done it too, but not at the same level a good compiler can do it
[10:43:32] <thetruthisoutthe> Gumboot <= i have absolutely no interes in doing anything with that code
[10:43:35] <thetruthisoutthe> t
[10:44:42] <Badaboom> You know why i got into electronics, AVR's etc....Fun and Enjoyment
[10:45:13] <jadew> I think that's why everyone got into it :)
[10:45:18] <Badaboom> :)
[10:45:48] <Badaboom> Im thinking to turn that display into an altimeter btw
[10:46:00] * jadew has one on his watch :P
[10:46:10] * Badaboom does too:)
[10:46:23] <Gumboot> And that's why you'll never run Firefox on an AVR, eh? The Javascript JIT takes too long to update the flash.
[10:46:23] <Gumboot> thetruthisoutthe: That was the answer to your question. The problem (again) was to get the compiler to not screw that function up.
[10:46:24] <Badaboom> well that and my skydiving one
[10:47:40] <Gumboot> I got into it for the girl!
[10:47:40] <Gumboot> s
[10:48:07] <jadew> ah, that's why I got into programming
[10:50:14] <jadew> chicks love dudes that work from home, in their underwear, unshaved for weeks
[11:12:27] <RikusW1> megal0maniac_afk: I just did some simple code for toying around with HC-SR04 ultrasonic sensors
[11:12:37] <RikusW1> want it ?
[11:14:02] <RikusW1> megal0maniac_afk: http://pastebin.com/jzVwjCJe
[11:17:16] <RikusW> zlog:
[11:22:22] <darkPassenger> hello all
[11:33:52] <RikusW> jadew: the avr-gcc compiler aren't all that good....
[11:34:09] <RikusW> I've taken usb cdc code from 5k to 800 bytes when using asm
[11:34:31] <RikusW> avr-gcc does some really really stupid things sometimes
[11:35:05] <RikusW> like it doesn't properly use the pointer registers...
[11:36:03] <Gumboot> I noticed that myself. I tried giving it a big fat hint by taking a pointer to the static data structure as a local variable, and referencing things through that.
[11:36:11] <Gumboot> Const propagation stepped in and de-optimised it.
[11:37:28] <RikusW> I ended up writing a few thousand lines of asm instead of using avr-gcc
[11:57:07] <beaky> hello
[12:00:21] <beaky> when should I use a different package from DIP?
[12:07:23] <Gumboot> Did I mention, by the way, that that code should be a speedy pass-nearly-every-randomness-test implementation of rand() ? Or at least, it would be if GCC pulled its weight.
[12:08:05] <Gumboot> (simultaneously much faster, and much more random)
[12:15:57] -calvino.freenode.net:#avr- [freenode-info] help freenode weed out clonebots -- please register your IRC nick and auto-identify: http://freenode.net/faq.shtml#nicksetup
[12:22:24] <TechIsCool> nice net split
[12:23:53] <beaky> wow
[12:44:05] <ambro718> I have a register with the bits 00000001, what is the fastest way to change it to 10000000?
[12:44:56] <ambro718> lsr+ror works, but can it be done in one instruction? Assume I can't use ldi and other immediate operand instructions.
[13:04:10] <RikusW> why not use ldi ?
[13:04:58] <Badaboom> its bad
[13:05:05] <Badaboom> jk
[13:05:11] <ambro718> because you can't use it on r0-r15
[13:06:07] <RikusW> ldi r16,0x80 mov r5,r16
[13:07:00] <RikusW> AVR is RISC not CISC
[13:07:07] <ambro718> I was asking for one instruction ;)
[13:08:22] <RikusW> you'll have to use 2
[13:08:24] <beaky> what are avrs bad for?
[13:08:26] <RikusW> or use a high register
[13:08:28] <ambro718> I'm optimizing a 32-bit sqrt, here's what I have right now http://ideone.com/vPhsY2 . It's the exact same algorithm as used here [1] but I've unrolled it and optimized specific iterations. http://www.mikrocontroller.net/articles/AVR_Arithmetik#avr-gcc_Implementierung_.2832_Bit.29
[13:10:37] <ambro718> e.g. in some iterations some halves of 16-bit values are known to be zero so I could throw away some instructions
[13:12:07] <ambro718> I'll probably continue by adding a lookup table but I have yet to figure out how that would work
[13:57:43] <jacekowski> ambro718: SBR
[13:58:15] <jacekowski> ambro718: it's one clock cycle single instruction
[13:59:08] <jacekowski> and then you just do CBR
[14:07:45] <HappyPonyLand> hi
[14:08:15] <HappyPonyLand> have I understood this right: if I want to set an input pin, I need to ground it?
[14:08:23] <jacekowski> no
[14:09:53] <HappyPonyLand> I gave it +5 yesterday and it seemed to work :|
[14:10:05] <HappyPonyLand> I had to move my breadboard, I wonder if I broke the circuit somehow
[14:38:50] <RikusW> https://www.youtube.com/watch?v=PtYOx0_4jZg
[14:38:55] <RikusW> nice pets....
[14:54:47] <HappyPonyLand> http://pastebay.net/1237788
[14:54:56] <HappyPonyLand> I have a LED on PB0
[14:55:35] <HappyPonyLand> the LED lights up by just _touching_ PC0
[14:55:54] <HappyPonyLand> even if there's nothing at the other end of the wire
[14:56:06] <HappyPonyLand> did I damage the avr somehow?
[14:56:53] <jadew> that's normal
[14:57:05] <jadew> PORTC is floating
[14:57:20] <HappyPonyLand> but I zeroed it
[14:57:23] <HappyPonyLand> I think ... ?
[14:57:33] <jadew> so the pins go high and low based on whatever happens around them
[14:57:36] <jadew> you haven't
[14:57:42] <jadew> DDRC = 0; means they're all inputs
[14:57:53] <jadew> PORTC = 0; means that the pullup is not enabled
[14:58:17] <jadew> so they're in a high impedance mode
[14:58:26] <jadew> you can easily drive them to either 0 or 1
[14:58:59] <HappyPonyLand> hm, ok
[14:59:02] <HappyPonyLand> it's 0xFF now
[14:59:12] <HappyPonyLand> and the LED is always on
[14:59:54] <jadew> do you have PC0 tied to ground?
[15:00:24] <HappyPonyLand> if I ground it the LED goes out
[15:00:26] <jadew> what did you make 0xFF?
[15:00:32] <HappyPonyLand> PORTC
[15:00:35] <jadew> k
[15:01:00] <jadew> I think you put the led the other way around
[15:01:18] <jadew> it's from vcc to the PB0, isn't it?
[15:02:00] <HappyPonyLand> yes
[15:02:10] <jadew> so everything is working properly
[15:02:50] <HappyPonyLand> I wired it according to a guide
[15:02:56] <HappyPonyLand> and it works with the example program
[15:21:06] <HappyPonyLand> https://sites.google.com/site/qeewiki/books/avr-guide/digital-inputs
[15:21:15] <HappyPonyLand> this says the inputs should be grounded
[15:21:21] <HappyPonyLand> or am I misunderstanding it?
[15:27:23] <ambro718> HappyPonyLand: either use a pull-up resistor (connecting VCC and the pin) and hook the switch to ground, or use a pull-down resistor and connect the switch to VCC. That is assuming you don't use the built-in pullup. What is the problem you're having?
[15:28:19] <ambro718> it's easy to apply ohm's law to see that with a pullup, the input will read low when switch is pressed and high when released, and the converse when using a pulldown
[15:28:31] <HappyPonyLand> I'm not sure. I think I missed something crucial in the logic
[15:28:50] <HappyPonyLand> now I have enabled the pullup and made the LED light when the pin is low
[15:28:59] <HappyPonyLand> so it works when I wire it to ground
[15:29:12] <ambro718> that's how it's supposed to be
[15:29:27] <HappyPonyLand> ok, great
[15:29:36] <HappyPonyLand> that was my initial question, but maybe it was badly phrased
[15:29:45] <HappyPonyLand> I'm probably to tired for this right now
[15:36:01] <megal0maniac> Good grief, Freenode has been slightly fragile lately it seems :/
[15:36:48] <megal0maniac> Oh look. A message. Apparently Freenode is under attack
[15:36:51] <DagoRed> You're being nice.
[15:37:07] <megal0maniac> "Welcome to Splitville, Population: Shrinking"
[15:37:11] <DagoRed> Freenode is terrible recently.
[15:37:12] <megal0maniac> DDoS attack
[15:37:26] <DagoRed> Yeah I saw.... why would someone DDoS freenode?
[15:37:40] <twnqx> pissed off because he was banned by a channel?
[15:37:42] <LoRez> people don't like people that help people
[15:37:49] <twnqx> or k-lined for bad behaviour?
[15:46:25] <megal0maniac> Just checked out one of those $2 USB to RS232 cables from eBay. It isn't even RS232, I'm getting 5V high and 0V low :/
[15:46:33] <megal0maniac> On a DB9 connector
[15:50:09] <R0b0t1> Well, RS232 is now 5V.
[15:50:27] <R0b0t1> Basically none of them do +/-12V or +12V/-7V
[15:54:49] <megal0maniac> I thought it might have at least done -5V
[15:55:00] <megal0maniac> Or even just inverted the signal
[15:55:14] <megal0maniac> But it's straight-up TTL
[15:55:44] <megal0maniac> (It's CH430 based, and you do need a MAX something to get RS232
[15:57:51] <megal0maniac> Ironically, this is exactly what I need :)
[16:00:50] <[z_z]> I'm getting a warning: dereferencing pointer 'hf' does break strict-aliasing rules from avr32-gcc... any idea what this is? never seen it before.
[16:04:57] <abcminiuser_> I know!
[16:05:00] <abcminiuser_> Oh, he left
[16:05:38] <abcminiuser_> Today after work I made a novelty MAKE IT RAIN vegas style buzzer thingy for one of our team building games this Friday
[16:05:45] <abcminiuser_> Sure to delight engineers and excite little old gambling grandmas
[16:12:48] <abcminiuser> Well yall are boring tonight
[16:15:20] <LoRez> you're boring
[16:23:52] <megal0maniac> What are little old gambling grandmas doing at Atmel?
[16:24:05] * megal0maniac was being boring afk
[16:24:37] <megal0maniac> I guess we'll never know...
[17:34:26] <jadew> damn botnets
[17:34:42] <jadew> I just blocked 162 ip addresses from my server
[17:34:55] <jadew> they've been making junk requests the whole day
[17:41:07] <jadew> anyone here upgraded from rigol ds1052 to 2072?
[17:41:36] <jadew> I'd like to know if you feel it was worth it
[17:44:13] <Tonelock> is embedded C just programming in C for microcontrollers/embedded systems?
[17:44:22] <Tonelock> or is it a special subset of C?
[17:44:29] <jadew> same thing
[17:44:46] <Tonelock> that's what I thought
[17:44:50] <jadew> there are no subsets of C
[17:45:06] <Tonelock> well, not a subset, but a tailored version
[17:46:07] <jadew> well, the only difference that comes to mind is that in the avr-gcc compiler you get the 0b prefix, to specify binary values
[17:46:35] <jadew> otherwise it's the same language
[17:47:07] <jadew> there might be other changes too, but nothing to worry about
[17:47:24] <Tonelock> ah yeah, I have seen that before
[17:47:33] <jadew> altho, if someone decides to make a different language and call it "Embeded C", that's a different story
[17:48:07] <Tonelock> that is good, I have seen embedded C in job descriptions and wondered what the heck
[17:48:39] <Tonelock> but now I know Embedded C and programming embedded systems in c , is the same thing Tonelock= :)
[18:37:36] <Badaboom> multipass
[18:39:59] <R0b0t1> leeloo multipass
[19:38:05] <seldon> Up to what frequencies can I trust a breadboard for I2C clock speed?
[19:39:28] <Badaboom> Ive heard 16
[19:39:45] <seldon> MHz?
[19:39:53] <Tom_itx> you trust breadboards at all?
[19:40:01] <Badaboom> lmao ^^
[19:40:17] <seldon> Well, they mostly work.
[19:40:36] <Tom_itx> until they randomly don't
[19:40:39] <seldon> Actually, the question is probably more relevant for built-in SPI.
[19:40:54] <seldon> Since you can get up to f_osc / 2 there.
[19:41:12] <Badaboom> Tome has an excellent poing,, mine acts very quirky with the spi
[19:41:31] <Horologium> seldon, I've run up to 20MHz stuff on breadboard.
[19:41:38] <Badaboom> seldon: ive been running one at 8 with minor glitches
[19:42:08] <Horologium> different breadboards behave differently.
[19:42:13] <Badaboom> yes
[19:42:26] <Horologium> new ones are better...as they get older they get corrosion on the contacts which causes errors.
[19:42:43] <Badaboom> then again,, my jumper on the clk isnt the best
[19:43:13] <seldon> So is there a rule of thumb? Something like "if you have problems at frequencies below foo kHz, it's something else"?
[19:43:24] <Horologium> not necessarily.
[19:43:28] <Badaboom> Not really
[19:43:36] <Horologium> move to a different breadboard or up to the other end of the one you are on.
[19:43:55] <Horologium> also look at your pullup resistors on the i2c bus
[19:44:09] <Horologium> move them to a different location on the bus....closer or farther from the master.
[19:45:32] <Badaboom> Horologium: come to think of it,, the cornell video i was refering to does state 20MHZ so i stand corrected
[19:46:14] <Horologium> I have run an 8052 at 33mhz on a breadboard...but wasn't doing a whole lot with it.
[19:46:42] <Horologium> and at that, the breadboard provided all the capacitance I needed for the crystal and didn't have to add the caps to ground for it to run.
[19:46:50] <Badaboom> Board capacitance is also a concern
[19:46:59] <Badaboom> lol
[19:47:12] <Badaboom> U typed that then i looked up after typing what i said
[19:47:47] <seldon> Physics are in sore need of refactoring and simplification.
[19:48:02] <Horologium> what goes up must come down,,,unless it goes up really flippin fast..
[19:48:08] <Badaboom> To many variations in manufacturing
[19:49:16] <seldon> I was really hoping the answer was "as long as you're not doing GHz stuff, don't sweat it."
[19:49:34] <Horologium> keep it to 20MHz or so.
[19:49:45] <Horologium> but it will vary depending on the breadboard.
[19:49:49] <Badaboom> I think its safe to say 20MHZ and 22pf is about correct,, in my opinion,, on an average
[19:50:23] <seldon> Weeell...thinking about SPI again, built-in SPI on AVRs will go no higher than 10MHz without overclocking.
[19:51:14] <seldon> And software I2C will be orders of magnitude slower, so probably no problem there.
[19:51:21] <Horologium> yup.
[19:51:24] <Badaboom> seldon: im running one currently on a beradboard so
[19:51:35] <seldon> \o/
[19:52:19] <Horologium> I'm running 20MHz spi serial sram chips on breadboard.
[19:52:23] <Badaboom> and other than accidently leaving my dying programmer pluged into it and it saying hel o once in a while:)
[19:52:33] <ambro718> oh, does anyone have experience overclocking (beyond 20MHz which my atmega1284p is spec'd for)?
[19:52:38] <Horologium> clocking them out to generate vga video.
[19:52:50] <seldon> Timing stuff throws me for loops sometimes. I'm a code monkey at heart; all this real-world stuff confuses and frightens me.
[19:53:42] <seldon> There's a video on youtube somewhere where someone clocks an atmega to 51 MHz before it does funky stuff. Although how early you get funky stuff will very likely depend on your circuit.
[19:53:48] <Horologium> how can you write efficient code if you don't know how the hardware works?
[19:53:50] <tomatto> must be external capacitor at AREF pin 100nF or it can be 120nF?
[19:54:24] <Horologium> seldon atmega32 runs well at 20mhz but the ADC has issues.
[19:54:42] <Horologium> and eeprom can be finicky if overclocked much over spec.
[19:54:52] <Horologium> tomatto, 120 should be fine.
[19:55:08] <Horologium> its mostly for smoothing.
[19:56:14] <tomatto> Horologium: and capacitor with inductor to AVCC can be 120nF and 4.7uH?
[19:56:28] <seldon> You don't want to think about hardware details during development or you'll mess up the big picture. And when your profiler tells you where to optimise, you usually kind of assume that someone else sorted the difficult stuff out for you when the computer was built, so you can work with abstractions.
[19:56:40] <seldon> How long running to RAM will take doesn't concern you, just that it'll take longer than running to cache.
[19:56:44] <Badaboom> seldon: what ever you do make sure if your ordering a crystal for external clocking you get the rite load capacitance
[19:57:27] <Horologium> seldon, that kind of thinking is why we have microsoft windows that takes longer to boot on a 3GHz machine than windows95 took on a 60MHz machine.
[19:57:28] <Badaboom> Example: digikey to my knowledge doesnt sell the recommended 16mhz xtal at 22pf load cap
[19:57:29] <ambro718> AVRs have caches?
[19:57:42] <Badaboom> they sell 20pf
[19:58:36] <Badaboom> Itll do the job well enough from what ive learned tho
[19:58:37] <Horologium> let's abstract the abstracted abstract of how the processor works...how many levels of abstraction are there between visual basic and the actual hardware underneath anyhow?
[19:59:08] <tzanger> oh we can abstract it all the way
[19:59:34] <tzanger> we can abstract it so completely that it becomes impossible to tell what we're abstracting
[20:00:04] <Badaboom> sounds painful
[20:00:36] <seldon> Abstraction doesn't necessarily incur runtime overhead. In any case, the reason that windows doesn't boot in a microsecond today is that it does a lot more than win95 did (whether all it does is useful is a different matter) and that the main bottlenecks in boot time are not CPU-related.
[20:00:40] <tzanger> when you start overclocking you start getting restricted to using the execution unit as the peripherals start giving out
[20:00:42] <seldon> It's the hard disk.
[20:01:50] <ambro718> why do people seem to like Microsoft so much here?
[20:01:58] <Horologium> hehe.
[20:01:59] <ambro718> there's no reason computers need hard disks
[20:02:25] <ambro718> Linux can boot perfectly fine without any kind of persistent storage :D
[20:02:57] <Badaboom> Yeah i agree,, screw media and file storage
[20:03:28] <seldon> There's a lot of nonsense in Windows (especially the latest iteration), but booting from disk is not it.
[20:04:59] <seldon> And I'm not convinced booting windows from tftp would be any faster :P
[20:06:07] <Badaboom> Naa, punchcards:)
[20:06:16] <seldon> That's persistent storage.
[20:06:27] <Badaboom> lol,, i know,, im such an ass
[20:06:36] <seldon> And I'd like to see you boot linux from punchcards :P
[20:06:41] <Badaboom> lol
[20:06:43] <seldon> See you next month!
[20:06:47] <Badaboom> lmao
[20:07:11] <seldon> Although with windows 8 it would be "see you next decade."
[20:07:32] <Badaboom> I havent had the displeasure of 8 yet
[20:12:29] <Horologium> seldon, just about as fast as booting linux from an sd card on a 20MHz avr.
[20:13:01] <seldon> Gnah.
[20:13:02] <Horologium> and, yes, it is possible.
[20:13:10] <seldon> the arm emulation stuff?
[20:13:15] <Horologium> arm emulator running on an avr
[20:13:17] <Horologium> yeah.
[20:13:24] <Horologium> I tried it, just for the fun of it.
[20:13:32] <seldon> Did it boot yet?
[20:13:37] <Horologium> months ago.
[20:13:57] <Horologium> if we hadn't had company for dinner a couple months ago it would have an awesome uptime.
[20:14:03] <Horologium> I did it on the dining room table.
[20:14:19] <Horologium> had it run for nearly 20 days when I had to take it down for wife's family to eat.
[20:14:35] <tomatto> capacitor and inductor connected to AVCC to filter noise can be 120nF and 4.7uH instead of 100nF and 10uH?
[20:14:46] <Horologium> tomatto, sure,,,try it.
[20:16:26] <Badaboom> anyone know that musician that does classical,, japanese something like yoy yoy ming err??
[20:16:39] <Horologium> Badaboom, not I. music is evil.
[20:16:55] <Badaboom> It is?
[20:17:01] <Horologium> it is to me.
[20:17:05] <Badaboom> ahh ok
[20:24:06] <tomatto> do someone have working simple mp3/wav player project based on atmega8/tiny85?
[20:24:33] <jadew> can the mega decode mp3 fast enough?
[20:25:20] <Horologium> doubtful.
[20:25:26] <Horologium> there are some that use mp3 decoder chips.
[20:25:40] <Horologium> the atmega just feeds the data to it.
[20:25:58] <jadew> probably an xmega could do it
[20:26:04] <Horologium> probably.
[20:26:27] <jadew> interresting topic tho
[20:26:27] <Horologium> I've converted mp3 to a raw audio file and played that with an atmega.
[20:26:48] <jadew> yeah, that shouldn't be an issue
[20:27:02] <jadew> r2r network + op amp and you have sound
[20:27:37] <Horologium> bah
[20:27:45] <Horologium> pwm audio
[20:27:55] <jadew> heh, does that work?
[20:28:13] <Horologium> http://avrpcm.blogspot.com/2010/11/playing-8-bit-pcm-using-any-avr.html
[20:28:31] <jadew> I imagine the response time wouldn't be that staisfactory, since you need to have rc filter, no?
[20:28:35] <h4x0riz3d> 8bit is gonna sound soo 8bit ;]
[20:29:14] <Horologium> http://hackaday.com/2008/02/07/pwm-audio-generation-with-an-avr/
[20:29:24] <jadew> you can put a small cap to filter out the bit steps
[20:29:34] <jadew> so it would be smoothere
[20:29:39] <jadew> *smoother
[20:29:51] <Horologium> there are plenty of projects out there to do it.
[20:29:59] <h4x0riz3d> is that supposed to make it sound less 8-bit?
[20:30:01] <Badaboom> looked like smoothie for a sec there'
[20:30:12] <jadew> h4x0riz3d, yeah
[20:30:36] <jadew> as long as you're outputting the wave at a decent speed and the sine is not made out of steps, it could sound nice
[20:30:57] <h4x0riz3d> what sine?
[20:31:06] <jadew> the sound wave
[20:31:08] <Horologium> http://www.atmel.com/Images/doc32173.pdf atmel appnote on mp3 player.
[20:31:22] <h4x0riz3d> you gonna play a sine wave with it?
[20:31:37] <jadew> isn't that how audio playback works?
[20:31:47] <h4x0riz3d> nope
[20:31:48] <Valen> magic sine waves
[20:32:08] <h4x0riz3d> it's a complex signal
[20:32:10] <Valen> "1 bit DAC" basically is PWM
[20:32:16] <jadew> h4x0riz3d, exactly
[20:32:32] <h4x0riz3d> there's no sine wave in a metalica song ;]
[20:32:45] <jadew> well, I meant the wave and the fact that it has to be round
[20:33:00] <jadew> with out square elements, which might give it the 8bit feel
[20:33:09] <Valen> if its a metalica song you don't need much in terms of quality to re-create it ;-P
[20:33:32] <h4x0riz3d> yeah, metalica song converges towards noise ;]
[20:33:42] * Badaboom thinks its time for boots in here
[20:33:54] <Badaboom> Getting deep:)
[20:34:00] <Valen> run your PWM at much higher than an audio frequency, update PWM output also at least 3x the max audio frequency
[20:34:44] <Valen> IE use a high speed PWM part, you can get something like 250 khz PWM out
[20:34:56] <Valen> update that at 44khz or whatever
[20:35:16] <Valen> you would still put an RC filter in, but it should be tuned to 44khz
[20:35:43] <Valen> a slight dithering of the 44khz update rate would also help to kill off any harmonics
[20:35:49] <h4x0riz3d> this sounds so wrong ;]
[20:36:53] <Valen> I just had a blackout so i don't really have any context
[20:37:21] <Valen> but who ever let not knowing whats going on stop them from posting on the internet
[20:37:38] <Horologium> most music is not much better than noise.
[20:37:55] <h4x0riz3d> yup
[20:38:17] <h4x0riz3d> most of it is even annoying
[20:38:40] <h4x0riz3d> amplified noise sounds much nicer ;P~
[20:38:47] * Valen always has the radio on :-<
[20:39:18] <h4x0riz3d> justin bimberlake ;]
[20:39:23] <Horologium> my wife likes the radio or tv or something on.
[20:39:32] <Badaboom> Horologium: FYI it was yo yo ma,, not tat you would care tho:)
[20:39:46] <Horologium> I have a yoyo.
[20:39:51] <Badaboom> https://www.youtube.com/watch?v=KHzfD6XLK7Q
[20:39:51] <Horologium> works rather well too.
[20:39:54] <Badaboom> lol
[20:40:21] <Horologium> only time I listen to music of any kind is when I'm doing woodwork.
[20:40:27] <Horologium> and then it is old country ballads.
[20:40:50] <Badaboom> Ive been favoring the strings lately,, 2 cellos is another good group
[20:41:12] <Horologium> give me a steel guitar, banjo, or fiddle and I'm happy.
[20:41:17] <Horologium> old bluegrass isn't bad.
[20:41:28] <Badaboom> nice, i like bluegrass
[20:41:42] <Horologium> new bluegrass is either unlistenable or rehash of old stuff.
[20:41:56] <Horologium> new country is horrid.
[20:42:06] <Horologium> anything much newer than 1980 I can't stand.
[20:42:12] <Badaboom> you have a woodshop?
[20:42:19] <Horologium> I have woodworking tools in a shed.
[20:42:24] <Horologium> and some in the basement.
[20:42:24] <Valen> "classic hits" for me at the moment
[20:42:36] <Badaboom> nice,, i grew up around wood wroking
[20:42:45] <Valen> I used to listen to the "hip" station when they had a no more than 2 ads in a row thing
[20:43:02] <Horologium> did you hop while listening to hip music?
[20:43:03] <Badaboom> woodworking
[20:43:26] <Valen> but now they have the same 5 minute blocks of ads, and it makes all the R&B whining just not worth it any more
[22:23:18] <tomatto> is it bad idea to connect LED directly to avr without any protecting / (current reducing) resistor?
[22:24:01] <LoRez> yes, unless you plan on PWMing it all the time
[22:26:36] <Casper> tomatto: bad idea, something will eventually fry
[22:26:37] <Valen> LoRez: even then, unless the avr is running at a voltage such that the LED wont be pulling excessive current you risk damage to the LED and or the AVR
[22:26:40] <Casper> the led is a short to the avr
[22:26:58] <Valen> if you are running at 3v or whatever it might be ok
[22:27:03] <Casper> even then
[22:27:15] <Casper> the led Vforward is imprevisible
[22:27:33] <Casper> change from part to part and with the junction temperature and aging
[22:27:36] <Valen> if the current through the led at that voltage (and over the temperature range) is within the AVR drive current it should be ok
[22:27:42] <Valen> comes down to margin
[22:28:15] <Valen> IE if your LED is pulling 5 ma and you are using it as an indicator LED (not a light) I reckon it'll be ok
[22:28:30] <LoRez> the LED will always be pulling excessive current if there's no resistor hooked up to it and it's not PWMed down
[22:28:47] <Valen> PWM only addresses average current, not instant current
[22:29:05] <LoRez> correct, but an LED won't just draw 5mA on its own either.
[22:29:11] <Valen> IE PWM at 5V with a decent LED will blow the AVR even at 1% duty cycle
[22:29:40] <Valen> it will if you are running the AVR at a voltage where the LED's current draw is that
[22:29:57] <Valen> IE run an led with 3.4vf at say 3v