#avr | Logs for 2012-04-18

Back
[01:29:17] <specing> u32 cnt;
[01:29:20] <specing> ++cnt;
[01:29:38] <specing> results in lds's and sts's instead of ld(d)s
[01:29:38] <ziph> Would you like some vowels with that?
[01:30:09] <specing> I found that this issue has gone unfixed for 8 years now!
[01:30:36] <specing> there are forum posts on this subject from 2004...
[01:33:35] <specing> I've found a workaround though :)
[01:36:12] <CapnKernel> inline asm?
[01:38:01] <specing> Well the trick involves one line of inline asm, but then C code uses ld/st
[01:40:14] <specing> and it uses displacement ;)
[01:40:23] * specing is sooo happy
[01:43:35] <Casper> sometime I wonder why they don't fix such bug
[01:43:39] <Casper> but
[01:43:54] <Casper> does the execution time stay the same with one or the other?
[01:44:02] <specing> No
[01:44:27] <specing> the pointer way requires 2 more cycles to ldi the pointer
[01:44:37] <specing> but it is much more space efficient
[01:45:04] <specing> It is understandable to use lds/sts at -O2, but it keeps using it at -Os!
[01:46:26] <Casper> ok
[01:48:18] <specing> Oh no, GCC doesen't undestand that incrementing a register sets SREG flags
[01:48:42] <specing> resulting in anding the register with itself and brne on if(reg == 0)...
[02:00:01] <Casper> aaarrrg
[02:00:08] <Casper> I was tired...
[02:00:22] <Casper> yawn and bang, almost awake :(
[04:23:34] <Tom_itx> hey grummund you having a bad connection day?
[05:11:15] <specing> Haha, my battery charger SMPS is only 33 % efficient, LOL
[06:02:44] <molavy> hi
[06:04:36] <molavy> what means k and R and SR and above line and underline on ceramic disc capacitor
[06:04:37] <molavy> ?
[06:11:04] <molavy> any idea?
[06:21:51] <KebabBob> Are sure it's a capacitor?
[06:22:07] <KebabBob> Could be a varistor
[06:23:11] <KebabBob> https://www.google.is/search?q=varistor&um=1&ie=UTF-8&hl=en&tbm=isch&source=og&sa=N&tab=wi&ei=wqGOT8H3F5Cq8APb3dTUCw&biw=1413&bih=866&sei=xKGOT4fgCY7S8QPwoNmbCw
[06:25:10] <molavy> no, i bought 1pf to 100nf ceramic disc capacitor in one pack
[06:25:42] <molavy> some of them have to line of code on it
[06:25:51] <molavy> like this
[06:26:03] <molavy> b
[06:26:13] <molavy> 392 with under line
[06:26:28] <molavy> B is on 392 that has underline
[06:34:03] <Tom_itx> molavy, http://www.marvac.com/fun/ceramic_capacitor_codes.aspx
[06:34:25] <Tom_itx> k is tolerance
[06:35:37] <Tom_itx> specing you should write tighter code :)
[06:38:52] <Sgt_Lemming> http://i.imgur.com/bbvR9.jpg <--- anyone see any glaring mistakes there? apart from the lack of holes I mean
[06:46:52] <CapnKernel> You really want to test out the silkscreen with the lemming, eh?
[06:47:29] <Sgt_Lemming> lol
[06:52:45] <molavy> what means under line , some have and some don't have underline
[06:52:51] <molavy> ?
[06:53:31] <molavy> and some have "NPO" on it
[06:57:35] <molavy> that means Non polarized.
[06:57:51] <molavy> molavy,thanks
[09:27:12] <amee2k> hmm
[09:27:46] <amee2k> weird question, but will running the filament of a 5V tube off a 6V supply damage it?
[09:29:56] <dirty_d> it probably just wont last as long
[09:30:14] <amee2k> like, 60 years vs. 80 year?
[09:30:21] <amee2k> or a week vs. 80 years?
[09:30:23] <dirty_d> no like 10 vs 80
[09:30:25] <dirty_d> i dunno lol
[09:30:28] <amee2k> hmm :/
[09:30:30] <P3X018> When a portx is set as input (say DDRx = 0x00), what does it mean to set the port value a high, as in PORTx = 0xff. I read it enables pull-up resistors, but I don't understand what it mean, any ideas?
[09:30:31] <dirty_d> or maybe a week, only one way to find out
[09:30:38] <amee2k> lol
[09:31:13] <dirty_d> P3X018, it means a resistor is connected from it to VCC internally
[09:31:30] <dirty_d> so it doesnt just float at some unknown voltage
[09:31:38] <amee2k> i could always waste some voltage in a series resistor i suppose
[09:31:42] <dirty_d> so you know if its not connected, its at 5V or whatever
[09:31:53] <dirty_d> amee2k, sounds like a good idea
[09:32:32] <amee2k> for some weird reason 6V and 12V heaters are exceedingly common for gain tubes, but 5V is used by a lot of rectifiers...
[09:32:43] <P3X018> dirty_d: Ok so it's like a good practice to avoid undefined/unknown values?
[09:33:12] <dirty_d> P3X018, you shouldnt let the inputs just float
[09:33:23] <dirty_d> its possible a high voltage could accumulate on it and damage it
[09:33:41] <amee2k> high voltage would drain off through the esd clamping diodes
[09:33:45] <P3X018> I see...
[09:33:57] <amee2k> but some CMOS input stages enter weird states when the input floats
[09:34:11] <dirty_d> P3X018, it would also prevent unwanted interrupts etc from the thing vloating around
[09:34:14] <OndraSter> also it can break SPI or such
[09:34:15] <dirty_d> if you had it setup like that
[09:34:18] <amee2k> and then draw a bit more current than when settling at a proper logic state
[09:34:32] <OndraSter> because when SPI's SS line is driven low, it enters slave mode
[09:34:40] <amee2k> not enough to damage anything from what i know, but enough to be a problem in power sensitive applications
[09:34:44] <OndraSter> I had a bug where I was setting SPI master and enabling it before setting proper DDR
[09:34:50] <amee2k> and generally not a lot of style points
[09:34:54] <OndraSter> and it would got stuck during the start often
[09:35:18] <amee2k> i once forgot to tie off the CMOS "enable" pin on an analog muxer
[09:35:46] <amee2k> and was wondering why my signal kept going out every time it would cross so-many volts unless rise time was VERY slow
[09:36:19] <amee2k> turns out that the parasitic capacitance between pins halfway across the IC was enough to make the enable input "follow" the other signal
[09:39:07] <dirty_d> scary... http://imgur.com/r/funny/2rAEL
[09:39:13] <amee2k> hmm 6X4 is cheap and not too expensive
[09:39:52] <amee2k> four EZ90s for 20 quid
[10:01:49] <specing> Tom_itx: I guess the biggest losses are the schottky diode and 2.2 ohm current sense resistor...
[10:01:59] <specing> Not sure how to get rid of those...
[11:45:34] <tosmo> how can i compile c++ in winavr? im usually working on linux but wanted to use the simulator in avr studio 4 which i am running in a virtual box. it seem it will only compile c, but not c++ code
[11:48:34] <karlp> is winavr meant to support c++?
[11:50:00] <Steffanx> Yes
[11:51:56] <Steffanx> http://www.societyofrobots.com/robotforum/index.php?&topic=5135.msg40141#msg40141 isn't that 'it' tosmo ?
[11:57:29] <tosmo> Steffanx: thanks.. i saw that dialogue but didn't care about the executable (on linux, i just call avr-gcc and it somehow figures out the details on its own..)
[11:58:18] <Steffanx> just give it a try :)
[11:59:07] <tosmo> still waiting for the winavr install. forgot to save the vm snapshot last time ;)
[12:15:00] <tosmo> hm no make target.. can i just load a compiled .elf into the simulator?
[12:15:47] <tosmo> or .hex
[12:19:19] <vsync_> Anyone knows a place where you could still get mercury switches?
[12:19:41] <vsync_> I really need a mercury switch since I think it's the most reliable for the job
[12:20:00] <LoRez> what "job" is that?
[12:20:43] <vsync_> a flight computer for a water rocket actually
[12:21:26] <LoRez> no, you want an accelerometer and something to actually process the output
[12:21:37] <vsync_> no, i really don't
[12:21:51] <vsync_> I found a tilt ball switch, which could also do the job
[12:22:25] <vsync_> my purpose is not to collect data, the purpose is for the switch to act as a trigger for the ic to run a servo that releases the parachute
[12:22:30] <LoRez> under acceleration, the physical switches will give you output that is not terribly indicative of what's actually happening
[12:23:04] <vsync_> yea, but accuracy is irrelevant in this case
[12:23:47] <LoRez> also, a glass mercury switch in a rocket is about the worst idea ever for not poluting mercury into the ground
[12:24:01] <vsync_> you aren't listening now are you
[12:24:24] <vsync_> also, mercury switches come in plastic casings mostly. I've had a few but I've lost 'em
[12:24:34] <LoRez> considering you're not making any noise, that's rather irrelevant.
[12:25:52] <vsync_> well, look. The accuracy is irrelevant. So are glass casings because they are usually plastic. And that's what I'm after. Now, after the acceleration, which is < 1s with the water rocket I'm building, the rocket will undergo negative g's, which is when the mercury (or ball) closes the circuit
[12:26:18] <vsync_> which acts as a trigger for the avr to run a servo, which releases the parachute
[12:26:52] <dirty_d> an accelerometer might be more reliable
[12:26:56] <vsync_> now I have to do a debug flight or two, to see how long it will take after the acceleration for the switch to close the circuit
[12:27:03] <karlp> are "mercury switches" still even mercury?
[12:27:16] <LoRez> mercury switches don't like vibration much
[12:27:21] <vsync_> I think they call a lot of tilt switches 'mercury'
[12:28:08] <karlp> vsync without using a few of them, you're kinda relying on the rocket taking a perfect path to trigger right?
[12:28:29] <karlp> what if it tumbles back down like a propeller or anything weird and freaky?
[12:28:49] <vsync_> karlp no actually it doesn't
[12:29:03] <vsync_> the negative g (as in slowing down, after burnout) should do the trick
[12:29:27] <LoRez> assuming it falls back straight down and doesn't arc over
[12:29:29] <karlp> if you say so,
[12:29:30] <vsync_> because the initial acceleration is somewhere between 15-20G
[12:29:36] <vsync_> LoRez still no
[12:29:58] <karlp> how are you orienting a mercury switch to detect this?
[12:30:08] <vsync_> upside down, naturally
[12:30:38] * LoRez would laugh if it followed an arc path and triggered the chute once it impacted the ground
[12:30:40] <karlp> and you're hoping that whenit slows down it's going to magically slam to the other end?
[12:30:48] <vsync_> the purpose is not for the switch to trigger at apogee, it will trigger before that, no matter how it arcs or not. I have to program a timer for the servo
[12:30:59] <vsync_> yes it's physics 101
[12:31:08] <karlp> whatever you say :)
[12:31:19] <karlp> the casing slows down the same amount though
[12:31:35] <karlp> seeing as they are, you know, both mounted on the rocket.
[12:31:36] <vsync_> no...
[12:33:35] <vsync_> the same principle as when you're in a subway, basically
[12:33:57] <vsync_> if you don't hold on to something, when it slows down...
[12:34:27] <vsync_> it's newton's first law
[12:35:23] <vsync_> the casing of the switch is secured of course, however the ball - or mercury - inside can travel free
[12:37:14] <karlp> but I don't fly forwards when I take my foot off the gas pedal,
[12:37:27] <karlp> and that's what you're relying on to make the ball move to other end and be detected
[12:37:38] <karlp> it only works if you break fast enough
[12:39:25] <vsync_> well yes but you cannot compare it to that
[12:39:46] <LoRez> you cannot compare it to the subway with active brakes either.
[12:39:59] <vsync_> true also
[12:40:27] <LoRez> karl's analogy is closer
[12:40:41] <vsync_> however, the slowing down will be much greater because first of all, the rocket will have a 110 mm diameter, so the resistance of air will be sufficient
[12:41:25] <vsync_> also... if you want to go into details, the rolling energy of the car amongst other things, not comparable
[12:42:28] <vsync_> it's basically around 17 G's for ~500-750 ms, after the acceleration it will slow down greatly
[12:43:15] <vsync_> actually, burn time is lower than that, under 500 ms
[12:43:43] <Tom_itx> empty a bunch of CF bulbs and make your own
[12:44:00] <dirty_d> just dont attach the nosecone and put a wieght in it
[12:44:04] <dirty_d> then it will come out itself
[12:44:11] <dirty_d> and hold itself on during acceleration
[12:44:33] <dirty_d> maybe
[12:45:27] <vsync_> the flight computer, batt, servo and chute will provide enough weight to bring the center of gravity forward
[12:45:53] <vsync_> rest of the balancing will be done with fins, this isn't the first water rocket i'm building, however it's the first i'm going to house a flight computer in
[12:47:23] <Tom_itx> how much pressure is the water under?
[12:47:42] <Tom_itx> it must be considerablly more than those toys you can buy
[12:47:48] <vsync_> yeah
[12:48:01] <Tom_itx> and why not solid rockets?
[12:48:16] <vsync_> water rockets are cheaper and funnier tbh
[12:48:27] <vsync_> also, you need a permit for pyro
[12:49:05] <Kevin`> Tom_itx: in some countries it's harder to get the materials for rockets and such (aside from buying them premade) because they can be used for explosives
[12:49:07] <vsync_> the fill volume is roughly 1/3 - 1/4 of the total volume, and i've launched rockets with 8-10 bars
[12:49:35] <vsync_> that's around 120-140 in psi
[12:50:29] <Tom_itx> and it goes high enough to warrant a chute?
[12:50:47] <vsync_> way high
[12:51:00] <Tom_itx> do you need FAA clearance?
[12:51:17] <vsync_> :D not that high :)
[12:52:23] <vsync_> I've done this for years, never flown one with electronics. But according to the flight path and time my biggest one flew up around 170 m
[12:52:41] <Tom_itx> http://www.kloudbusters.org/
[12:52:55] <vsync_> and i've seen people with ball park figures with similar rockets
[12:53:19] <vsync_> it was a 6-liter rocket launched with 12 bars
[12:53:56] <vsync_> the record i believe is somewhere at 630 meters or so by us water rockets
[12:55:48] <vsync_> but they build slim rockets made out of fluorescent tube coverings laminated with carbon fiber
[12:58:26] <Tom_itx> use a timer
[12:59:05] <dirty_d> water rockets can be pretty damn powerful
[12:59:28] <Tom_itx> http://www.apogeerockets.com/Electronics_Payloads/Altimeters
[13:00:05] <dirty_d> i wonder if you could use co2 somehow
[13:00:21] <dirty_d> you have to like heat it to get it to boild fast enough
[13:00:37] <Tom_itx> the thrust is in the compressed water
[13:00:45] <dirty_d> right
[13:00:46] <Tom_itx> pressurized*
[13:00:55] <dirty_d> but if you used co2 you would have a constant 800psi
[13:01:41] <dirty_d> it probably wouldnt work though because it wouldnt boil off fast enough
[13:16:46] <Thetawaves> dirty_d, you missed the point
[13:16:59] <Thetawaves> dirty_d, a water rocket will go nowhere if it's simply filled with gas
[13:17:00] <dirty_d> probably
[13:17:12] <dirty_d> Thetawaves, i meant use c02 to push the water out
[13:17:18] <Thetawaves> at least, not nearly as far as it does with the water
[13:17:32] <Thetawaves> why not any gas? air?
[13:17:43] <dirty_d> less volume because its a liquid
[13:19:24] <ThersiT> I've read that the AVR Dragon can only flash up to 32kb but Atmel's site says it'll do up to 256kb. Anyone know for sure?
[13:20:04] <ThersiT> I' m working with a 644 that has 64kb.
[13:20:06] <LoRez> it shouldn't have a 32k limit, but it's possible.
[13:20:11] <LoRez> it's easy to test
[13:21:08] <ThersiT> That's the last thing I'm wondering before I buy one.
[13:21:26] <LoRez> just using it to program with?
[13:22:06] <ThersiT> Yes. But i'd like to jtag debug.
[13:22:49] <OndraSter> Dragon had software limit of 32kB
[13:22:55] <OndraSter> it was later hacked to remove that
[13:22:59] <OndraSter> and later it was removed by Atmel themselves
[13:23:41] <OndraSter> it works with _any_ AVR/AVR32 chip except few ones (some attiny ones)
[13:23:42] <Tom_itx> ThersiT, the dragon 32k limit has been lifted
[13:23:47] <Steffanx> They say it was hacked ....
[13:23:57] <Tom_itx> it was hacked then atmel lifted the limit
[13:23:59] <Steffanx> They only changed 1 byte in a DLL ..
[13:24:28] <ThersiT> Ah, that explains it. I'm using a dasa now. Think dragon would be a good upgrade?
[13:24:40] <Tom_itx> for what?
[13:25:12] <specing> ThersiT: build yourself a copy of RikusW's programmer
[13:25:13] <Tom_itx> for just programming, mine would be :)
[13:25:25] <specing> or AVRISPMKII
[13:25:49] <specing> or help Tom_itx reach his goal of having a money shower :)
[13:25:57] <LoRez> Tom_itx: I was going to pimp yours, but he wanted jtag too
[13:26:08] <Tom_itx> well then get a dragon
[13:26:20] <specing> naaaa
[13:26:21] <Tom_itx> it comes with no cables
[13:26:27] <ThersiT> I only really need programming but I want to get into jtag debuging.
[13:26:40] <Tom_itx> you don't need jtag that often really
[13:26:52] <LoRez> I have a usbtiny, tom's programmer, and a dragon. I use tom's way more than the other two
[13:27:00] <Tom_itx> i've got 2 or 3 that will do jtag and i never use them
[13:27:09] <OndraSter> I use only JTAG :X
[13:27:13] <OndraSter> when supported
[13:27:17] <Tom_itx> you're the odd one :D
[13:27:21] <OndraSter> I know
[13:27:24] <OndraSter> I also use assembler rather C often
[13:27:26] <OndraSter> :P
[13:27:28] <specing> I don't even have jTAG :D
[13:27:33] <Tom_itx> but we still like you
[13:27:36] <OndraSter> <3
[13:27:55] <OndraSter> anyone ever routed some tens-of-MHz analog traces? :P
[13:28:07] <Tom_itx> no
[13:28:22] <Tom_itx> you must be very careful though
[13:28:27] <OndraSter> I know
[13:31:34] <RikusW> specing: why not load my jtagice mki onto your m8u2 ? ;)
[13:32:22] <specing> Will it fit?
[13:32:39] <RikusW> easily
[13:32:52] <specing> Also, I just dissasembled my USBtinyISP in favor of AVRISPMKII on m8u2
[13:33:02] <RikusW> I'll upload the one supporting newer avr's sometime
[13:33:10] <specing> Oh, and I don't think I have any JTAGable chips here...
[13:33:36] <specing> Its just good ol' m8
[13:33:38] <LoRez> Tom_itx: how'd you fare in the storms?
[13:34:02] <specing> There were storms? Where? When?
[13:34:07] <ThersiT> I dont even know how to use jtag yet.. maybe I should just blow it off.
[13:34:18] <ThersiT> Tom_itx: should I just google your name to find yours?
[13:34:31] <RikusW> Run the sky is falling :-P http://en.wikipedia.org/wiki/Asteroid-impact_avoidance
[13:36:13] <specing> RikusW: Haha, I place my bet on humanity destroying itself before that happening
[13:38:05] <Tom_itx> ThersiT, http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[13:38:35] <Tom_itx> there's a 'purchase' on the menu list
[13:38:58] <specing> RikusW: Do you know of any DIY USB programmer that also includes a CDC serial port?
[13:38:58] <ThersiT> Cool. I'll check it out.
[13:39:32] <specing> Im kind of tired of having to drag my pl2303 and its thick usb cable around my desk...
[13:39:38] <RikusW> specing: mine does
[13:39:52] <specing> All that in 8k?
[13:40:13] <RikusW> ThersiT: using jtag in AS4 works the same as if using the simulator
[13:40:33] <RikusW> specing: about
[13:40:34] <Tom_itx> specing, i don't think mine could since it supports PDI and TPI using the hardware usart
[13:40:43] <specing> RikusW: Does it also do SPI? .. probably no JTAGable chips around here...
[13:40:55] <Kevin`> specing: avrstudio wouldn't work with a programmer that has a custom interface. other than that it would be technically pretty easy
[13:41:18] <specing> If you ask me: fuck avrstudio
[13:41:24] <RikusW> specing: SPI/HVPP/HVSP JTAG
[13:41:47] <Tom_itx> specing, i'd rather get my rocks off on something other than that
[13:41:50] <specing> RikusW: And all that fits in 8KB?
[13:42:08] <RikusW> will have to check, but I think so
[13:42:20] <specing> Im just interested in ISP and a serial port ...
[13:42:23] <ThersiT> Oh. RikusW showed me your page yesterday.
[13:44:27] <OndraSter> capn
[13:44:27] <OndraSter> oh
[13:44:29] <OndraSter> he is not here
[13:45:08] <OndraSter> anybody knows how much more expensive are 4 layer boards @ CapnKernel's?
[13:45:25] <RikusW> specing: and if I do get my dW uart working you'd want that too ? ;)
[13:45:55] <specing> Its not that critical :D
[13:46:16] <specing> For now ISP and a serial port is all I need
[13:46:43] <vsync_> Thetawaves and dirty_d, the thing is water won't compress as much as air does, also, another reason why you can't use water-only is because the longer the water stays in the rocket, the less distance it will travel
[13:46:43] <specing> RikusW: How come you don't have it working yet?
[13:46:56] <specing> RikusW: I saw you wrote a whole analysis of the protocol...
[13:47:08] <vsync_> compressed air will store a lot of energy and act as a 'pusher'
[13:47:42] <Tom_itx> OndraSter, you could ask him
[13:47:50] <Tom_itx> probably double
[13:47:51] <OndraSter> he is not here right now :)
[13:47:56] <OndraSter> so I have to wait
[13:48:04] <OndraSter> its just if somebody hasn't ordered from him :)
[13:48:08] <vsync_> also, newton's third law - air or even co2 solely will not have enough mass to act as the propellant
[13:48:12] <Tom_itx> no just 2 sided for me
[13:48:25] <Tom_itx> it's probably 2x
[13:48:40] <OndraSter> well, iTead wants considerably more for 4 layers
[13:48:54] <Tom_itx> yeah
[13:49:01] <vsync_> some guys like U.S Water Rockets who hold the world record, will use co2 instead of air as the 'pusher', but it will only give significant results when going to very high pressures.
[13:49:05] <Tom_itx> same mfg but maybe he can get a better deal
[13:49:34] <OndraSter> 2 layer 5x5 wants $10, 4 layer wants $65
[13:49:41] <Tom_itx> vsync_ do they use various size nozzles to release the water?
[13:49:47] <OndraSter> and that is 5x5cm :/
[13:49:50] <Tom_itx> ouch
[13:50:00] <OndraSter> 10x10 is $99
[13:50:53] <OndraSter> I could order that locally for similar prices probably
[13:51:13] <vsync_> Tom_itx well, of course... Personally i use 9mm and 13mm, 9mm gives a bit more spectacular burn, whereas 13mm gives better results. Stuff like the DeLaval-nozzle in my case is irrelevant and will not give any noticeable performance boost, since it pretty much requires the water to travel at Mach 1 speed
[13:55:45] <RikusW> specing: I didn't have too much time lately...
[13:56:21] <dirty_d> vsync_, i was saying use c02 isntead of air to propell the water
[13:56:34] <dirty_d> constnat 800psi if you cna heat it or something
[13:56:38] <specing> RikusW: bulls?
[13:56:39] <specing> :D
[13:57:11] <RikusW> getting a dW setup to interface in raw hex is quite easy, doing the protocol stuff won't be too hard, but interfacing it to a debugger....
[13:57:44] <RikusW> I still need to learn about either gdb or elf files directly....
[13:58:21] <RikusW> specing: and horses too
[14:00:26] <vsync_> dirty_d yeah but not a good idea to heat it, could deform the rocket
[14:00:52] <RikusW> specing: everything including the (partly complete) dW code take 6kb
[14:01:43] <RikusW> specing: don't you still have a m32u2 lying about ?
[14:02:26] <Thetawaves> Tom_itx, do you offer volume discounts?
[14:02:56] <Tom_itx> haven't yet
[14:03:06] <specing> RikusW: Yes
[14:03:24] <Tom_itx> Thetawaves, except postage possibly
[14:03:26] <specing> RikusW: In a 250-chip box, alone, LOL
[14:03:55] <Thetawaves> maybe i'd like to use your programmer in my kits
[14:03:57] <RikusW> planning on making a pcb for it anytime soon ?
[14:04:06] <specing> Nah
[14:04:28] <specing> I'll just reprogramm the m8u2
[14:04:30] <Thetawaves> maybe because i haven't tested it
[14:04:36] <RikusW> I still have 2 empty pcb's left here
[14:05:09] <RikusW> specing: interested ?
[14:06:18] <Tom_itx> Thetawaves, it works with studio 4, 5, 5.1, avrdude under windows linux and osx i believe
[14:06:23] <specing> Well unless you can superglue it onto a plane that by chance passes 1m away from my window...
[14:06:54] <RikusW> specing: postage is about 2.5Euro
[14:08:53] <specing> tempting...
[14:12:58] <specing> RikusW: are those boards from capnkernel?
[14:13:38] <RikusW> no, bosco.co.za
[14:15:03] <RikusW> specing: I'm out of 16MHz crystals and the AVcc inductor and the 1 + 10uF caps
[14:15:29] <RikusW> but I could put on the other resistors and caps
[14:18:13] <specing> On a side note:
[14:18:15] <specing> < specing> Haha, my battery charger SMPS is only 33 % efficient, LOL
[14:18:49] <RikusW> ugh
[14:19:07] <RikusW> re-engineer it ;)
[14:20:26] <specing> I guess the biggest losses are the schottky diode and 2.2 ohm current sense resistor...
[14:21:01] <specing> schotky is 0.5 V drop, resistor same, current is ~200 mA, battery is ~1.4V
[14:23:29] <RikusW> use a smaller resistor...
[14:30:44] <specing> but then the inacurate measurements get even more inacurate
[14:31:11] <RikusW> why ?
[14:31:34] <specing> because politicians and WW3
[14:31:53] <specing> LOL
[14:32:41] <specing> maybe 1000x gain would work
[14:32:54] <specing> but then the gain resistors have to be pretty darn accurate
[14:33:09] <RikusW> rather use 100x
[14:33:37] <RikusW> a 0.2 Ohm resistor should be better
[14:48:15] <ThersiT> Tom_itx: Are there any size limits on your programmer? Should it work fine with a mega644p (64kb)?
[14:50:21] <ThersiT> Also are you in the US? Wondering if there'll be any import fees.
[14:51:59] <hattorihanzo> hey guys, quick egale question
[14:52:01] <RikusW> afaik he is in us, and there is no size limit
[14:52:12] <hattorihanzo> what crystal item do yo use of schematics?
[14:53:21] <ThersiT> Cool. Ordering one rite now. :)
[14:54:12] <RikusW> hattorihanzo: what schematics ?
[14:54:32] <hattorihanzo> well for a mega 8
[14:54:41] <hattorihanzo> i see a bunch of differnt footprints for crystals
[14:55:34] <RikusW> normally a HC49 type crystal
[14:56:03] <hattorihanzo> yea, i see these hc49/s and u somethings that look like the footpirnt i need
[14:56:08] <hattorihanzo> just wasnt sure
[14:56:09] <hattorihanzo> thanks
[15:00:46] <Tom_itx> ThersiT, it will work
[15:01:51] <ThersiT> Tom_itx: thanks looking forward to it.
[15:02:05] <Tom_itx> where are you?
[15:03:45] <OndraSter> specing, doesn't have atmega ADC built in gain?
[15:03:51] <OndraSter> or is it just for differential measuring
[15:04:30] <specing> OndraSter: idk
[15:11:42] <ThersiT> Texas
[15:11:53] <Tom_itx> oh ok
[15:52:48] <OndraSter> I must say, making products and selling them in the EU is not fun
[15:52:54] <OndraSter> there is all this crap as RoHS, CE, ..
[15:53:05] <OndraSter> you must get 10000 certificates and what not
[15:53:08] <OndraSter> :(
[15:54:24] <vsync_> note to self: never ever read boy genius report again. the zach guy there is such a god damn iFanatic it's unbelievable. He managed to write more about ipads than the thing the article was about - cryengine3
[15:56:42] <GNUtoo-desktop> hi, I've that: warning: left shift count >= width of type
[15:56:55] <OndraSter> heya :)
[15:56:59] <OndraSter> show us your code
[15:57:06] <GNUtoo-desktop> with the following code: uint32_t addr = 0; addr |= getchar_uart() << 16;
[15:58:31] <GNUtoo-desktop> it also warn the same way with the code at https://gitorious.org/gnutoo-personal-arduino-projects/serprog-duino/blobs/master/serprog.c
[15:58:40] <astv> vsync_: what's wrong with i?
[15:59:37] <vsync_> if the article is about a game engine, such as the cry engine, how is it possible that you - first of all - even start the article with talking about ipad crap?
[15:59:56] <astv> can the ipad run the game engine?
[16:00:04] <astv> if so, that's pretty news big, nah sayin?
[16:00:05] <vsync_> no, it is totally irrelevant
[16:00:13] <vsync_> it does not, and will never
[16:00:26] <astv> strange then
[16:00:29] <astv> I didn't read the article
[16:00:55] <vsync_> read a few other articles, the guy is a total ifan and um. Well it's enough for me to cross that site out
[16:05:36] <GNUtoo-desktop> OndraSter, are 32bit types valid for avr-libc and the atmega328p(8bit MCU)
[16:05:48] <OndraSter> sure
[16:05:50] <GNUtoo-desktop> ok
[16:05:55] <OndraSter> no idea why that error pops up :)
[16:05:58] <GNUtoo-desktop> ok
[16:06:14] <GNUtoo-desktop> so my code is right here then
[16:06:17] <GNUtoo-desktop> thanks a lot
[16:06:31] <OndraSter> np
[16:06:37] <OndraSter> actually
[16:06:42] <OndraSter> GNUtoo-desktop, what is it returning?
[16:06:43] <OndraSter> char?
[16:07:37] <Tom_itx> Thetawaves, what sort of kit do you have?
[16:07:56] <Steffanx> GNUtoo-desktop .. the problem is
[16:08:09] <GNUtoo-desktop> http://pastie.org/private/bnlltjvxlu1ifnczf9xlg
[16:08:11] <Steffanx> getchar_uart() = a char
[16:08:16] <Steffanx> *returns a char
[16:08:18] <GNUtoo-desktop> getchar_uart returns char
[16:08:20] <GNUtoo-desktop> yes
[16:08:32] <Steffanx> cast it too (uint32_t) and the problem is solved
[16:08:40] <GNUtoo-desktop> thanks a lot
[16:10:11] <Steffanx> *to
[16:11:24] <Steffanx> You wrote that GNUtoo-desktop ?
[16:11:40] <Steffanx> nvm
[16:11:57] <Steffanx> "*addr |= 0 << 24;" :)
[16:12:09] <GNUtoo-desktop> yes it's useless
[16:13:34] <Steffanx> I wonder if the compiler is 'smart' enough to remove that
[16:13:43] <GNUtoo-desktop> I'll remove it
[16:13:55] <Thetawaves> Tom_itx, i would like to sell an atmega644pa + rtc board with a programmer
[16:15:00] <Tom_itx> got a pic of it?
[16:15:09] <Tom_itx> sounds like a decent board
[16:19:45] <GNUtoo-desktop> I'm trying to do an SPI BIOS chip programmer, and I've some issues, the SPI read often returns 0, so I was thinking it was because the SS line wasn't low....I'll try something
[16:20:46] <Tom_itx> GNUtoo-desktop you may wanna look at this:
[16:20:49] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/mtkflash/flash_howto_index.php
[16:21:18] <GNUtoo-desktop> ok thanks
[16:22:00] <GNUtoo-desktop> there is also that: http://urjaman.dyndns.info/usbavrprog/ but I've no eagle so I cannot read the schematics with FLOSS software....I've already tried GEDA tough
[16:22:13] <GNUtoo-desktop> so I didn't understand how it was wired
[16:22:17] <Tom_itx> you don't have windows?
[16:22:28] <Tom_itx> actually i think it works in linux too?
[16:22:33] <Tom_itx> and you can download it free
[16:22:46] <Thetawaves> Tom_itx, i've got a new iteration in the works with better pin layout and reverse polarity power protection
[16:22:47] <GNUtoo-desktop> I run only FLOSS
[16:24:04] <Thetawaves> wtfffff my server is down
[16:24:27] <Tom_itx> heh
[16:24:35] <Tom_itx> my router is always giving me grief
[16:26:48] <Thetawaves> Tom_itx, i'll link you the page when i get it sorted out momentarily
[16:27:00] <Tom_itx> np
[16:27:13] <Tom_itx> i may go restart my router here anyway
[16:28:49] <Tom_itx> brb
[16:37:48] <GNUtoo-desktop> hmmm I found why it finds the chip only sometimes
[16:37:59] <GNUtoo-desktop> the connection on the breadboard is not great
[16:38:12] <Thetawaves> Tom_itx, http://akexperimental.com/electronics/timer_overview.php
[16:38:32] <GNUtoo-desktop> I've to keep my fingers on the metalic connector to make it find the chip
[16:40:22] <OndraSter> grounding problems?
[16:45:59] <GNUtoo-desktop> hmm my connector are ok
[16:46:06] <GNUtoo-desktop> but maybe not my wiring
[16:48:42] <GNUtoo-desktop> hmmm
[16:52:44] <GNUtoo-desktop> WP is on high
[16:52:55] <GNUtoo-desktop> and HOLD too
[16:53:12] <GNUtoo-desktop> and CS is connected to the AVR
[16:53:14] <GNUtoo-desktop> hmmm
[16:53:19] <GNUtoo-desktop> so it should be ok
[16:53:22] <GNUtoo-desktop> but it isn't
[16:53:43] <GNUtoo-desktop> I'll connect more grounds together
[16:55:27] <Tom_itx> Thetawaves, what's the extra chip?
[16:55:37] <Tom_itx> rs232?
[16:56:01] <Tom_itx> the 5 caps is a dead giveaway
[16:56:27] <OndraSter> yeah, there was max232 on the schematics
[16:56:42] <Tom_itx> i didn't see that
[17:10:39] <Thetawaves> Tom_itx, a little improvement on the pinouts in the new version http://akexperimental.com/fdioCV5.png
[17:14:16] <Tom_itx> you may consider squaring up your traces
[17:14:22] <Tom_itx> it looks more professional that way
[17:14:52] <Tom_itx> with 45 deg angles on the bends
[17:15:25] <karlp> bah
[17:15:28] <Tom_itx> if you're going smt on part of it, why not all?
[17:15:32] <Thetawaves> circular traces are better than 45 degree
[17:15:45] <karlp> 45 deg traces are for greybeards who never had tools that could draw a curve :)
[17:15:51] <Thetawaves> 10 degree is better than 45 degree
[17:16:00] <Thetawaves> 5 10 degree is better than 1 50
[17:16:21] <Tom_itx> you don't see that in industry
[17:16:33] <karlp> because of greybeards in management who refuse to accept it.
[17:16:46] <Thetawaves> i see it all the time
[17:17:00] <karlp> because they wrote a DRC file in 1986 that's been upgraded through each release of XXXXX tool
[17:17:04] <karlp> we use curves on our boards
[17:17:09] <Thetawaves> your standard up/down left/right layout is for extremely high density
[17:17:10] <Tom_itx> mkay
[17:17:25] <Tom_itx> i'm sure it works
[17:17:28] <karlp> electron tunnelling is real!
[17:17:36] <karlp> though if you're at that speed, you ahve your own issues
[17:19:27] <Thetawaves> it is worth mentioning that line impedance may be an issue with wildly different length lines like this
[17:28:17] <Thetawaves> Tom_itx, your comments are unsettling
[17:28:25] <Thetawaves> can you provide any more substantiation
[17:28:32] <Thetawaves> i'm always willing to learn
[17:29:30] <Tom_itx> everybody has their own way
[17:29:44] <Tom_itx> it's just more common to do as i suggested
[17:29:46] <Tom_itx> l?
[17:38:05] <Tom_itx> !thislog
[17:38:05] <tobbor> This one: http://rueshouse.dyndns.org:82/~ircjunk/irclogs/html/%23avr-2012-04-18.html
[17:42:35] <Tom_itx> first rev board but an example: http://tom-itx.dyndns.org:81/~webpage/boards/atmega32_sd_1.jpg
[17:42:51] <Tom_itx> and another http://tom-itx.dyndns.org:81/~webpage/boards/atmega128_exp_1.jpg
[17:47:42] <j4cbo> nothing really wrong with curves
[17:48:07] <j4cbo> http://www.toporouter.com/
[17:48:08] <Tom_itx> no not really
[17:48:22] <j4cbo> however, random angles look sloppy
[17:48:22] <Tom_itx> it's just more common to see square traces
[17:48:42] <Tom_itx> that was more my point if he was wanting to sell those
[17:48:53] * j4cbo nod
[18:05:26] <Thetawaves> thanks for the advice i'm making some changes
[18:05:54] <Thetawaves> seems to be on the aesthetics front :P
[18:06:56] <Tom_itx> yeah
[18:10:14] <Tom_itx> Thetawaves, i would consider switching the max232 caps to smt just because it's basically a smt board
[18:10:23] <Tom_itx> would 'appear' better
[18:11:52] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/misc_stuff/rs232_3.jpg
[18:33:26] <Thetawaves> the pcb i showed you has smd caps with the max232
[18:33:35] <Thetawaves> errr, cad representation
[18:35:58] <Thetawaves> but yeah, version 5 has almost all smd stuff
[18:36:11] <Thetawaves> everything was through hole 5 revisions ago
[18:36:49] <Thetawaves> pretty much all the through hole stuff left is there for strength now
[18:37:44] <Tom_itx> heh
[18:43:29] <Thetawaves> Tom_itx, better or still not enough? http://akexperimental.com/fdioCV52.png
[18:55:07] <Tom_itx> well it *is* your board ya know :)
[18:55:24] <Tom_itx> i just know ppl like to see nice lines on a board
[18:56:05] <Tom_itx> i would go with round vias too
[18:56:14] <Tom_itx> maybe that's another personal preference...
[18:58:18] * j4cbo used to use octagonal vias, now uses round
[18:58:25] <j4cbo> tented, also
[21:26:23] <Duality> hi
[22:23:23] <iR0b0t1> How is
[22:23:24] <iR0b0t1> asm("nop; nop; nop; nop; nop; nop; nop; nop;") invalid
[22:23:36] <iR0b0t1> "undefined reference to asm"
[22:23:45] <iR0b0t1> It's a keyword, compiler should know it is not a function
[22:24:18] <Tom_itx> asm volatile ("nop"::);
[22:25:38] <iR0b0t1> same error with additional
[22:25:45] <iR0b0t1> "expected ; before volatile"
[22:25:52] <Tom_itx> start by adding an ';' to the end
[22:25:56] <Tom_itx> of yours
[22:26:38] <Casper> actually
[22:26:43] <Casper> nop();
[22:27:09] <Tom_itx> it needs a wrapper for c doesn't it?
[22:27:15] <Tom_itx> or is that a macro
[22:29:41] <iR0b0t1> I believe it is a macro
[22:29:59] <iR0b0t1> or not
[22:30:01] <iR0b0t1> says undeclared
[22:37:04] <w|zzy> do you have the right header files included?
[22:37:47] <iR0b0t1> Well I tried googling, I can't figure out which it would be in. I have a lot of headers included.
[22:39:53] <Thetawaves> a header file for nop?
[22:40:43] <Thetawaves> asm("nop"); should work
[22:40:59] <Thetawaves> if you want to do multiple instructions you need to do
[22:41:22] <Thetawaves> asm("nop\n\tnop\n\tnop\n\t");
[22:41:46] <Thetawaves> yes that is the proper syntax
[22:42:02] <Thetawaves> you need \n\t between instructions because it is emitted directly to the asm output file
[22:42:16] <Thetawaves> iR0b0t1,
[22:42:38] <iR0b0t1> hmm
[22:42:44] <iR0b0t1> regular gcc just accepted a ;
[22:43:00] <Thetawaves> none of the docs suggest ; is adequate\
[22:43:15] <Thetawaves> perhaps i am wrong
[22:43:26] <Thetawaves> asm ("movl %1, %eax;
[22:43:26] <Thetawaves> movl %eax, %0;"
[22:43:53] <Thetawaves> The assembler template contains the set of assembly instructions that gets inserted inside the C program. The format is like: either each instruction should be enclosed within double quotes, or the entire group of instructions should be within double quotes. Each instruction should also end with a delimiter. The valid delimiters are newline(\n) and semicolon(;). ā€™\nā€™ may be followed by a tab(\t). We know the reason of newline/tab, right?. Oper
[22:43:53] <Thetawaves> ands corresponding to the C expressions are represented by %0, %1 ... etc.
[22:44:39] <Thetawaves> ok so looks like you're right.....
[22:45:21] <Thetawaves> iR0b0t1, does __asm__() work?
[22:45:29] <Thetawaves> are you still having issues?
[22:45:51] <iR0b0t1> yeah. I can just use delay_loop_1(), and I'll be off by 52.5ns but it won't matter
[22:49:46] <learningc> What would be the best methods to count the time between 2 pulses?
[22:52:17] <learningc> Capture the timer at event one and two, then substract the timer values?
[22:53:01] <learningc> or turn on the timer at event one, then capture the value at event 2?
[22:56:30] <Tom_itx> and maybe add the clocks it takes to store those values
[23:06:10] <learningc> Tom_itx: between these methods, which one is better?
[23:06:42] <Tom_itx> beats me
[23:06:45] <Tom_itx> try one
[23:07:06] <Tom_itx> capture the times
[23:07:15] <Tom_itx> and do the math from that
[23:07:35] <learningc> better than turning on and off the timer?
[23:07:51] <Tom_itx> why do you need to turn off the timer?
[23:08:02] <Tom_itx> reset the count
[23:08:10] <Tom_itx> make sure it doesn't roll over
[23:08:24] <Tom_itx> set your prescalar to something useable for that
[23:08:26] <learningc> can we reset the count when the timer is running?
[23:08:40] <Tom_itx> well that's how pwm works i think
[23:08:48] <Tom_itx> ocrx
[23:08:59] <Tom_itx> only you want input
[23:09:01] <Tom_itx> capture
[23:10:07] <Tom_itx> gnite all
[23:18:45] <Casper> ah the firefighters found the fire... very precise indication: "near the bridge, near an electric tower"