#avr | Logs for 2013-01-01

Back
[00:37:15] <Grievre> MrCurious: Either the Teensy or Arduino Leonardo firmware might do what you want
[00:37:27] <Grievre> I dunno if they work right out of the box for that /particular/ chip
[00:37:30] <Grievre> but you could probably modify them
[01:16:46] <jadew> hey, I'm looking at a datasheet and it's saying: Input High Voltage: min: 0.7Vdd; typ: -; max: -;
[01:17:04] <jadew> and Input Low Voltage: min: -; typ: -; max: 0.3Vdd
[01:17:09] <Grievre> jadew: Link to the datasheet?
[01:17:39] <jadew> now... for 5v, 0.3Vdd is 1.5 and 0.7 is 3.5
[01:17:43] <jadew> http://ww1.microchip.com/downloads/en/DeviceDoc/22272C.pdf
[01:18:06] <jadew> but since 3.5 is minimum for high and 1.5 is maximum for low
[01:18:13] <jadew> what happens in between?
[01:18:21] <jadew> am I getting this right?
[01:18:38] <jadew> maybe Input high voltage doesn't mean what I think it means?
[01:19:13] <jadew> what I'm trying to answer is if it can communicate to a 3.3v device over i2c, while this device is powered from 5v
[01:19:33] <jadew> if it won't see a logic 1 until 3.5, then I guess the answer is no
[01:19:38] <jadew> but I hope I'm missreading the datasheet
[01:22:53] <jadew> this data is shown in the electrical characteristics table, under "Digital Interface"
[01:28:11] <Grievre> jadew: hmm
[01:29:12] <jadew> I'm not missreading it, isn't it?
[01:36:28] <Lt_Lemming> foo303 still around?
[01:39:01] <jadew> night
[01:42:00] <Grievre> jadew: you might be able to pullup to 3.6 or something, if the 3.3 device can tolerate that
[01:43:06] <Lt_Lemming> jadew, you'd do much better to use a level shifter
[01:43:59] <Lt_Lemming> just means adding another chip to the board, but means you can guarantee it will read, where as if you are right at the threshold of min voltage it may not
[04:20:11] <foo303> Hey, Lt_Lemming. Yes, just got back.
[04:23:39] <megal0maniac_> Hello sirs :)
[04:24:18] <megal0maniac> Happy new year
[04:24:20] <megal0maniac> zlog
[04:30:34] <megal0maniac> jadew: You've probably figured this out by now, but in between 0.3vdd and 0.7vdd, the input will essentially be floating. You aren't guaranteed a high or low. At 0.6vdd you'll get a high reading most of the time, but it won't be stable
[04:31:34] <megal0maniac> So 3v3 should trigger a high reading, but a level shifter is the way to go.
[04:32:08] <megal0maniac> OndraSter: ping
[06:31:16] <megal0maniac> Quiet here today. Everyone still recovering? :P
[11:42:00] <jadew> man... microchip's PIC so much better when it comes to the mixture of features than AVR
[11:43:27] <jadew> I was looking for a chip with 12-bit ADC that runs at 5v, not only that microchip has one, but you can also get them in dip package
[11:43:48] <jadew> atmel only has them for up to 3.6v and only as smd
[11:44:44] <soul-d> everytime i find a 5v device im like "awe man crap "
[11:44:45] <jadew> just to clarify, microchip doesn't have just one, it has 14
[11:45:01] <jadew> soul-d, sometimes 5v is better
[11:45:10] <jadew> well, most of the times really
[11:45:32] <jadew> because they have better noise tollerance
[11:46:41] <jadew> they're only going down in voltage because it's a technical challange to get them powered from higher voltages, not because it benefits the end user, because it doesn't
[11:47:33] <soul-d> i was planing to tryout a test bit with smd with some pic samples but i don't feel like looking how to program and compile for pic on linux
[11:48:02] <jadew> soul-d, I don't like how pics get programmed on windows either
[11:48:08] <jadew> I just hate their compilers
[11:48:21] <jadew> but overall, they seem to fit a lot more applications than AVRs do
[11:48:24] <soul-d> yeah and their c can't be botherd with them realy
[11:49:17] <jadew> I'm gonna try to set up a friendlier development environment tho
[11:49:49] <soul-d> if you could intergrate it in eclipse prehaps
[11:50:04] <soul-d> but then you would have to like eclipse wich you either do or don't
[11:50:27] <jadew> I don't like eclipse either
[11:50:55] <OndraSter> nobody does
[11:51:06] <soul-d> i actualy do for 80% :P
[11:51:44] <soul-d> as long as itr works it works
[11:51:55] <soul-d> but rather not configure the thing to often
[12:41:18] <megal0maniac> jadew: They also have chips with USB in DIP, which apparently isn't a great idea, but at least the option is there
[12:41:40] <jadew> yeah, I have a few of those
[12:41:45] <jadew> why not a great idea?
[12:41:49] <jadew> they seem to work fine
[12:44:16] <OndraSter> on breadboards it is far from a great idea
[12:44:50] <jadew> too much noise?
[12:45:06] <OndraSter> capacitance
[12:45:42] <OndraSter> when I was trying simple oscillator on breadboard with xtal, the frequency was all over the place
[12:45:43] <jadew> ah, well, it seemed to work fine when I played with them (I used the SMD package in the end thing tho)
[12:46:17] <GuShH> OndraSter: rather, parasitics in general. For instance if you were to test a simple current shunt, the parasitics would add up and skew your results
[12:46:26] <OndraSter> yeah
[12:46:30] <OndraSter> alllllll the parasitics
[12:46:49] <GuShH> horrible horrible thing them breadboards for anything other than low frequencies and simple things
[12:47:15] <GuShH> unless you know what you're doing... or can live with it.
[12:47:16] <jadew> I think the breadboard was the greatest invention since the wheel
[12:47:37] <GuShH> it's usable for a lot of things, but just as unusable for many other things :)
[12:48:56] <jadew> I'm sure it won't be suitable for some applications, but for the stuff that I did so far it didn't pose a problem
[12:49:06] <jadew> sure, there was more noise in there, but that was fine
[12:49:21] <jadew> at least I knew that if the circuit will work fine on the breadboard it will work even better on the PCB
[12:50:10] <OndraSter> yeah... no
[12:50:18] <OndraSter> the extra parasitics can fix stuff you weren't aware of
[12:50:26] <jadew> that's true, but rare
[12:50:38] <jadew> it can make something that shouldn't oscillate, oscillate
[12:50:42] <jadew> like an xtal
[12:50:59] <GuShH> a lot of things that work on breadboards won't work when you prototype on a pcb
[12:51:02] <jadew> but once you're aware of this stuff, it's fine
[12:51:21] <GuShH> xtals SHOULD oscillate :)
[12:51:33] <jadew> xtals, not when they're missing capacitors
[12:51:36] <jadew> ;)
[12:51:38] <GuShH> except they do without extra loading caps on breadboards, since the parasitic capacitance is enough to load most of them
[12:51:46] <jadew> exactly
[12:51:47] <GuShH> jadew: it's there, it's not missing.
[12:52:07] <GuShH> not knowing it is what bites you
[12:52:11] <jadew> yep
[12:52:31] <jadew> but again, this stuff seems too small to label breadboards as bad
[12:52:31] <GuShH> so as OndraSter said, if you aren't aware of it...
[12:52:40] <jadew> there are a few quirks, but that's it
[12:52:56] <GuShH> can't do anything precision related with them.
[12:53:07] <jadew> obviously
[12:53:17] <GuShH> no, not obviously if you don't know. that's the point.
[12:53:33] <GuShH> The first thing they should teach students is about the parasitics of their breadboard
[12:53:38] <jadew> GuShH, eventually you'll find out ;) I didn't know either at first
[12:53:41] <GuShH> And not how to blink a friggen LED
[12:53:44] <jadew> guess how I found out?
[12:53:53] <GuShH> wasted a week with a problem?
[12:54:42] <jadew> no, I just started wondering why do I need the extra caps from the schmeatic, if everything already works fine :)
[12:55:59] <GuShH> that works :p
[12:56:20] <jadew> once you build a few PCBs and you see the difference between what you get on the PCB and what it was on the breadboard, you will know what to expect
[12:57:15] <GuShH> I expect nothing from a breadboard. Worst thing you can do is assume!
[12:57:15] <jadew> they're bad the first few times you use them to build something, after that, they're the most reliable thing you can use to test something
[12:57:21] * GuShH sets amee2woof on fire
[12:57:40] <GuShH> jadew: some will strongly disagree, specially if their breadboards are old / low quality
[12:57:51] <GuShH> as they're not reliable at all, whatsoever. due to the false contacts.
[12:58:17] <jadew> GuShH, ah, I've seen people complaining about that on forums
[12:58:21] <jadew> it has never happened to me
[12:58:54] <jadew> my breadboards are new tho
[12:58:57] <GuShH> pft that's what they all say
[13:05:16] <GuShH> jadew: some of mine are getting quite old and will not work reliably anymore, that's why I mentioned.
[13:05:23] <GuShH> in fact one has turned slightly yellow heh
[13:05:45] <GuShH> I guess they do mix in fire retardants onto those plastics.
[13:05:46] <jadew> heh, yeah I suppose it's a good idea to replace them from time to time
[13:06:10] <GuShH> Either that or something else is turning them yellow, barely any sunlight hits them anyway
[13:10:22] <GuShH> jadew: any interesting ongoing projects?
[13:10:28] <jadew> building a new power source
[13:10:33] <jadew> 0-20V 0-1A
[13:11:03] <jadew> I just wish I could have used a DIP mcu @ 5V
[13:11:54] <jadew> you get a lot more dynamic resolution when you're ADC measures from 0 to 5 than from 0 to 2.4
[13:11:54] <jadew> *dynamic range
[13:13:34] <jadew> not particularly interresting, but challanging to keep it cheap and functional
[13:16:26] <Tom_itx> is a 317 good for 20v?
[13:16:36] <jadew> don't know
[13:16:55] <jadew> 1.2V to 37V output range.
[13:16:57] <Tom_itx> it's good for at least an amp
[13:16:59] <jadew> yeah, seems to do it
[13:17:16] <Tom_itx> and you can wire it for voltage or current
[13:17:31] <ok9swl> Hi boys, it reminds me my argue with my colleague. He says that breadboard are bad even for a blinking led. I will use breadboard even for low power transceiver up to 10 Mhz :)
[13:17:44] <jadew> I know, but I haven't considered using it, because it can't go down to 0
[13:17:52] <Tom_itx> oh
[13:18:08] <GuShH> jadew: power dissipation becomes an issue at some of those settings, depending on input voltage with a linear reg
[13:18:14] <jadew> I might make a mini power supply around one of those tho, just to have it around (you can never have enough power supplies)
[13:18:25] <jadew> GuShH, I know
[13:18:32] <jadew> it's gonna have a nice heat sink
[13:18:54] <jadew> the most it will need to dissipate tho, is 20W
[13:18:58] <jadew> which is not that much
[13:19:01] <GuShH> I made a dual tiny linear reg psu, both rails are variable but set to +3.3 and +5
[13:19:22] <jadew> this one will also have the option to split the rail
[13:19:24] <GuShH> I often use it for a few things, since it doesnt' take much space on the bench
[13:19:36] <jadew> so I can have vcc gnd vss
[13:19:40] <jadew> also variable
[13:20:07] <GuShH> the idea is that it's setup as it would be on a final pcb that requires that particular type of regulator.
[13:20:27] <GuShH> (you can use a lab psu instead, if you have one but this thing is tiny)
[13:20:49] <jadew> well, I guess that's what I'm building a lab psu
[13:21:54] <jadew> but for most projects, the rail splitter setup tho, I'm also gonna use in my next freq. generator
[13:22:06] <jadew> it seems to work great
[13:22:13] <GuShH> dds?
[13:22:17] <jadew> yeah
[13:22:46] <jadew> gonna use this to generate the freq: ad9834cruz
[13:23:17] <jadew> and I'm going to amplify it with: AD8055ANZ
[13:24:07] <OndraSter> yay 9834
[13:24:18] <jadew> then I'll just feed it trough a potentiometer to attenuate it from full swing to 0 (it's gonna change the output impedance but screw it, there's no simpler way of doing it)
[13:24:48] <GuShH> screw it! screw it all!
[13:24:51] * GuShH sets amee2woof on fire again
[13:28:48] <jadew> OndraSter, have you worked on your function generator since we last talked about it?
[13:41:08] <stanreg> Disassembling code.. Is this a compiler screw up, or does it actually do something?: ROM:002B mov r24, r24
[13:41:59] <jadew> maybe it's there to waste time
[13:42:07] <jadew> or maybe your dissasembler screwed up
[13:42:15] <stanreg> okidoo!
[13:42:15] <jadew> compilers don't usually screw up that bad
[13:42:20] <stanreg> good old IDA
[13:42:37] <jadew> yeah, I don't see that one screwing up either :)
[13:43:51] <jadew> but maybe you decoded plain data
[13:44:47] <stanreg> Doubt it.. have a look:
[13:44:49] <stanreg> ROM:0028 ldi r30, 0x36 ; '6' ROM:0029 ldi r31, 0 ; Z = 0036 ROM:002A ld r24, Z ; R24 = [Z] ROM:002B mov r24, r24 ; Compiler screw up? Time waster? 1 cycle.
[13:44:51] <stanreg> err
[13:44:53] <stanreg> sorry.
[13:45:30] <stanreg> context: http://tny.cz/f4904dc2
[13:46:31] <jadew> well, I don't think it's a compiler screw up, altho it's not excluded
[13:55:01] <stanreg> hah, it gets more ridiculous..
[13:55:49] <stanreg> ldi "ldi r25, 0" -- followed by -- "andi r25, 0"...
[13:56:30] <jadew> maybe someone wrote it in assembler
[13:57:05] <stanreg> who the heck ANDs with 0?
[13:57:36] <jadew> that's a good point
[13:58:45] <stanreg> While dasming this, I've seen some pretty non-efficient stuff.. like a 10 lines loop to clear two consecutive sram addresses :\
[13:59:06] <stanreg> Fairly sure it's coming from a compiler.
[14:18:17] <jacekowski> stanreg: it may be something to do with alignment
[14:18:44] <jacekowski> although, it's bit strange on AVR
[14:19:38] <OndraSter> only few things need to be word aligned
[14:19:40] <OndraSter> well
[14:19:42] <OndraSter> actually
[14:19:50] <OndraSter> none on regular megas I think
[14:20:25] <ok9swl> stanreg: It is a very strange behaviour, I had inspected a size optimized code from gcc many times and nearly always it uses a better code than i can imagine.
[14:20:26] <OndraSter> nothing has to be word aligned since everything is either word or dword wide :D
[14:20:55] <OndraSter> on xmegas USB endpoint descriptors might need to be 16byte aligned (on some older revisions), it might apply to regular megas too. But they would use NOPs for that
[14:21:08] <OndraSter> (or 00s if in RAM)
[14:21:14] <ok9swl> stanreg: And I am not an assembler newbie, I wrote a lot of time critical code in avr assembler with my colleagues.
[14:23:24] <stanreg> ok9swl: I understand.
[14:27:10] <OndraSter> stanreg, what -O level?
[14:27:49] <stanreg> ok9swl: have a look -- you'll understand my stance: http://tny.cz/975641e4
[14:28:00] <stanreg> OndraSter: not sure, not originally my code.
[14:30:37] <stanreg> err, and my comment for "andi r24, 8" is wrong, fixing.
[14:36:50] <ok9swl> stanreg: It is interesting, do you have a original c code, or it is disassembled code of someone else?
[14:37:04] <stanreg> ok9swl: no original c code :\
[14:37:56] <stanreg> when reading something such as: "sbiw r10, 01" -- is that r10:r11 that gets decremented by 1? Or r9:r10?
[14:39:28] <ok9swl> stanreg: I am trying to understand, but compilers arent that bad for a long time. I have few ideas, it may be written in asm by user and after a lot of modification, such a code can emerge even for a good composed one.
[14:40:35] <ok9swl> stanreg: It may be an obfuscated code, altough I never seen anybody doing that on a mcu. But if there is enough space and time, why not.
[14:40:41] <stanreg> ok9swl: sounds like a plausible theory.
[14:42:58] <ok9swl> stanreg: And for the third time, we are looking for good mcu programmers almost all the time. I have seen much much worse code from few adepts for the job :D
[14:43:00] <_abc_> Is there an avr app note concerning logarithmic led dimming?
[14:43:06] <_abc_> With pwm or otherwise?
[14:43:13] <_abc_> I can't seem to be able to find one.
[14:43:43] <stanreg> ok9swl: what industry?
[14:44:25] * _abc_ just joined, what is this about? :)
[14:44:29] <GuShH> _abc_: theres a discussion about it regarding DMX dimmers on avrfreaks that reveals the obvious, LUT.
[14:44:45] <GuShH> no real app notes
[14:45:23] <GuShH> Unless engineers these days are becoming more and more like lawyers by using pointlessly difficult and not-too-meaningful terms.
[14:45:50] <ok9swl> stanreg: motor control, especially the bldc motors, we grew out of application for modellers right into the industry
[14:46:11] <OndraSter_> <stanreg> when reading something such as: "sbiw r10, 01" -- is that r10:r11 that gets decremented by 1? Or r9:r10?
[14:46:12] <OndraSter_> neithr
[14:46:13] <OndraSter_> neither
[14:46:21] <OndraSter_> it works only on X, Y and Z
[14:46:29] <OndraSter_> and maybe "W"
[14:46:33] <OndraSter_> (the one before X)
[14:46:59] <stanreg> OndraSter_: gotcha
[14:47:29] <_abc_> GuShH: ! thanks. Hi, how are you?
[14:48:00] <_abc_> GuShH: LUT is easy but you know that the progression 2^0 2^1 2^2 ... is log, right? ;)
[14:48:24] <_abc_> GuShH: Also DMXes need to deal with incandescent filaments which are not at all like LEDs in emission
[14:48:34] <_abc_> GuShH: That adds an extra complexity dimension
[14:48:41] * ok9swl brb
[14:48:48] <GuShH> Aren't they using LEDs mostly for shows now?
[14:48:56] <_abc_> GuShH: I don't remember the figures but it's like Light_out ~= U^3 or such
[14:49:07] <GuShH> I'm fine, if we don't count the couple fists I ate last week on a traffic accident -- which wasn't even my fault to begin with, seeing as I wasn't the driver to begin with.
[14:49:17] <_abc_> GuShH: I think so, I saw some huge led based dmx motorlights
[14:49:29] <_abc_> GuShH: fists?
[14:49:38] <GuShH> Also, aside from the fact that those people were monkeys... you don't go after someone in a group of 3-4.
[14:49:38] <_abc_> You live in a dangerous country eh
[14:49:45] <GuShH> No kidding.
[14:50:05] <_abc_> GuShH: Of course you do. That's what cops call 'matching to the enemy'
[14:50:17] <GuShH> Yey thanks for massaging my ego like that.
[14:50:27] <_abc_> Sorry about that.
[14:50:52] <GuShH> Couldn't find any app notes at all, strange.
[14:51:26] <_abc_> Neither can I
[14:51:39] <_abc_> My app is just a tiny rgb led on a tiny pcb
[14:51:58] * amee2woof pees on GuShH's leg :3
[14:52:01] <_abc_> But there should be apps. I know that color matching is horrible, the 3 leds in a rgb do not have the same emission curve
[14:52:16] <_abc_> amee2woof: you are amee2k?
[14:52:19] <GuShH> I would bet no two LEDs are equal either
[14:52:41] <_abc_> GuShH: true, but one expects 3 in a case to be reasonably known if not matched
[14:52:42] <amee2woof> _abc_: yes
[14:52:51] <_abc_> I mean some characteristics published etc
[14:53:07] <_abc_> You frequently see things like R-5mcd G-2mcd B-1mcd
[14:53:24] <GuShH> They should be, unless they're chinese emitters
[14:53:32] <_abc_> You can work for a week to get the curves right and they will still be off. When you dim a white made from RGB the color shifts.
[14:53:33] <GuShH> By that I mean, no brand.
[14:53:55] <GuShH> Wouldn't heat also be an issue?
[14:53:59] <_abc_> I have yet to see a well matched triad
[14:54:01] <_abc_> Yes!
[14:54:15] <_abc_> Heat also makes them change in emissivity in a different way, each
[14:54:19] <GuShH> The joys of LEDs
[14:54:35] <_abc_> Even if they are on the same die, so the heat might come from the neighboring led, and cannot be compensated easily in software.
[14:54:45] * amee2woof idly wags tail :3
[14:55:05] * _abc_ disciplines amee2woof with a rolled newspaper
[14:55:57] * amee2woof barks at _abc_ >:|
[14:56:04] <GuShH> _abc_: But unless it's for a scientific/lab application, it wouldn't matter that much. Maybe in photography if we cared enough.
[14:56:11] <_abc_> http://www.cypress.com/?rID=34809 here's a Cypress one for 4 color leds
[14:56:25] <GuShH> amee2woof: man, what happened to you...
[14:56:26] * GuShH pouts
[14:56:32] <_abc_> GuShH: you can see it and in this case it is a backlight which should stay the color dialed.
[14:56:51] <GuShH> I bet theBear wouldn't see it!
[14:56:52] <amee2woof> not much... the new year we ordered arrived last night
[14:57:02] <GuShH> Mine got delayed at customs.
[14:57:07] <amee2woof> :(
[14:57:10] <GuShH> harharhar
[14:57:38] <amee2woof> thank timezones... they make everything complicated
[14:57:50] <GuShH> I think people blew more things up on xmas than they did on new years, strange. They got carried away...
[14:58:06] <GuShH> Even heard a few gun shots. None were mine.
[14:58:22] <amee2woof> lol
[14:58:30] <amee2woof> maybe they ran out of ammo after xmas
[14:59:05] <GuShH> I don't like it... If they were to fire to the ground, I'd be mildly OK with it... but they don't.
[14:59:08] <_abc_> Is it not strange to celebrate the New Year and Xmas in the middle of Summer?
[14:59:14] <GuShH> Very.
[14:59:22] <GuShH> Except it was a cold day yesterday.
[14:59:27] <GuShH> By cold I mean 10°C
[14:59:49] <GuShH> And it rained prior to that, so it wasn't too bad. Usually we are eating winter food (traditions...) and sweating like pigs.
[14:59:50] <amee2woof> thats not far off from what he had here during the day
[14:59:50] <_abc_> GuShH: re: shooting in the air: the probability for the bullet to fall on the shooter is very low, the probability of it falling onto someone else in a crowded area, much higher.
[14:59:59] <_abc_> GuShH: conclusion: it is safe to shoot in the air :)
[15:00:18] <amee2woof> there is a ridiculous ski world cup in munich and they had to specially stash away some truckloads full of know
[15:00:25] <amee2woof> full of snow* lol
[15:00:26] <GuShH> Indeed, which is why I don't like it. If you were to shoot to the ground, then it's just noise and pretty much no danger, unless there's a steel plate on the floor!
[15:00:42] <GuShH> haha, I mean safe in general, for everybody -- not just yourself.
[15:00:46] <amee2woof> because, erm, we don't have any here. haven't had freezing temperatures in a week or so
[15:01:02] <GuShH> no snow in some parts of the US either
[15:01:08] <GuShH> they didn't have a white xmas after all
[15:01:54] <GuShH> But yes, it's strange to celebrate it during summer because the food contains a high caloric content and the booze doesn't help.
[15:02:16] <GuShH> It's all wrong.
[15:02:19] <amee2woof> you don't feel over-eaten anymore once you pass out?
[15:02:41] <_abc_> GuShH: http://www.tron.cz/data/LED_Application_Note.pdf
[15:02:43] <GuShH> I tend not to drink or eat more than I need/have to...
[15:03:00] <GuShH> amee2woof: I guess some get carried away and end up drunk or worse.
[15:03:05] <OndraSter> arrgh
[15:03:13] <OndraSter> supposedly I am re-defining some structs
[15:03:29] <OndraSter> yet they are all the header files under #ifndef .. #define .. #endif
[15:03:29] <GuShH> _abc_: ah, Metrology was the keyword
[15:03:35] <amee2woof> well, when you drink enough to throw up that probably helps too... i guess
[15:03:41] * amee2woof has never thrown up from booze before
[15:03:48] <OndraSter> neither have I, amee2woof
[15:03:58] <GuShH> amee2woof: Except I don't drink like that anymore, I haven't been drunk in many years.
[15:04:08] <GuShH> There's no point in it.
[15:04:16] <GuShH> You just harm yourself and possibly others as well.
[15:04:32] <_abc_> amee2woof: I don't remember to have done that >:)
[15:04:35] <GuShH> If you've got a death wish go play with a 45 aimed to your head!
[15:05:24] <amee2woof> _abc_: lol ;)
[15:05:29] <GuShH> You'll be remembered as an artist, given the splatter on the wall.
[15:05:45] <amee2woof> drinking alone is boring as fuck
[15:05:52] <GuShH> "and the hole on the wall represents his escaping soul"
[15:06:00] <amee2woof> and lots of times when i go to parties i'm the designated driver these days
[15:06:17] <GuShH> amee2woof: designated drivers are known to roofie everyone else
[15:06:23] <OndraSter> lol
[15:06:27] <GuShH> why is this so off topic now?
[15:06:35] <amee2woof> who cares?
[15:06:49] <amee2woof> except for some ops vigorously masturbating to the topic
[15:07:19] <GuShH> while we're at it, I need new woofers for my big speakers... one of the coils shorted out and delaminated :( now I need to replace them both
[15:07:50] <OndraSter> that sucks
[15:07:51] <GuShH> I could try to rewind it but they're old paper woofers
[15:07:59] <OndraSter> I hate dying audio stuff (of course quality stuff, I don't care for cheap stuff)
[15:08:06] <GuShH> the adhesive dries out and eventually the voice coil frees itself and gets munched up
[15:08:32] <GuShH> followed by frying noises and a similar smell/smoke coming out of it :)
[15:08:45] <GuShH> (no DC on that output, so it died of old age)
[15:09:02] <OndraSter> I have got two towers of these: http://media0.iplace.cz/images/media0:4b4a679006e73.jpg/RS%20534.jpg
[15:09:05] <GuShH> I don't like audio either...
[15:09:22] <OndraSter> powered by 80s class A audio amp :D
[15:09:31] <GuShH> Yeah all my equipment is from the 80s
[15:09:44] <GuShH> But it's all functional, including the turntable yey.
[15:09:48] <OndraSter> the speakers are too. The original Tesla receiver died on me and I was too lazy to fix it
[15:09:58] <OndraSter> so I just bought new amp for $12 delivered from ebay-like local website :P
[15:10:06] <OndraSter> it was a bit harder to find something suitable though
[15:10:12] <OndraSter> 30 - 40W -ish, 4Ohm
[15:10:41] <ok9swl> Boys, that old boat anchors are golden... not only audio, all my ham radio euqipment is older than me as a rule :)
[15:11:00] <GuShH> Not sure how long this amp will last, it's on a similar power range but I fear those caps are drying out.
[15:11:05] <OndraSter> http://www.nrpavs.co.nz/archive/Sold_htm/TechnicsSU-500.htm
[15:11:06] <OndraSter> this amp
[15:11:29] <GuShH> ok9swl: are you bald?
[15:11:38] <GuShH> (family guy)
[15:11:44] <OndraSter> haha
[15:12:30] <ok9swl> ok9swl: no, not yet :)
[15:12:31] <GuShH> But it's true, the build quality is great on these oldies.
[15:12:45] <OndraSter> I don't get the nowadays "500W SPEAKERS!"
[15:12:50] <GuShH> Audio quality, well... depends. They degrade a lot.
[15:12:55] <GuShH> pmpo!
[15:12:59] <OndraSter> supposedly RMS!
[15:13:10] <OndraSter> PMPO is measured in kW on those!
[15:13:16] <GuShH> o.O
[15:13:27] <OndraSter> or what about "audio fuses"
[15:13:38] <OndraSter> make your speakers sound much better when used over regular fuses!
[15:13:39] <GuShH> If you can hook it up to mains directly for an hour and it's still in one piece, then it's worth keeping.
[15:13:46] <GuShH> :)
[15:14:04] <GuShH> a well known audio company used to do that to demo their new massive woofers.
[15:14:10] <OndraSter> wow
[15:14:11] <GuShH> I think it was 110vac though.
[15:14:14] <OndraSter> still
[15:14:24] <OndraSter> 110V at 8Ohms?
[15:14:47] <_abc_> http://rapplogic.blogspot.com/2009/01/arduino-led-color-picker.html how to dim leds using java and arduino. Seriously.
[15:14:53] <GuShH> and 60hz... I'm not sure if the demo was accurate or not. Perhaps foul play, marketing?
[15:14:53] <OndraSter> right, the impedance is not 8Ohms at 50Hz
[15:15:03] <_abc_> It's good he did not use 3 arduinos, one for each led in rgb
[15:15:08] <GuShH> haha
[15:15:13] <OndraSter> haha
[15:15:34] <GuShH> neat demo nontheless
[15:15:45] <GuShH> I wonder if youtube has a video of these woofers
[15:18:02] * ok9swl goes to bed. Bye.
[15:18:36] <_abc_> http://www.lightbased.com/files/White_Papers/Facts_About_Dimming.pdf good paper on dimming in general and on problems related to it
[15:19:02] <_abc_> ok9 is ham radio what iaru zone?
[15:19:53] <_abc_> Everyone should read that dimming paper heh, it is good
[15:20:00] <ok9swl> _abc_: OK is Czech republic, 9 is novice licence only :)
[15:20:05] <_abc_> :)
[15:21:23] * GuShH realizes he knows nothing about CZ
[15:21:32] <OndraSter> ok9swl, ... now I have realized what your nickname means :D
[15:21:46] <OndraSter> I didn't think about it before.
[15:22:43] <ok9swl> OndraSter: yes, it is a very strange nick for anybody not native to ham radio, but it is simple
[15:23:44] <OndraSter> yeah
[15:23:45] <ok9swl> OndraSter: I may add that SWL has its meaning too, it means that i am too lazy to talk to microphone too much. I am more "short wave listener" than real ham.
[15:23:50] <ok9swl> :)
[15:23:55] <OndraSter> I knew more people (even some women) with HAM radio nicknames around the internet
[15:24:11] <OndraSter> hah lol
[15:25:40] <OndraSter> is there any way how to trace header file inclusion hell?
[15:26:01] <OndraSter> I am getting "multiple definition of blabla" although it is all around #ifndef #define #endif-ed
[15:26:04] <ok9swl> Yes, we are usually proud of it. So boys, have a nice day,night,evening etc. I have to go to work tomorrow. :/
[15:26:11] <OndraSter> yay work
[15:26:17] <OndraSter> not going to school before 7th!
[15:26:18] <OndraSter> bb
[15:26:28] <ok9swl> o/
[15:30:18] <OndraSter> nvm, I was just stupid
[15:33:43] <_abc_> okay so for led dimming, power in vs perceived illuminance out is like: 0.03-0.1 0.1-0.3 0.5-0.7 0.7-0.85 1.0-1.0
[15:33:53] <_abc_> Looks like c**p for an equation
[15:35:06] <_abc_> Expressed in half steps on the input side it can be approximated in integers only
[15:38:25] <OndraSter> talking about weird code...
[15:38:25] <OndraSter> http://pastebin.com/9xS86uqa
[15:38:28] <OndraSter> Gcc--- wtf?
[15:38:29] <OndraSter> it is on -O3
[15:38:31] <OndraSter> same for -Os
[15:39:34] <OndraSter> I am commenting about lines 350+354
[15:40:25] <OndraSter> when I remove the PORTC0.DATA = ...
[15:40:32] <OndraSter> then it removes also the ADIW and SBIW
[15:40:56] <OndraSter> BUT it still does Z+1 addressing for the DIRSET reg
[15:40:57] <OndraSter> wtf :(
[15:41:40] <OndraSter> there are many WTF moments in the code
[15:41:51] <OndraSter> and -Os vs -O3 makes zero difference on the amount of WTFs
[15:43:03] <OndraSter> it uses "offset" addresses where it should not and does not use them where it should
[15:43:20] <creep> someone have some unneeded RG178/U ?
[16:07:26] <_abc_> OndraSter: does gcc do out of order processing? Try to mark the data volatile, it probably moves that elsewhere
[16:07:46] <_abc_> OndraSter: And yes, gcc likes Z very much
[16:07:46] <_abc_> sigh
[16:08:20] <_abc_> What is the max pwm freq on a low end atmega?
[16:08:20] <_abc_> Can it be >16kHz?
[16:08:34] <_abc_> I basically need to fake 16 bit pwm because of the log issue
[16:08:38] <jacekowski> why not
[16:08:38] <_abc_> led dimming
[16:08:56] <_abc_> I would like at least 500kHz :/
[16:09:14] <_abc_> gives 31Hz flicker in the leds eh
[16:09:27] <_abc_> I need to rake my brains on how to do this right
[16:09:52] <jacekowski> fast pwm it's 60kHz with 16MHz crystal for phase correct PWM
[16:10:06] <_abc_> I don't care about phase, I need to push it to 16 bits
[16:10:15] <_abc_> That's the trouble
[16:10:25] <jacekowski> you can do it in software
[16:10:38] <creep> use a dac
[16:10:38] <_abc_> yes, at 16MIPS or such, it can be done
[16:10:38] <_abc_> no dac, pwm
[16:11:01] <_abc_> If I write interrupt less code at 16MIPS I can just barely do it
[16:11:10] <_abc_> Not looking forward to it
[16:11:52] <_abc_> I have about 9 instructions per loop...
[16:11:55] <_abc_> no fun at all
[16:12:42] <_abc_> How fast can an atmega go? 16? 20?
[16:12:51] <OndraSter> _abc_, if you want fast PWM, may I suggest either external PWM driver OR some attiny85 or something with 64MHz PWM or base it on xmega with 128MHz PWM built-in?
[16:13:09] <yunta> xmega ftw
[16:13:10] <_abc_> tiny85 is an option
[16:13:17] <_abc_> tiny45 also does this, no?
[16:13:23] <OndraSter> if it does 85 then 45 too
[16:13:24] <OndraSter> 25 too
[16:13:42] <OndraSter> you need simple serial rx -> oc register
[16:13:42] <yunta> go for xmega, small pkg and no-effort fast like hell pwm
[16:13:44] <_abc_> Is it too small for gcc code?
[16:13:45] <OndraSter> yep
[16:13:47] <OndraSter> no
[16:13:57] <OndraSter> gcc can do anything but the <=1kB chips
[16:14:11] <_abc_> I do not need serial rx
[16:14:16] <jacekowski> gcc can do anything with ram
[16:14:26] <_abc_> How many bits of pwm does it support? 10?
[16:14:29] <OndraSter> 16 of course
[16:14:34] <OndraSter> since it is regular 16bit counter
[16:14:39] <OndraSter> if you'd be using the tiny just for the PWM driving
[16:14:41] <_abc_> ok
[16:14:55] <OndraSter> xmega has got 128MHz PWM at 19bits ...
[16:14:56] <_abc_> And it only has one channel of that, right?
[16:15:00] <OndraSter> one or two
[16:15:02] <OndraSter> check datasheet
[16:15:04] <OndraSter> I don't remember it
[16:15:06] <_abc_> ok
[16:15:36] <OndraSter> (note that there are 4 - 6 timers with those High-resolution/speed extensions, each has got 4 output ports on xmega for that... hehe)
[16:15:54] <OndraSter> xmega is a beast
[16:16:06] <OndraSter> did I mention that I have overclocked the core to 80MHz and it still ran just fine? :P
[16:16:25] <yunta> _abc_: go for xmega, you can cascade two timers to get 32bit timer, and there is shitloads of them
[16:16:32] <_abc_> yeah, I am really tired of all these outputs being tied up with dedicated hardware outputs. I want to see a switched crossbar like in a fpga so I can select where the hw related output lands on the pinout
[16:16:51] <_abc_> yunta: I heard about that but this needs to stay super low cost for now
[16:16:56] <OndraSter> actually
[16:16:58] <OndraSter> xmega is cheaper than mega :)
[16:17:05] <OndraSter> let alone if you were to use mega+tiny
[16:17:19] <_abc_> one or the other
[16:17:23] <yunta> yep, small xmegas are cheaper than tiny here
[16:17:41] <_abc_> I just calculated a binary approximated log with 8 bits in and nearly 14 out
[16:17:50] <OndraSter> xmega32a4u costs nearly the same as mega328
[16:17:54] <OndraSter> but it packs 10 times more stuff
[16:18:07] <_abc_> 4u has usb no?
[16:18:11] <OndraSter> all *u do
[16:18:19] <OndraSter> a series packs the most features
[16:18:35] <OndraSter> and 4 means "44 pin package with some features"
[16:18:49] <OndraSter> 3 is 64 pinned package with more features and bigger flash options (upto 256kB)
[16:19:11] <OndraSter> 1 is 100 pin package, even more features (second DAC, more PWM channels, more UARTs, more of everything!) but again only upto 128kB
[16:19:18] <OndraSter> (just as 4 series is available upto 128kB of flash)
[16:19:30] <OndraSter> I suggest checking it out
[16:19:36] <OndraSter> the peripheral set is just amazing
[16:19:44] <OndraSter> it is missing just ethernet ;)
[16:19:50] <_abc_> heh
[16:19:57] <_abc_> Tell me when it boots linux
[16:20:03] <OndraSter> heh
[16:20:07] <OndraSter> you can use avr32 then :P
[16:20:08] <OndraSter> or ARM
[16:21:22] <_abc_> Pretty hard to find a decent dimming paper
[16:21:26] <yunta> haha, I'm sure you can run linux on xmega, but that doesn't make sense
[16:24:43] <yunta> _abc_: seriously, consider xmega, anything else is not worth your time
[16:25:56] <Tom_itx> yunta, how do you handle the 3.3 to 5v interface?
[16:26:02] <OndraSter> to what interface?
[16:26:06] <OndraSter> :P
[16:26:09] <OndraSter> 3.3 -> 5 is simple
[16:26:12] <OndraSter> *do not care about it*
[16:26:21] <OndraSter> 3.3 is already high at 99% on 5V stuff
[16:26:44] <Tom_itx> so just hook it up and go?
[16:26:52] <OndraSter> yes
[16:27:00] <Tom_itx> what about the 5v to 3.3?
[16:27:05] <OndraSter> resistors..
[16:27:20] <OndraSter> as a voltage divider
[16:27:22] <yunta> personally, I rarely have any 5v-only things to handle
[16:27:22] <Tom_itx> dividers or series
[16:27:24] <OndraSter> bi-directional stuff is a bit tricky
[16:27:29] <OndraSter> dividers are better
[16:27:38] <OndraSter> but -- who now has got 5V-only stuff?
[16:27:45] <yunta> it's either >5v and needs FET due to >500mA consumption (or spikes)
[16:27:52] <OndraSter> yep
[16:27:54] <yunta> or accepts about 3.3
[16:27:56] <OndraSter> 5V is going to slowly die
[16:28:13] <yunta> honestly I have more problems with 1.8V stuff :)
[16:28:17] <OndraSter> hehe
[16:28:22] <OndraSter> are you running xmega on 1.8V? :P
[16:28:26] <OndraSter> it can do 12MHz on 1.6V!
[16:28:28] <OndraSter> officially
[16:28:43] <OndraSter> 32MHz from 2.7V already
[16:28:51] <OndraSter> but to comply with 3.3V logic I am using 3.3V
[16:29:08] <Tom_itx> yunta, have you seen the GTL2000 line ?
[16:29:15] <Tom_itx> GTL2003PW etc
[16:29:53] <OndraSter> gtl2000 is 22bit :op
[16:29:54] <OndraSter> :op
[16:29:55] <OndraSter> :o
[16:30:35] <OndraSter> they are nice
[16:30:45] <OndraSter> but I won't be looking for them 'till I need them actually
[16:32:14] <yunta> Tom_itx: interesting, thx
[16:32:22] <Tom_itx> they work excellent
[16:32:39] <Tom_itx> from 2 bit on up
[16:32:41] <yunta> OndraSter: no, but I work for phone-building company, so I sometimes have to interface with phone protos
[16:32:58] <Tom_itx> you set the target low voltage with a pin
[16:33:55] <Tom_itx> i've programmed avr's using them down to 1.75v
[16:34:07] <Tom_itx> beyond that it was hard to see the led blink
[16:34:16] <OndraSter> yunta, ah I see
[16:34:24] <OndraSter> HTC HD2 has got small atmega88 inside :)
[16:34:33] <yunta> wow
[16:34:34] <OndraSter> to hookup all the (light, proximity, ..) sensors to the main SoC
[16:34:46] <OndraSter> either mega88 or mega8
[16:34:52] <OndraSter> it is partially hidden under a shield, hard to read
[16:35:06] <OndraSter> I found it by accident when I was taking a photo while JTAGging it
[16:36:56] <yunta> uh, windows phone...
[16:37:39] <OndraSter> it was oold phone
[16:37:41] <OndraSter> but it runs everything
[16:37:43] <OndraSter> literally everything
[16:38:05] <OndraSter> originally WM 6.5, then Cotulla hacked on bootloader that boots WP7, Android. Now he is working on WinRT kernel and boots W8 and WP8 :D
[16:38:13] <OndraSter> and of course stuff like meego/maemo and ubuntu work too
[16:38:44] * dunz0r had a HTC Titan2 which ran Linux and WP6.5 several years ago
[16:38:49] <OndraSter> :)
[16:38:58] <OndraSter> Titan2? How many titans are there!
[16:39:03] <OndraSter> there is also Titan with WP7..
[16:39:04] <dunz0r> Linux development hadn't gotten very far then, you could call people but you couldn't answer :)
[16:39:06] <OndraSter> I know about the oldest Titan
[16:39:40] <dunz0r> Oh. It wasn't a titan... it was a Tytn
[16:39:53] <OndraSter> anyway, I have moved onto Omnia 7, then I was given by MS as a developer Lumia 800. Now I am preparing my pocket for Lumia 920
[16:39:56] <OndraSter> oh TyTN II?
[16:39:59] <OndraSter> HTC Kaiser :)
[16:40:01] <OndraSter> had that too
[16:40:10] <dunz0r> http://upload.wikimedia.org/wikipedia/commons/5/55/Htc_tytn_ii.jpg
[16:40:25] <OndraSter> yep HTC Kaiser
[16:40:29] <OndraSter> I started my smartphone history on that
[16:40:36] <OndraSter> and my annual 0.5 - 1 years of using each phone tops :D
[16:40:42] <dunz0r> That phone made me not ever even consider getting a windows-phone again :)
[16:41:00] <OndraSter> Differentiate between Windows Mobile and Windows Phone
[16:41:03] <OndraSter> they are completely different
[16:41:10] <OndraSter> WinPho is completely new
[16:41:29] <dunz0r> Ah. Must've been windows mobile 6.5 then
[16:41:32] <OndraSter> ye
[16:41:34] <OndraSter> tops
[16:41:37] <OndraSter> it shipped with WM6.0
[16:41:40] <OndraSter> and got update to 6.1
[16:41:45] <OndraSter> then unofficially to 6.5
[16:41:45] <dunz0r> Laughingly bad is what I remember about it.
[16:41:52] <dunz0r> Nice keyboard though.
[16:41:56] <OndraSter> yep
[16:42:00] <OndraSter> TP2 had even better keyboard
[18:31:32] <theseb> i think i understand the brne jumps ahead a few instructions depending on value of Z flag
[18:31:51] <theseb> BUT....what is the point of "brne 0" then?
[18:32:30] <theseb> (I'm looking at the assembly of an LED blinker program and GNU objdump -S gave me a line "01 f4 brne .+0"
[18:37:04] <OndraSter> where?
[18:37:28] <OndraSter> I am not sure if there is "automatic +2 for the core while jumping"
[18:37:32] <OndraSter> to move to the next instruction or not
[18:37:38] <OndraSter> I would have to check the PDF
[18:37:39] <NovceGuru> Anyone experience AVR Studio 6 locking up their windows host after long (days) of running in debug mode?
[18:37:45] <OndraSter> yes NovceGuru :(
[18:37:54] <OndraSter> it did 5.anything too
[18:38:06] <OndraSter> the debug driver locks up
[18:38:10] <OndraSter> it cannot be shutdown anymore
[18:38:13] <OndraSter> nor new AS instance starts up
[18:38:28] <NovceGuru> I can't even get my laptop to wake up, still not 100% sure its not hardware
[18:38:33] <OndraSter> it hasn't happened to me on the new system install yet though (given that it is barely 7 days old since I got new SSD)
[18:38:38] <NovceGuru> but I do notice sometimes I catch it after ~12 hours and its SO sluggish
[18:38:39] <OndraSter> to wake up?!
[18:38:46] <NovceGuru> I mean for the LCD to come on
[18:38:50] <OndraSter> huh
[18:38:50] <NovceGuru> not system sleep
[18:38:54] <OndraSter> oh
[18:39:37] <theseb> OndraSter: i think someone nailed it......point stuff like "jump ahead 0 instructions" is one way to implement DELAYS in your program
[18:39:43] <theseb> pointless*
[18:39:53] <OndraSter> theseb, most likely
[18:39:58] <OndraSter> it is just a delay
[18:53:09] <skier_> pa
[18:55:08] <theseb> OndraSter: can i ask you one more beginner question?
[18:55:34] <theseb> The last line of this asm code is "rjmp .+0"
[18:55:41] <theseb> isn't that also not going to do anything?
[18:56:07] <theseb> It will make the program jump to NEXT instruction but there is NOT a next instruction since THAT is the LAST one!?!
[18:58:32] <Casper> theseb: isn't that an endless loop?
[18:58:52] <Casper> to prevent the program from restarting when it reach the end?
[18:59:09] <theseb> Casper: i don't know but that makes sense
[19:00:44] <theseb> Casper: can i ask you a related question about a simple 14 line asm program?
[19:00:48] <theseb> http://pastebin.com/JEBerBZM
[19:00:50] <theseb> there it is
[19:02:09] <theseb> http://pastebin.com/JEBerBZM <--- Does the brne make the sbiw's keep repeating until r30 and r24 values go to zero?
[19:02:56] <Casper> I'm not an asm expert, but branch if not equal should compare 2 registers
[19:03:08] <theseb> the branching is conditional on Z flag
[19:03:21] <theseb> Z flag is set by preceding sbiw'
[19:03:40] <theseb> Casper: that confused me too for a bit :)
[19:03:43] <Casper> so if it's conditional to Z then yeah...
[19:03:54] <Casper> but really, it's too long since I did anything in assembly
[19:03:57] <Casper> I use C
[19:04:09] <theseb> me too...wanted to learn asm too for fun
[19:14:48] <OndraSter> theseb, actually
[19:14:53] <OndraSter> you can see it in the asm listing
[19:14:56] <OndraSter> where it jumps to :)
[19:15:11] <OndraSter> (unless the disassembler is wrong, that is
[19:15:21] <theseb> OndraSter: yes but that makes no sense...the last line says it jumps to line 0x1e
[19:15:41] <theseb> OndraSter: and brne's jump to 0x18 and 0x1c
[19:15:51] <theseb> OndraSter: but that won't make anything repeat
[19:16:17] <OndraSter> I know
[19:16:18] <OndraSter> that is why I said
[19:16:20] <theseb> OndraSter: but i now *SOMEHOW* I need to get some repeats
[19:16:22] <OndraSter> <OndraSter> (unless the disassembler is wrong, that is
[19:16:29] <OndraSter> that is gcc compiled code?
[19:16:32] <theseb> OndraSter: yes
[19:16:36] <OndraSter> well
[19:16:47] <OndraSter> start it up as a new asm project, copypaste it there and run it through simulator :)
[19:17:06] <theseb> OndraSter: you read my mind...i just found out about simavr and was going to do just that
[19:17:26] <OndraSter> you can use builtin simulator you know
[19:17:28] <OndraSter> into as
[19:17:52] <OndraSter> and yes, I can read minds
[19:18:39] <theseb> OndraSter: what builtin simulator?
[19:18:56] <theseb> OndraSter: oh...."as" is a simulator
[19:19:22] <OndraSter> no, "as" as atmel studio
[19:19:30] <OndraSter> that has got builtin avr simulator
[19:19:47] <theseb> i have the java IDE on linux...that is it
[19:19:57] <theseb> i think atmel studio either needs big bucks or only works on windows
[19:19:58] <OndraSter> oh linux
[19:20:03] <OndraSter> yes, it is windows only
[19:20:05] <OndraSter> and it rocks.
[19:20:16] <OndraSter> and it is freeeeee
[22:17:32] <creep> OndraSter<< nothing is free for windowz, you sold your soul for it