#avr | Logs for 2012-02-06

Back
[00:06:19] <learningc> how would you guys execute 2 instructions separated by exactly 2us?
[00:11:21] <Casper> _delay_us(2) ?
[01:08:23] <rue_mohr> asm or c?
[01:18:23] <multiplex> in avr datasheet there is often two adress in a case of an register in the register summary page.
[01:18:32] <multiplex> for exemple :
[01:19:24] <multiplex> 0x12 (0x32) | PORTD |PORTD7 ....
[01:19:53] <multiplex> why there is two adress ?
[01:20:18] <Casper> is there a compatibility mode for another avr?
[01:22:50] <multiplex> you think one adress is for atmega8 and other for atmega8l for exemple
[01:25:19] <Casper> no, that's the same device
[01:25:47] <Casper> but for some device, like atmega128, it have a compatibility mode for I think atmega163
[01:26:12] <Casper> in compatibility mode, it react the same as the 163
[01:26:19] <Casper> so the registers are those of the 163
[01:26:25] <Casper> hence the different address
[01:26:34] <Casper> it might be the case for your
[01:26:43] <multiplex> ok thanks
[01:26:50] <Casper> on that, I say good night :D
[01:27:19] <multiplex> good night ;)
[01:30:18] <raek> I don't think that's the case.
[01:30:35] <raek> When using the I/O specific commands IN and
[01:30:35] <raek> OUT, the I/O addresses 0x00 - 0x3F must be used. When addressing I/O Registers as data
[01:30:38] <raek> space using LD and ST instructions, 0x20 must be added to these addresses.
[01:30:44] <raek> (from the datasheet)
[01:31:23] <raek> the higher adresses are the adresses in memory, while the lower ones are the ones you can use with the special in and out instructions
[01:31:46] <raek> multiplex: ^
[01:32:51] <multiplex> thanks very much for the correction
[01:34:48] <raek> I've never heard of a compatibility mode
[01:54:46] <Landon> what do you guys use for power when prototyping? dedicated power supply? batteries? other?
[01:55:11] <grummund> yes :)
[01:55:26] <Landon> I've been using a battery pack for portability, but the wiresare starting to snap from use
[01:56:32] <rue_mohr> I suggest not using batteries while testing code, they tend to die at inopportune times.
[01:57:33] <Landon> good point, I hope I'm not draining them near that much though :P
[02:00:50] <grummund> If you prototype with on-board regulators then a fixed 13.8V bench supply will do the job and they are cheap and easy to come by.
[02:02:31] <raek> so far I have used a wall wart and a 5 V voltage regulator on the breadboard
[02:04:26] <raek> (but this weekend I got hold of an old adjustable power supply with current limiting)
[02:04:52] <raek> + and old oscilloscope
[02:05:37] <raek> note to self: old analog o-scopes are not ideal for looking at single digital signals
[02:05:39] <Landon> ahhh I still don't have an oscilloscope
[02:05:50] <Landon> unfortunately, I think that's going to have to wait until I have a job
[03:47:07] <carp3> inline int something(int a,int b){return a+b;} and #define something(a, a) (a+b) are equal ? i mean in code size and performance
[03:47:25] <carp3> a,b*
[03:50:53] <ziph> carp3: You should do ((a)+(b))
[03:51:29] <ziph> carp3: And presuming the function does get inlined the performance should be the same.
[03:52:13] * RikusW got a bill for R85 from RS.... :S They supposedly gave me credit for that undeliverable xmega, but now they're billing me :S
[03:56:42] <Tom_itx> :/
[03:58:42] <OndraSter> mornin
[03:58:50] <RikusW> hi
[04:10:47] <RikusW> Addy_: whats up with your connection ?
[04:10:52] <RikusW> or whats down ?
[08:57:52] <amee2k> hrm
[08:58:12] <OndraSter> huh
[08:58:18] <amee2k> is there a technical reason why laser range finders never seem to be rated for maximum ranges > 1500 meters ?
[08:58:35] <OndraSter> can't focus enough?
[08:59:01] <amee2k> the laser or the targeting optics?
[08:59:49] <OndraSter> the laser
[08:59:51] <OndraSter> dunno
[08:59:55] <amee2k> ones that do >500 meters are usually for outdoor use and built into binoculars or have similar sighting devices
[08:59:58] <OndraSter> that's my tip
[09:00:55] <amee2k> what made me wonder is that not even ass expensive ones go any further
[09:03:36] <rue_mohr> Tom_itx, was there problems with an addy I didn't notice?
[09:16:21] <rue_mohr> ooo I just found code for reading two RC channel inputs
[09:16:30] <rue_mohr> pwm timers
[10:06:29] <jadew> I know you guys are developpers and can put one of these together yourself, but here it is: http://dumb.ro/tb/download/prescaler.zip (win32 commmand line) it will calculate the prescaler needed for a given clock and a list of targets frequencies as well as the CTC comparation value. Can also be used to figure out suitable target frequencies between a range, for a given clock
[10:07:46] <jadew> had a hard time chosing a proper target frequency / prescaler when using a 8.0 Mhz clock
[10:10:14] <abcminiuser> Urgh, perils of living next to a naurapath
[10:10:30] <abcminiuser> There are WAY too many healing moans coming through the walls
[10:10:46] <karlp> is naturopath the new name for massage?
[10:11:01] <abcminiuser> No, kinda like a witchdoctor, but without the credibility
[10:11:16] <abcminiuser> They're "Natural" healers, so they deal in bullshit and crystals
[10:11:17] <jadew> oh, I thought it's something like erotic massage
[10:11:25] <abcminiuser> Good god I hope not
[10:11:35] <abcminiuser> Tom_itx, I found a fix for the AVRISP I think
[10:11:36] <karlp> but wait! if I add water, it will get stronger!
[10:11:47] <jadew> lol
[10:12:33] <abcminiuser> karlp, that's Homeopathy, but I guess that would be the sort of crap a Naturapath would dispense
[10:12:54] <abcminiuser> Basically, there's no training behind naturapathic medicine that's actually accredited
[10:13:08] <ziph> abcminiuser: Sure the pleasure moans aren't coming from their cash register?
[10:13:15] <abcminiuser> You go to a bullshit training course or something, and get certified by some Natuapath organisation
[10:13:28] <jadew> there is for homeopathy, and it still seems unbelivable
[10:13:29] <ziph> abcminiuser: The NHS pays for it, it must be genuine.
[10:13:33] <abcminiuser> But you don't actually get to give out anything that could actually affect anyone (no prescriptions or actual science)
[10:13:47] <abcminiuser> ziph, urgh
[10:14:20] <abcminiuser> If you can't write a prescription for strong pain killers, you aren't a physician
[10:14:42] <abcminiuser> Not saying that's all they're good for, the point being if you can't prescribe anything, you're not a doctor
[10:14:51] <abcminiuser> (Medical Doctor, that is)
[10:14:53] <ziph> Why would you write a prescription for something you don't believe in?
[10:15:56] <inflex> for the $
[10:15:56] <abcminiuser> Actually, come to think of it, you could dye bottles of dissovled aspirin and give that out instead, that would actually DO something
[10:16:39] <ziph> But if you prescribe pain killers you don't get to sell your snake oil.
[10:16:51] <abcminiuser> Just don't tellt he customer what it is
[10:16:57] <ziph> Therefore the reason natural healers can't prescribe anything is that they don't need to.
[10:17:18] <abcminiuser> Indeed
[10:21:24] <ziph> Hmm, a Cortex M3, 8K FPGA and GPS.
[10:21:32] <ziph> Lil' bit of overkill for a motor controller.
[10:22:17] <_Shurik_> Nice! That's the only way to control motors
[10:22:38] <ziph> :)
[10:22:39] <_Shurik_> I'd throw in DSP also
[10:22:57] <ziph> If I upgrade to an M4 it'd be DSPish enough.
[10:23:22] <ziph> Plus the FPGA has enough multipliers on it to do a fair bit of damage too.
[10:23:38] <_Shurik_> Yeah!
[10:44:17] <abcminiuser> WWWWWAAAARRGGGGHHHHHHH
[10:44:21] <OndraSter> haha
[10:44:24] <OndraSter> what did you break
[10:44:58] <abcminiuser> Nei, Anika just said "Smell This"
[10:45:20] <abcminiuser> Apparently the freezers carrying tonight's meat packets in the shop must have broken at some point
[10:45:26] * abcminiuser will never smell again
[10:45:33] <OndraSter> eh
[10:45:52] <OndraSter> so did I mention that I am going to uni (hopefuly) to field "computer engineering"?
[10:45:53] <OndraSter> mix of SW and HW
[10:45:58] <OndraSter> sounds sexy
[10:46:02] <OndraSter> except Java programming lol
[10:46:13] <Essobi> abcminiuser: ewww
[10:46:16] <ziph> abcminiuser: I had a store fridge incident with some milk recently.
[10:46:26] <abcminiuser> Kill me
[10:46:29] <ziph> abcminiuser: It was utterly rancid and I didn't notice until the first mouthful.
[10:46:37] <Essobi> ziph: AAAAAAAAAAAAAAH*
[10:46:47] <abcminiuser> Or febreeze my house
[10:46:47] <abcminiuser> ziph, urgh
[10:46:50] <Essobi> that's sooo gross.
[10:46:57] <Essobi> *shudders*
[10:47:08] <abcminiuser> ziph, on a scale from 1 to Dead, how sick were you?
[10:48:08] <ziph> abcminiuser: I was fine, but I drove back to the store and told them about it. They offered me a replacement from the same fridge.
[10:51:19] <abcminiuser_> ziph, bllaarrggghh
[10:53:41] * abcminiuser_ crawls into a corner
[10:55:06] <raek> OndraSter: computer engineering is a nice mix
[10:55:13] <OndraSter> yeah
[10:55:18] <OndraSter> I don't like being SW only guy
[10:55:41] <OndraSter> it sucks nowadays
[10:55:43] <OndraSter> too much SW programmers
[10:55:47] <OndraSter> well, wannabe programmers at least
[10:56:24] <asteve> wannabe programmers?!!?!!?
[10:56:28] <OndraSter> yeah
[10:56:31] <OndraSter> they say they can programm
[10:56:38] <OndraSter> but the code that comes out...
[10:56:42] <OndraSter> is worse than 5 year old
[10:57:18] <OndraSter> in past 3 days I managed to super clear my code with proper use of LinQ :)
[10:59:28] <OndraSter> I like .NET
[10:59:32] <OndraSter> I dislike (even hate!) Java
[11:00:31] <raek> why?
[11:00:47] <raek> the IDEs and tolls?
[11:00:50] <raek> *tools
[11:00:58] <impulze> trolls!
[11:01:22] <karlp> .net is fine.
[11:01:30] <karlp> the fact that it only runs on windows servers is the problem.
[11:01:43] <raek> IMO, Java and C# are so similar that they could be considered variants of the same language
[11:02:38] <ziph> Mono will run server C# applications just fine.
[11:04:47] <karlp> yeah, if I turst novell to stay alive
[11:05:05] <karlp> I sure wouldn't start a new project using .net on mono
[11:05:56] <ziph> Xamarin is the primary company behind it now.
[11:06:32] <Roamin> Hi everyone, i have some quick questions. I assume ? : operator is faster than a "if ... else" statement? is there anyway to make this : http://pastebin.com/48dtB6pf more efficient and faster?
[11:06:50] <ziph> Roamin: Why would it be faster?
[11:07:11] <impulze> lol
[11:07:12] <impulze> wtf
[11:07:26] <Roamin> i assumed because its an operator, less things to do?
[11:07:54] <ziph> Roamin: No, the source code has very little to do with what ends up being compiled.
[11:08:26] <ziph> Roamin: It all gets converted into an intermediate language.
[11:08:53] <ziph> Things like:
[11:08:58] <ziph> int a = 1;
[11:09:00] <ziph> int b = 2;
[11:09:04] <ziph> int c = a + b;
[11:09:10] <ziph> End up being exactly the same as:
[11:09:15] <ziph> int c = 1 + 2;
[11:09:24] <Roamin> ok, but i thought since operators like x += 1 is faster than x = x + 1 (because it doesnt have to lookup x twice)
[11:09:47] <impulze> see again what ziph said
[11:10:23] <ziph> Roamin: It doesn't look up the value of x twice for either.
[11:10:34] <ziph> Roamin: It loads x, adds 1 to it, and stores it.
[11:10:58] <ziph> Roamin: If you do x = 1 it doesn't load x first and then store over it, after all.
[11:11:55] <SianaGearz> in single static assignment form which is commonly used by modern code generators and optimizers, x += 1 and x = x + 1 look exactly the same.
[11:12:22] <Roamin> so keyword is modern?
[11:12:44] <ziph> SSA doesn't come in to it, x += 1 is syntactic sugar for x = x + 1.
[11:13:01] <Roamin> because wiki says some compilers might lookup x twice
[11:13:02] <Roamin> http://en.wikipedia.org/wiki/%2B%3D
[11:13:04] <impulze> in C, yes :)
[11:13:13] <impulze> @ ziph
[11:13:29] <SianaGearz> ziph, in c++ it's for example not the same, depending on the type of x ;)
[11:14:00] <impulze> please don't obfuscate code
[11:14:36] <Roamin> its safe to assume that if i have a function that simply does that if statement, would be inlined if compiled with high optimizations?
[11:15:17] <SianaGearz> you assume too much.
[11:15:33] <Roamin> (i'm a beginner ;)
[11:15:46] <SianaGearz> first you assume ? : is faster than if/else/assignemnt, while usually it'll end up the same...
[11:17:16] <SianaGearz> well puh, not sure, i have seen a compiler where inlining rules were limited by number of source statements, so writing things more clearly could make it slower, but i don't know exactly what the inlining rules and limits are for GCC.
[11:17:17] <ziph> Roamin: It depends on the compiler inlining rules.
[11:17:46] <SianaGearz> i suspect they're decoupled from the way you write it in GCC.
[11:17:50] <ziph> Roamin: And those rules usually change when the function is in a different .c file.
[11:18:06] <ziph> Roamin: I think the bigger issue is that you're too worried about micro-optimisations.
[11:18:20] <Roamin> what im doing is this : sending data serially over 8 lines simultaneously, i take 8 different bytes, take their first bit of each and set a byte's bits accordingly, until all 8 bits are set, then place it on the port. This takes nearly 8 us to do, limiting the speed at which i can send the data
[11:18:28] <impulze> ziph: it's the only issue
[11:18:36] <Roamin> so i was trying to make that process a bit more efficient
[11:19:58] <SianaGearz> Roamin, i think the snippet you pasted should be compiled efficiently as it is.
[11:20:41] <SianaGearz> but it is a bit weird, why you'd want to write that kind of code, there could be a bottleneck at the higher level :)
[11:22:02] <Roamin> i want 1 mcu to send data to 10 others total, to drive 10 boards of 16x16 leds , to make a 16 x 160 led display, and i want to use the 50+ atmega32u2 i have lying around after the ps3 jailbreaks
[11:23:57] <Roamin> according to my calculations i could be updating the leds at about 180hz so far, but i havent done much data handling yet, so i was scared more data handling would slow down the refresh rate too much.
[11:24:40] <Roamin> as i said, im still a beginner, and my main question was if i could get the if statement to work faster since so far just setting up the data is what wastes the most time
[11:29:08] <impulze> no.
[11:36:42] <raek> Roamin: have you considered using shift registers?
[11:40:51] <Essobi> raek: I think his goal in this exercise is to use as many atmega32u2's as possible. :D
[11:44:17] <ureif> where did he get so many atmega32u2s ?
[11:44:55] <ziph> Stockpiling during the PS2 orgy.
[11:45:31] <LoRez> PS3
[11:58:52] <Roamin> raek i have, but like Essobi said, i want to use those atmega32u2
[12:01:53] <RikusW> Roamin: http://sites.google.com/site/megau2s/home
[12:01:58] <RikusW> my m32u2 board
[12:09:20] <Roamin> :) nice
[12:10:01] <RikusW> its somewhat like a swiss knife ;)
[12:12:37] <Roamin> only problem i aint swiss enough to fully use it to its maximum power ;)
[12:13:34] <RikusW> heh
[12:13:45] <RikusW> what do you want to do with a m32u2 ?
[12:14:09] <Roamin> control the word!
[12:14:13] <Roamin> a terminator maybe
[12:14:23] <Roamin> world*
[12:14:48] <Roamin> nah, first part is to drive a 16x160 led matrix, for a custom pinball machine based on "pinball fantasies"
[12:14:53] * RikusW want to add debugwire support too
[12:15:21] <Steffanx> You can do it RikusW :)
[12:15:30] <Steffanx> Port it to AVR32 first P:
[12:15:37] <RikusW> busy messing with that today
[12:15:54] <RikusW> seems 21 is singlestep
[12:16:19] <RikusW> and 23 is also singlestep but it executes the instruction loaded with D2 instead
[12:16:28] <Steffanx> Whatever, I don't know anything about it anymore
[12:16:48] <RikusW> 20 is Go and 22 Go for D2...
[12:16:56] <RikusW> Forgotten it already ? ;)
[12:17:01] <Steffanx> Yes, ofcourse
[12:17:18] * RikusW is resurrecting the project again...
[12:18:27] * RikusW wish atmel would open the spec...
[12:21:34] <RikusW> Steffanx: with my 3a3 I could probably run dW at 1 or 2 mbps ;)
[12:22:13] <Steffanx> Would be nice
[12:53:47] <abcminiuser_> Tom_itx, dead?
[12:54:05] <RikusW> he is here
[13:00:24] <abcminiuser_> Has everyone seen the crazy new Ok Go video yet?
[13:00:41] <Steffanx> No
[13:00:46] <abcminiuser_> (I'm acking NAKs until Tom get's back)
[13:01:02] <abcminiuser_> https://t.co/qMSSdMoG
[13:12:07] <Tom_itx> abcminiuser_
[13:12:22] <abcminiuser_> HE'S ALIVE
[13:12:30] <abcminiuser_> IT'S A CHRISTMAS MIRACLE
[13:12:44] <abcminiuser_> HOLD ON TO YOUR HATS AND LET GO OF YOUR WALLETS PEOPLE
[13:12:51] <abcminiuser_> Also, hi Tom_itx :)
[13:13:05] * Tom_itx leaves
[13:13:06] <abcminiuser_> I had a lot of coffee today :P
[13:13:18] * Tom_itx re-enters to make sure he's in the right place
[13:18:00] <impulze> sorry, you are not
[13:31:05] <abcminiuser___> Derp
[13:33:26] <RikusW> abcminiuser_: your connection acting down a bit ?
[13:38:03] <abcminiuser_> *tap* *tap*
[13:38:05] <abcminiuser_> This thing on?
[13:38:30] <Tom_itx> yup
[13:43:50] <Tom_itx> abcminiuser_, found new hardware
[13:43:58] <Tom_itx> :/
[13:48:08] <abcminiuser_> &^%*&%^ BUY A *&^ING CISCO ROUTER ASSHOLES
[13:48:19] <Tom_L> test failed 4 5 and 5.1
[13:48:24] <Tom_L> i'll reboot and try
[13:49:36] <Tom_itx> didn't show in hardware list either
[13:53:09] <Tom_itx> just the sim in 5.1
[13:54:18] <Tom_itx> abcminiuser, did you get that?
[13:54:33] <abcminiuser> Probably not
[13:54:40] <Tom_itx> zlog
[13:55:27] <Tom_itx> gotta run for now
[14:06:02] <Tom_itx> dude! stick around a while
[14:10:05] <SilicaGel> hm this usb weather board uses a 10 MHz crystal but the atmega328p manual says it boots using the internal oscillator. yet I can find no code anywhere that switches it over.
[14:10:54] <SilicaGel> It's a fuse bit? CKSEL?
[14:15:49] <cyanide> whats the difference between atmega168a-au and atmega168-20au?
[14:17:22] <lethologica> I am very new to avr programming, I am trying to write a program to send keystrokes over USB. Lufa looks like a good fit, but I am not sure where to start, the project seems to cover so much. Can someone give me a starting point to learn how to send keystrokes with lufa?
[14:18:26] <RikusW> cyanide: a is a newer part
[14:18:35] <RikusW> both is tqfp
[14:19:00] <RikusW> lethologica: look into HID
[14:19:08] <RikusW> and good luck ;)
[14:19:10] <OndraSter> AFAIK the "a" is newer with lower power requirements
[14:19:31] <RikusW> lethologica: there is HID demos in LUFA
[14:20:38] <lethologica> RikusW: Thanks, I see the keyboard demo and GenericHID but I think I am still in the "for dummies" mode of thinking
[14:21:35] <RikusW> getting the HID descriptor right can be painful
[14:21:47] <RikusW> so use one supplied with a demo
[14:22:01] <lethologica> RikusW: It seems the bit of code I am really interested in is the keyboard report data, but I am not sure how to construct that in the manner I want
[14:22:26] <RikusW> use the keyboard demo
[14:25:14] <lethologica> Ohh, I see HID.h on the documentation, This is interesting
[14:25:38] <RikusW> human input device class
[14:34:47] <lethologica> RikusW: Have you seen the hak5 usb rubber ducky? It is a AT32UC3B1256 with a microsd card built in. Basically it reads the microsd card and recites the contents as a script for a keyboard. The firmware blows right now. It looks like lufa will be a perfect fit, can you see any problems with this?
[14:41:44] <RikusW> lufa was ported to UC3 afaik
[14:42:16] <RikusW> haven't seen the hak5
[14:42:27] <lethologica> Yeah, I see that chip listed on the supported hardware page
[14:42:42] <RikusW> I have 3a3256 xplained
[14:42:48] <RikusW> not used it much yet
[16:08:03] <OndraSter> why can't be debugWire enabled in default?
[16:08:19] <OndraSter> both dW and ISP
[16:08:29] <OndraSter> you still need to take out whole ISP header :(
[16:13:57] <karlp> because some people like using the reset line for other things?
[16:14:11] <karlp> deal with, it's only 4 lines.
[16:14:17] <karlp> 5 if you want ground
[16:14:45] <OndraSter> well on 8 pinned device
[16:14:50] <OndraSter> it is pretty much whole device :P
[16:15:58] <karlp> this is why you have preproduction
[16:16:07] <karlp> and programming jigs
[16:16:20] <OndraSter> hmm
[16:16:28] <OndraSter> I can hook it up at some test points probably
[16:16:32] <OndraSter> wire it up, change the FUSE
[16:16:32] <karlp> see?
[16:16:34] <karlp> that was easy :)
[16:16:41] <OndraSter> and then continue through dW
[16:19:37] <Kevin`> OndraSter: if you are careful you can often use both isp and whatever is connected to the isp pins at the same time
[16:19:52] <OndraSter> yeah
[16:19:54] <OndraSter> but I want debug :)
[16:20:29] <Kevin`> I think the programmer tristates it's isp pins while doing dw. you should be able to leave them connected
[16:20:59] <OndraSter> I think I will solder just the attiny
[16:21:02] <OndraSter> programm it
[16:21:08] <OndraSter> and then solder the rest
[16:21:24] <Kevin`> are you using a dip chip?
[16:21:28] <OndraSter> no
[16:21:40] <OndraSter> my idea was MLF, but they are not as cheap as TQFP
[16:21:43] <OndraSter> er
[16:21:43] <Kevin`> you shouldn't leave dw enabled while the device is in normal use
[16:21:44] <OndraSter> SOIC
[16:21:52] <OndraSter> why?
[16:22:00] <OndraSter> if I don't use the pin
[16:22:00] <Kevin`> so you need some way to program it anyway. and of course you need to program it in production too
[16:22:30] <Kevin`> OndraSter: because it disabled power save modes and changes some other chip behavior. the datasheet covers this
[16:22:34] <OndraSter> hmm
[16:22:37] <OndraSter> damn
[16:22:41] <Kevin`> OndraSter: and of course it's not enabled by default
[16:22:50] <OndraSter> we'll see
[16:22:56] <OndraSter> I might even switch to atmega48 or 88
[16:23:01] <OndraSter> which I am not sure if it has dW
[16:23:14] <Kevin`> it'll have either debugwire or jtag
[16:23:15] <OndraSter> have to check ds
[16:23:23] <Kevin`> more pins means you don't need to worry about connecting isp though
[16:23:23] <OndraSter> no jtag on those small devices IIRC
[16:23:56] <OndraSter> gotta check ds
[16:25:40] <karlp> seriously, you don't need debug on the production devices.
[16:26:14] <OndraSter> there will be about 5 devices in total
[16:26:17] <OndraSter> most likely
[16:26:30] <OndraSter> no production
[16:26:34] <OndraSter> just home use
[16:26:50] <OndraSter> at least one device requires debugging
[16:36:10] <lethologica> Is anyone local in NYC?
[16:54:20] <jadew> I posted a program earlier, it was broken, but I've updated it, the formula was wrong
[16:54:29] <jadew> *I updated it
[17:22:22] <Tom_itx> i think dean gave up
[17:23:17] <Tom_itx> OndraSter_, make something like this to program them: http://tom-itx.dyndns.org:81/~webpage/attiny2313/attiny9.jpg
[17:24:19] <Tom_itx> OndraSter_ i think 48 88 168 328 have dW
[17:25:58] <Tom_itx> yep they do
[17:53:52] <atmega> Tom_itx: why you etch so much away? (there is no ground plane)
[19:00:14] <Tom_itx> what's a good USB sniffer?
[19:00:17] <Tom_itx> moderate to good
[19:00:28] <Tom_itx> is Beagle any good?
[19:04:00] <jacekowski> not really
[19:04:04] <jacekowski> it will do for most of stuff
[19:04:09] <OndraSter_> Tom_itx, hmm not a bad idea, thanks
[19:04:17] <OndraSter_> just push it onto the pins and hold it
[19:04:18] <jacekowski> depends on what is the problem
[19:04:36] <jacekowski> if you have working something and you want to reverse engineer it, beagle may do
[19:04:51] <jacekowski> but if you are developing a device and it doesn't work, beagle won't help
[19:04:54] <Tom_itx> mostly software
[19:06:06] <Tom_itx> http://www.fte.com/products/FTS4USB.aspx?RKG=17119930
[19:10:42] <Kevin`> Tom_itx: you realize you can sniff usb in pure software right? at least for everything the host sees
[19:11:01] <Tom_itx> yeah i was looking at some of that too
[19:11:01] <Kevin`> it's a bit annoying in windows, but it's still possible
[19:11:17] <Kevin`> wireshark can do it in either case, although there's more specialized tools too
[19:14:02] <jevin> Kevin`, wireshark can sniff usb in windows?
[19:15:05] <Kevin`> jevin: I think so, it's been a while since i've had cause to do it
[19:15:08] <Kevin`> Tom_itx: http://kwzs.be/~kevin/random-usb-capture.png
[19:16:02] <Tom_itx> might be worth a try
[19:17:08] <jevin> ive used it in linux before, its very nice but i found some things that it didnt sniff
[19:17:21] <Tom_itx> this would be windows
[19:17:26] <jevin> really helped out when doing LUFA stuff
[19:17:27] <jevin> OH
[19:17:44] <Tom_itx> lufa related
[19:17:47] <Kevin`> yeah, it's not perfect, but the alternative is niche market software and hardware bundles, which is kind of a last resort
[19:17:55] <jevin> so the problem i had was that i HAD to use a windows host. i installed virtualbox to use wireshark usb sniffing in the vm
[19:18:01] <jevin> the VM layer caused some problems
[19:18:13] <jevin> i think wireshark on native linux didnt have any problems
[19:18:15] <Kevin`> jevin: you should have installed windows in the guest
[19:18:22] <Kevin`> and given the guest the usb device
[19:18:29] <jevin> the machine wasnt mine to format =\
[19:18:38] <Tom_itx> so i need this on a 2nd pc to sniff the first?
[19:18:52] <Kevin`> running linux in the guest and windows on the host, you won't be using windows usb device drivers, and you will only see devices assigned to the gues
[19:19:02] <Kevin`> it's almost pointless, might as well not be using windows at all
[19:19:22] <Kevin`> Tom_itx: no, it shows devices connected to the pc
[19:19:32] <Tom_itx> k
[19:20:00] <Tom_itx> what about debugging a driver the device isn't loading yet?
[19:20:20] <Kevin`> Tom_itx: but if you need to reverse engineer or test windows drivers, you kind of need to be running them, hence the virtual machine with windows if you want to use linux capture stuff. the host will see the traffic and the guest will fiddle the device with it's driver
[19:20:35] <Kevin`> why would it matter if it's loaded or not?
[19:20:44] <Kevin`> it shows bus level traffic
[19:21:18] <Tom_itx> ok
[19:21:27] <Kevin`> you won't see electrical details of course, just logical level data
[19:21:41] <Kevin`> no checking the quality of the signal or micro-timing
[19:22:00] <Kevin`> unless the host controller somehow supports that
[19:27:33] <Jan-> hihi :)
[19:27:42] <amee2k> \o/
[19:27:49] <amee2k> our favourite swedish dude is back
[19:27:51] * amee2k runs and hides behind the sofa
[19:27:52] * Tom_itx gives Jan- a hankee
[19:27:59] * Jan- lights amee2k on fire
[19:28:04] <Jan-> Tom_itx: huh?
[19:28:16] <amee2k> hawt
[19:28:32] * amee2k <3 nomex jumpsuit
[19:28:37] <CapnKernel> It's to catch your emissions, Jan-.
[19:28:42] <Tom_itx> snot rag
[19:28:53] <Jan-> aye aye capn
[19:29:04] <Jan-> but it's OK, the lergi is drying up
[19:29:05] <CapnKernel> Tom_itx: Ey, careful what you call her!
[19:29:21] <Tom_itx> i haven't called her yet
[19:29:23] <Tom_itx> :)
[19:29:47] <Tom_itx> ....moving on...
[19:31:34] <Jan-> are you guys this mean to all the non-nerdy people who turn up
[19:31:44] <Tom_itx> absolutely
[19:32:26] <Tom_itx> if they don't turn and run, we welcome them to stay
[19:34:25] * Jan- offers Tom_itx one of her doughnuts
[19:35:05] <amee2k> mmh sounds like a bribe to me :P
[19:35:17] <Tom_itx> careful.. she's been sick
[19:35:40] <amee2k> want some rubbing alcohol to go with it?
[19:36:37] <amee2k> i think acetone is a useful disinfectant too but doesn't go so well with donuts
[19:37:03] <Jan-> It has jam inside
[19:37:05] * Jan- tempts
[19:37:09] <Jan-> ...strawberry jam....
[19:39:17] <amee2k> mmh some people at the local university are organizing a protest against ACTA
[19:40:29] * Jan- feeds the triffid
[19:43:05] <karlp> triffid demands MOAH!
[19:43:54] <amee2k> its saturday afternoon, wondering if i should stop by
[19:44:22] <amee2k> i've never heard of the address in that email though :P
[19:46:03] <amee2k> not even google maps seems to know it. but any of the locations it comes up with for it are smack dead in the middle of the city
[19:46:11] <amee2k> i have no idea how i'm supposed to get there lol
[21:37:14] <Roamin> Can someone please explain to me why PORTD is set to 0x55 instead of 0xFF ? http://pastebin.com/EMvJDpBk
[21:39:17] <rue_mohr> !seen abcminiuser
[21:39:20] <rue_mohr> ugh
[21:39:31] <Tom_itx> the array is loaded with 0x55
[21:39:37] <Tom_itx> the port is set to 0
[21:39:56] <Tom_itx> which disables pullups
[21:39:59] <rue_mohr> hm whats 24 hours in seconds?
[21:40:01] <rue_mohr> 3600?
[21:40:05] <Tom_itx> a while
[21:40:09] <LoRez> 86400
[21:40:13] <rue_mohr> ta
[21:40:13] <Tom_itx> he was here this morning
[21:43:40] <Roamin> but if i do PORTD = array[3][0]; , arent I setting portd to output 0xFF ? why is 0x55 the value outputed? if i comment out array[34][0] = 0x55 , i get the 0xFF that i should have
[21:44:40] <Roamin> because the dimension is 0 ?
[21:44:59] <Tom_itx> look for a typo in the code
[21:45:02] <Tom_itx> i see it
[21:45:04] <Tom_itx> do you?
[21:45:18] <Tom_itx> err why are you using 34?
[21:45:27] <Tom_itx> err 40 for the size
[21:45:32] <Roamin> nope, i'll look some more
[21:45:38] <rue_mohr> is making an array with a dimention 0 legal?
[21:45:43] <rue_mohr> cant be, has to be 1
[21:45:51] <Tom_itx> it's zero length
[21:45:56] <Tom_itx> i dunno
[21:46:08] <rue_mohr> it multiplies to work out how many memory elements to set aside
[21:46:11] <Tom_itx> you may be right
[21:46:13] <rue_mohr> 40*0 = 0
[21:46:18] <Tom_itx> when you declare it
[21:46:26] <Tom_itx> but when you access it...
[21:46:27] <rue_mohr> so its prolly setting one memory element to the last thing , aka 0x55
[21:46:46] <rue_mohr> Roamin, make the array [40][1]
[21:47:04] <rue_mohr> and use indexes [0-39][0-0]
[21:47:22] <Roamin> ah... silly me
[21:47:59] <Roamin> the referencing starts at 0 , but the actual declaration needs a value .. thanks a lot.
[21:48:39] <rue_mohr> remember that microcontrollers quietly segfault
[21:49:32] <rue_mohr> !time
[21:49:33] <tobbor> My watch says its 19:46 Mon Feb 06 2012
[21:49:38] <Roamin> so thats why it compiled without warnings or errors
[21:49:40] <rue_mohr> !seen abcminiuser
[21:49:41] <tobbor> abcminiuser was last seen in #avr on Feb 04 15:21 2012
[21:50:00] <rue_mohr> Roamin, no, it should have thrown a compiler warning
[21:50:05] <rue_mohr> try compileing with -Wall
[21:50:25] <Tom_itx> rue i told you he was here already
[21:50:33] <Tom_itx> silly canuck
[21:50:42] <rue_mohr> yea yea
[21:50:47] <rue_mohr> have to make sure the bot works
[21:51:02] <rue_mohr> it will now automatically start working every day
[21:51:22] <Tom_itx> it's 4:42AM where he is right now
[21:51:26] <Tom_itx> i doubt he's up
[21:51:35] <rue_mohr> see now, thats just lazy
[21:51:55] <Roamin> avr studio 5 is already using -Wall to compile, yet not giving me a warning or error.
[21:52:05] <rue_mohr> ooh studio
[21:53:12] <Roamin> tried to compile a similar code in visual studio (c++) and spits out c2366 error, cannot allocate an array of constant size 0.
[21:53:37] <Roamin> glad i used the #avr debugger, thanks ;)
[21:54:00] <rue_mohr> huh
[21:54:07] <rue_mohr> gcc dosn't throw a warning
[21:55:00] <rue_mohr> but whatever element you try to access it uses the same memory space
[21:55:22] <Roamin> i dont know much about programming , just enough to get around here and there , but whenever some weird thing compile in avr studio and not elsewhere, i wonder if it has anything to do with "Ansi c"
[21:55:31] * rue_mohr adds that to the list of stupid things about gcc
[21:55:39] <Roamin> like some things used to compile, which now throw warnings/errors
[22:05:49] <Tom_itx> anybody ever hear of or use SniffUSB?
[22:06:24] <nevyn> wireshark does usb these days btw.
[22:06:35] <Tom_itx> linux only it says
[22:06:38] <nevyn> ah.
[22:06:53] <Tom_itx> just updated mine
[22:06:56] <nevyn> that's not a problem for me.. but yeah.
[22:07:13] <Tom_itx> the platform is windows
[22:07:24] <CapnKernel> nevyn: hi
[22:07:47] <nevyn> CapnKernel: hi
[22:08:19] <nevyn> Tom_itx: so you could still use wireshark but it's getting fiddly
[22:08:44] <nevyn> (using virtualbox on linux to run windows and map the usb device while sniffing the real usb from the hypervisor but bleh.
[22:17:47] <rue_mohr> anyone want to help me make a usb based digital scope?
[22:18:00] <rue_mohr> I'm short on time and could use help coding
[22:20:39] <ziph> With an AVR?
[22:20:47] <Tom_itx> what else?
[22:21:00] <ziph> Something marginally capable? :)
[22:21:14] <Tom_itx> xmega would be
[22:21:34] <Tom_itx> the new usb enabled ones look interesting
[22:24:36] <rue_mohr> low freq, my primary application is for tuning mechanical servos
[22:25:12] <rue_mohr> but I'm trying to do it in a way that suits faster sample rates too
[22:25:36] <rue_mohr> if I weren't half asleep when I get home from work I'd be done by now
[22:25:48] <Tom_itx> quit?
[22:26:09] <rue_mohr> I need to write code for an avr that grabs 455 adc samples
[22:26:33] <rue_mohr> and code that communicates at 19200 baud for an avr running at 18.43Mhz
[22:26:40] <rue_mohr> (iirc)
[22:27:03] <Tom_itx> yeah
[22:27:23] <ziph> If you're not interested in the project itself why don't you buy a cheap 50MHz-100MHz CRO? :)
[22:27:24] <rue_mohr> my eyes are literrally snapping shut at this point
[22:27:29] <rue_mohr> makes it impossable to code
[22:27:56] <rue_mohr> I need a low freq storage scope, I'v written the first level of the pc code on the weekend
[22:28:10] <rue_mohr> I have an avr breadboaded up
[22:28:27] <rue_mohr> like to make progress before saturday
[22:28:46] <rue_mohr> I'm willing to totally share the linux code I'v got for the pc side
[22:29:35] <brainteaser> anyone can provide the code to play airtel monophonic on avr
[22:29:52] <rue_mohr> play what?
[22:29:58] <rue_mohr> a game or music?
[22:30:03] <brainteaser> to play music
[22:30:09] <brainteaser> to play nokia tune
[22:30:31] <rue_mohr> is there an audio clip of it around?
[22:30:34] <rue_mohr> that would be easy
[22:30:51] <rue_mohr> store it on a external i2c eeprom and play it back thru a pwm channel
[22:31:12] * rue_mohr keeps re-opening his eyes
[22:31:45] <brainteaser> no jst a simple code to play on motor
[22:32:02] <rue_mohr> pwm can go to a speaker too
[22:43:45] <rue_mohr> I'm still falling asleep, gngith
[22:43:56] <Tom_itx> well it's time now
[22:43:58] <Tom_itx> gnite
[22:44:05] <rue_mohr> http://eds.dyndns.org/~ircjunk/images/scope.png
[22:44:26] <Tom_itx> i think i've seen that
[23:12:10] <CapnKernel> rue_mohr: There's a protocol called SUMP that you might find useful. If you were to make such a scope SUMP compatible (there are several SUMP-compatible devices out there), then you've already given people a choice of software they can run on their PC. http://www.sump.org/projects/analyzer/
[23:13:22] <Kevin`> CapnKernel: SUMP does analog data?
[23:15:41] <CapnKernel> Er, I think so, by encoding the analog values using the digital signals, 16 bits per channel. It seems to have been done before; http://dangerousprototypes.com/2011/07/10/sump-logic-analyzer-with-2-scope-channels/
[23:19:54] <Kevin`> yeah it does look like it