#avr | Logs for 2011-10-23

Back
[00:10:24] <Tom_itx> yup
[00:15:32] <inflex> Right, time to go make a few more dozen boards *bleah*
[00:20:06] <Tom_itx> inflex, did you finally get your stencil done?
[01:39:17] <inflex> Tom_itx: I did, yes
[01:58:14] <rue_shop> who knows whats up with SIGNAL vs ISR?
[01:58:24] <rue_shop> ISR dosn't work, signal does?
[01:58:34] <doublebeta> SIGNAL prevents other ISRs from occuring iirc
[02:03:45] <rue_shop> hmm
[02:03:54] <rue_shop> I dont see why this dosnt work
[02:04:05] <rue_shop> TOIE1 is on
[02:04:20] <rue_shop> were set for clockio/1
[02:06:55] <inflex> urrrrugh..... 100 devices half-made so far
[02:06:59] <inflex> and it was the easy half
[02:07:13] <inflex> actually, it's more like 1/3 made.... as there's two SMD sides, then all the looming/wiring
[02:20:29] <inflex> http://dxp.me/i/lots.jpg <=- sad thing is, they're already sold and I've already spent the $
[03:07:56] <soul-d> what you making inflex
[03:16:29] <inflex> soul-d: bunch of stuff, but they're all regulators
[03:18:26] <soul-d> k what soldering equipment you using and other bench tools that are nifty ?
[03:20:06] <inflex> reflow oven, stencils
[03:20:06] <soul-d> im looking around to get a decent setup that actually works for longer then 10 min and multiple purpose (mostly since we can't get around it towards smd ) instead of just the cheapest iron
[03:20:18] <soul-d> stencils you make yourself ?
[03:20:24] <inflex> oh hell, I'm using a GOOT RX711 station, was a lot of $ but it was so worth it.
[03:20:35] <soul-d> heard of jbc ?
[03:20:47] <inflex> no, but it doesn't mean that they're not something good
[03:21:28] * inflex has a "cheap" $99 station as well... and a cheap hot-air/iron combo station, but 99.9% of the time it's the GOOT and 0.1% it's the hot-air
[03:21:38] <inflex> yes, I make my own stencils using a vinyl cutter
[03:22:01] <inflex> Anyone have 'C/W figures for 0805 resistors?
[03:22:04] <soul-d> http://printtec.nl/contents/nl/d396.html would be entry level ( the smt is bit expensive )
[03:22:08] <inflex> for some reason I can't find any on my datasheets
[03:22:43] <inflex> looks exotic, do you need to go "that far" ?
[03:23:05] <inflex> A good Hakko is quite a bit cheaper
[03:23:32] <soul-d> no just looking around :P some people recommeded it if price wasn't a bother lol thats why am asking ;)
[03:23:59] <soul-d> i mean don't need super stuff just workable and decent quality
[03:24:17] <inflex> yep - well, Hakko or Weller are good brands too
[03:25:32] <soul-d> i need to save for it but if im gonna do smaal series i rather invest in some good stuff instead of trying 20$ iron
[03:25:54] <inflex> http://au.element14.com/hakko/fx-888/soldering-station-fx-888/dp/171902101
[03:26:35] <inflex> I paid $299 for my GOOT, which is about 2/3rds the price of the one you showed, so I suppose it's in the ballpark
[03:26:57] <soul-d> yeah im in eu so waht you pay in $ i do in euro
[03:27:10] <soul-d> but still should save
[03:28:44] <inflex> I do find hot-air invaluable when it's needed - but I don't need it that often
[03:33:38] <soul-d> what diud you mean with c/w figures ?
[03:37:59] <inflex> soul-d: tells you how many 'C increase the item will experience when you apply 1W of power
[03:38:15] * inflex is thumbsucking at 350'C/W for 0805, though I'd not be surprised to see it more like 500'C/W
[03:38:31] <inflex> which means even at 20mW of power, my resistor is increasing in temp by at least 7'C
[03:39:39] <inflex> and even at 10ppm (which is quite low), that means a 70ppm increase, which is almost 1milliohm increase.... and yes, it makes a difference on this device, consider that I can measure to 0.01 milliohms
[03:40:03] <Valen> i hear metcal are the "best"
[03:40:41] <Valen> you still mucking with your lom inflex?
[03:43:13] <Valen> i still reckon you should have ovenised it
[03:44:01] <inflex> Valen: nah
[03:44:18] <inflex> put this TO220 4-wire 8W rated ref on it.... then 20mW won't make a notable change
[03:45:13] * inflex figures, what, 50'C/W on those? .... so, 20mW... that's 1'C
[03:45:47] <inflex> and they have a 2ppm coefficient, so it's now well below the detectable levels of sanity... now normal case ambient temperature dominates, but that's okay, because I have the temp sensor for that
[03:48:40] <inflex> I have tried a heatsink on the 0805 but it's almost impossible to do that realiably
[03:48:52] <Valen> nah thats not going to work well
[03:49:07] <Valen> played with strain guages at all inflex?
[03:49:20] <inflex> Valen: only at Uni.... and that was 22 years ago :(
[03:49:35] <Valen> lol
[03:49:51] * Valen needs / wants to measure ~100 of the bastards in a rocket
[03:51:10] <Valen> there don't seem to be any nice all in one IC's for it
[03:56:04] <soul-d> have to do some chores here bbl
[04:11:58] <avrquest> ahhh... is there no one talking here? I just downloaded mIRC because I really need some help with an avr/arduino project. I just got a attiny85 and I am trying to program it using arduino as an isp and using the winavr to upload to the tiny5... I am getting path not found errors... has anyone here tried this?
[04:12:25] <avrquest> tiny85
[04:18:56] <Valen> havent tried it but does it say what path wasnt found?
[04:24:40] <avrquest> process_begin: CreateProcess(NULL, /c/WinAVR-20100110/bin/avr-gcc --version, ...) failed.
[04:24:40] <avrquest> make (e=3): The system cannot find the path specified. make.exe: *** [gccversion] Error 3
[04:33:19] <grummund> avrquest: have you installed WinAVR ?
[04:35:26] <avrquest> grummund... yes... winavr is installed
[04:35:51] <avrquest> process_begin: CreateProcess(NULL, /c/WinAVR-20100110/bin/avr-gcc --version, ...) failed.
[04:35:51] <avrquest> make (e=3): The system cannot find the path specified. make.exe: *** [gccversion] Error 3
[04:44:31] <inflex> Valen: might go try use a 1206 and see if I can be lucky enough for it to fit on the 0805 4-pad
[04:49:15] <Valen> inflex: perhaps a bunch of em in series?
[04:49:32] <Valen> or stack a few in parallel?
[04:54:08] <Valen> avrquest: is that where winavr is actually installeD?
[04:56:19] * Valen wonders about using the CnC to dispense solder paste
[05:50:25] <grummund> avrquest: where is that error coming from?
[06:25:42] <specing> < Valen> inflex: perhaps a bunch of em in series?
[06:25:48] <specing> yeap, you got them
[07:14:30] * inflex returns
[07:15:03] <inflex> well, I could stack them, but thermally that doesn't help a massive amount but I suppose it does cut down the individual thermal gradient
[07:17:12] <inflex> oh yeah, btw, 1206 fits fine
[07:17:22] <inflex> I was at least smart enough to make the pads that large *phew*
[07:37:35] <inflex> hrmm... trying to work out why it would be bad, if at all, for me to use 2 x 10R stacked... giving me 5R on the internal reference and only 5mW dissipation, seems good
[07:37:47] <inflex> but I'm wondering how my internal software computations will be distorted by this
[07:37:55] * inflex goes and starts soldering trash
[08:31:15] <Valen> inflex: if a 1206 fits perhaps you can glue a 1W on?
[08:31:27] <Valen> or even perhaps drill out the pads to through hole?
[08:31:50] <Valen> should work for upright mount on the reverse side at leasrt
[08:47:28] <inflex> well, the dual 0805's seem to be doing okay... will try it later with dual 1206
[08:47:55] <inflex> I think the reason why I ended up with 10R originally was because that wasthe lowest sane R value I could get with good precision and tempco
[08:48:15] <inflex> realistically though, I only need good tempco now, because the external reference resitor I use to calibrate has the precision (0.01%)
[09:01:06] <inflex> btw, Valen did I tell you that you should pick up 0603 resistors from E14 now... they're selling out at $5/reel for 1%
[09:01:32] <Valen> need a use for em really
[09:01:34] <inflex> Valen: at least, most of them are, some are the more normal $15~$20/reel, but I've just stocked up on things like 10K (20,000 of them!), 1K etc
[09:01:37] <inflex> ooh okay
[09:01:46] * inflex chews through 10K'ers all the time
[09:01:53] <Valen> i prefer 805 ;->
[09:01:55] <inflex> that and 100n 0603's
[09:02:00] <Tom_itx> pfft
[09:02:08] <Valen> thats not a bad idea
[09:02:09] <inflex> I agree, 0805 is nice and cozy to work with
[09:02:17] <inflex> but 0603 is more practical in layout
[09:02:17] <Valen> i do burn through the decoupling caps
[09:02:24] <Tom_itx> leave your comfort zone once in a while
[09:02:27] <Tom_itx> then stay there
[09:02:29] <inflex> Valen: did you see the vacuum pencil I made the other night?
[09:02:38] <Valen> that would probably help
[09:02:42] <Valen> anyway past my bed time
[09:02:47] <Valen> I'll look into em tomorrow
[09:02:55] <Tom_itx> inflex did you make another one?
[09:02:56] <inflex> http://dxp.me/i/lots.jpg <=[- in there
[09:02:58] <inflex> oooh, np
[09:03:02] <inflex> Tom_itx: yes
[09:03:07] <Valen> actually i may need a buttload of RGB LED's and some sort of controller
[09:03:29] <inflex> Tom_itx: I cut the previous one too short on the needle tip, was causing more strain - so I made a new one with a larger gauge needle
[09:03:38] <inflex> Tom_itx: the larger gauge is nice because the vacuum is much stronger
[09:03:52] <Tom_itx> i have one that will just suck up 0402s
[09:03:57] <inflex> Tom_itx: picks up SOIC8 / TQFP32 without hesitation - and 0603's you can now tell you've "captured" it by the noise
[09:03:57] <Tom_itx> i gotta be careful
[09:04:16] <inflex> Tom_itx: oh yes, my old one was fine for 0402, but this new one will suck those up
[09:04:39] <inflex> if you're wondering, the handle is made from those nylon/polybeads
[09:05:32] <Tom_itx> that reuseable plastic stuff?
[09:05:46] <inflex> yep
[09:06:03] <inflex> I like the fact that you can form it by hand quite safely after the first minute
[09:08:25] <inflex> ugh, had a bumper month to date... but now sales have gone off
[10:46:13] <osfd> Hi there
[10:46:42] <vectory> hi
[10:46:42] <tobbor> Hello vectory
[10:50:37] <wrongle> hey guys, so the more i look and learn. my first project, making a watch seems like an atmega328p is overkill (and way too big?).
[10:51:37] <wrongle> one issue that I'm looking at before size and also because of size is the chip. maybe an attiny45? I'm getting an lcd in the mail in a few days and have not used them yet, but it seems like i can't find a place to buy a "small" lcd. i don't mind spending the money, I'm trying to have it as compact as possible.
[10:52:08] <wrongle> is there some sort of company specializing in compact parts with (unfortunately) more $?
[10:53:09] <inflex> mmm
[10:53:26] <inflex> well, a T45 might have some trouble driving a LCD, because of the lack of pins, unless you get an I2C LCD or serial
[10:53:38] <inflex> but you certainly can do it with a T45 in terms of features/speed/flash-size
[10:53:50] <specing> T2313
[10:54:00] <inflex> I just did a complex project using a mega48 (4K flash) with a tiny I2C 8x2 LCD
[10:54:06] <Tom_itx> or just use a timex
[10:54:11] <wrongle> oh
[10:54:12] <inflex> heh
[10:54:15] <wrongle> hah
[10:54:30] <vectory> timex?
[10:54:34] <wrongle> haha fuck you Tom_itx (i only mean that in a laughing thanks for all the tutorials, help way! :P)
[10:54:35] <wrongle> hah
[10:54:52] <Tom_itx> i know you're after the learning
[10:55:23] <wrongle> i've done a lot of api work and engineering (software) in the mobile space - i looked at this metawatch.com - but i don't know how hackable it is for what i want (plus puts price)
[10:55:33] <wrongle> ahh you're saying grab a timex watch (cheap) - disassemble.
[10:55:40] <Tom_itx> no
[10:55:43] <Tom_itx> wear it
[10:55:46] <wrongle> hah!
[10:56:47] <wrongle> specing inflex : i've been using the atmega328p since i started last week. even with a programmer a crystal and 2 leds I'm using 7 pins i think.
[10:57:03] <wrongle> so the cost, size and not wondering what each pin is for would be nice.
[10:57:15] <wrongle> inflex: where did you get the 8x2 lcd?
[10:57:25] <inflex> wrongle: well, things like the mega48 and 88 are nice in terms of cost/size
[10:57:26] <wrongle> i shopped "all over" and couldn't find a compact lcd.
[10:57:44] <inflex> wrongle: direct import from China, costs about $4/pc when you buy at least 100 of them :)
[10:57:59] <wrongle> inflex: do you have a link?
[10:58:06] <inflex> http://dxp.me/i/scc1-unfolded.jpg
[10:58:10] <inflex> oh, sorry, that's of the device
[10:59:08] <Tom_itx> inflex, i should get you to send me a couple of those
[10:59:41] <wrongle> i see that the tiny is an 8 pin dip, with the mega48 being much larger ...
[10:59:44] <wrongle> hmmm
[11:00:15] <Tom_itx> does the 328 allow you to use a clock crystal?
[11:00:17] <Tom_itx> some do
[11:00:22] <wrongle> can i ask the room in general, what are some "great" sites that people mostly shop at? i've seen mouser, digikey, adafruit, spark fun..
[11:00:25] <wrongle> yes it does
[11:00:33] <inflex> http://www.aliexpress.com/product-gs/316734905-Free-Shipping-Character-LCD-module-16X2-in-COG-type-wholesalers.html <=- these are the people who have them, but you have to ask for the ERC802 display
[11:00:33] <Tom_itx> rtc?
[11:00:34] <Tom_itx> on timer2 or whatever
[11:00:40] <wrongle> i have a 16mhz crystal on it now. ill need a crystal for an actual time keeping device correct?
[11:00:42] <wrongle> reliable ...
[11:00:47] <inflex> mine is the FS1 type which means it has no backlight - but you can normally get them with backlight
[11:01:06] <Tom_itx> wrongle, 32.768khz
[11:01:13] <wrongle> ?
[11:01:14] <inflex> wrongle: well, a Tiny45 will accept a crystal
[11:01:23] <inflex> wrongle: (properly, as opposed to the Tiny13 which doesn't quite)
[11:01:28] <wrongle> ok.
[11:02:16] <wrongle> but in terms of lcd - what I'm saying though is (this is a great price ordering now thanks inflex ) / where can i get a watch sized lcd ...
[11:02:33] <wrongle> i could buy a watch, "take it" from the watch but then data sheet, info ..
[11:02:46] <Tom_itx> they are custom
[11:02:51] <inflex> wrongle: oooh, that sort of size.... yeah, good luck with that - custom jobs
[11:02:58] <inflex> wrongle: buy 10,0000 and you'll be right
[11:03:14] <inflex> wrongle: smallest I've seen around is a 0.9" OLED display
[11:03:27] <wrongle> hey Tom_itx i started putting code/etc up. If you ever want your site organized, cleaned up, redesigned let me know :P http://edwardhotchkiss.github.com/AVR/
[11:03:31] <wrongle> oh
[11:03:54] <wrongle> custom meaning a bunch of industrial engineers sitting around in R&D :/
[11:04:20] <inflex> http://www.adafruit.com/blog/2011/01/06/new-product-monochrome-128x64-oled-graphic-display/
[11:04:37] <inflex> http://www.adafruit.com/products/326
[11:05:15] <vectory> inflex: is the t13a the same as the t13 in terms of crystal?
[11:05:44] <inflex> yes - the T13A is just slightly updated with better power management facilities
[11:06:04] <vectory> the internal osc is not very accurate, as i understand it
[11:06:19] <inflex> correct, and jitters like crazy
[11:06:22] <vectory> then, whats t13 good for anyway
[11:06:26] <inflex> a lot of things
[11:06:34] * inflex has gone through about 3,000 of them
[11:07:02] <inflex> they're great for things that aren't "timing critical", which is a lot of things
[11:08:08] <inflex> In fact, the 8x2LCD thing I just did is one of the very few time-critical devices I've produced in 5 years or so...
[11:08:14] <inflex> the only other was a servo-pulse management device
[11:09:00] <wrongle> inflex: i just ordered the lcd. thanks. so my only hope (in terms of n00b is this possible?) is to get a watch and take the lcd ?
[11:11:08] <inflex> wrongle: ermm... which LCD did you order?
[11:11:20] <wrongle> the one you linked me, 8x2 blue backlit
[11:11:22] <wrongle> 3.95?
[11:11:22] <inflex> because the AliExpress site is for a 16x2 non-I2C
[11:11:26] <wrongle> oh
[11:11:28] <inflex> wth? give me the URL
[11:11:33] <wrongle> well either way the price was right
[11:11:36] <inflex> hah
[11:11:56] <wrongle> http://www.aliexpress.com/product-gs/316734905-Free-Shipping-Character-LCD-module-16X2-in-COG-type-wholesalers.html
[11:12:00] <inflex> you're going to have a hell of a time with that - because it needs a FPC connector and that'll probably be surface mount
[11:12:12] <wrongle> ahh
[11:12:20] <wrongle> i have a lot of money to kill.
[11:12:25] <wrongle> well.
[11:12:27] <wrongle> relative.
[11:13:02] <inflex> oh hell, send me some
[11:13:16] <wrongle> hah not that much! our startup got funded and work is good
[11:13:17] <inflex> well, you can get the FPC connectors no problem from Digi or Farnell/E14
[11:13:22] <wrongle> ok cool.
[11:13:35] <wrongle> I'm about to head out get pumpkins for the kid / should i grab a cheap watch?
[11:13:35] <inflex> you might be able to get a pin-through one, but I suspect it'll be SMD
[11:13:39] <inflex> like the one I have in my picture
[11:13:41] <wrongle> ok -
[11:13:43] <wrongle> yeah
[11:14:00] <inflex> also, I'm not sure what signalling system they use, but given that it has 14 pins, I think it'll be the more 'traditional' style (ie, 4 data + 3 control )
[11:14:15] <inflex> nah, the watches use zebra strips
[11:14:26] <inflex> so you really can't ever actually get them lined up again properly
[11:14:34] <inflex> and all the segments will be custom
[11:15:15] <wrongle> ugh fuck
[11:15:17] <wrongle> hmm
[11:15:34] <inflex> in the past, I too have always looked for a small LCD... no such luck
[11:15:35] <wrongle> so i could do a watch … with a giant display? :P
[11:15:38] <inflex> the 8x2 was the best I've found
[11:15:39] <wrongle> ah
[11:15:57] <inflex> other than that, you can get very expensive 5x7 LED display units
[11:16:13] <inflex> in the older days, you could get awesome LED 7-segment-in-a-bubble display units
[11:16:28] <inflex> but they've gone completely out of fashion and now I don't know anyone making or selling them
[11:19:27] <wrongle> ahh ok
[11:23:59] <wrongle> ltr guys -
[11:26:27] <rue_bed> Tom_itx, know anything about ISR not working?
[11:26:34] <rue_bed> I had to change it back to signal
[11:27:18] <Tom_itx> no
[11:27:51] <Tom_itx> read the .h file for signal and isr
[11:27:56] <Tom_itx> it mentions something
[11:27:58] <Tom_itx> lemme see
[11:28:43] <Tom_itx> #warning "This header file is obsolete. Use <avr/interrupt.h>."
[11:28:49] <rue_bed> isr must not work unless you have a really new gcc version
[11:28:50] <Tom_itx> signal
[11:29:01] <rue_bed> BUT, ISR didn't work
[11:29:13] <rue_bed> did not all the fn
[11:29:16] <rue_bed> call
[11:29:38] <Tom_itx> is the .h for the part current?
[11:29:40] <rue_bed> the LED, she did not flash!
[11:29:52] <rue_bed> far as I know, yes
[11:30:21] <Tom_itx> check depreciated.h
[11:30:28] <Tom_itx> see if there's something there
[11:30:36] <rue_bed> k, I thought it was worth mentioning, for me, signal always works, isr never has
[11:30:56] <Tom_itx> they may have renamed some?
[11:42:40] <rue_bed> all the ISR paramiters are different from the SIGNAL ones
[11:42:59] <Tom_itx> grab winavr and pull it in
[11:43:09] <rue_bed> point is, the SIGNAL stuff worked and the ISR stuff didn't complain a bit on compile, it just didn't work
[11:43:34] <Tom_itx> so you'd rather have a nag or the silent type?
[11:43:50] <rue_bed> I'd rather the code worked, warnings or not
[11:44:17] <rue_bed> I'll try comparing the two and see if they got the vectors mixed up on one of them
[11:44:28] <Tom_itx> i doubt it
[11:47:12] <rue_bed> anyhow, for hte first time yesterday I used the OC interrupt instead of the overflow to speed up the interrupt rate to make an adjustable pulse genorator
[11:47:54] <rue_bed> got it down to something like 52ms per step with a cpu clock of 1Mhz
[11:48:05] <rue_bed> no
[11:48:19] <rue_bed> less, ugh, I'm still asleep
[11:48:40] <rue_bed> I remember is was little more than 2 divisions on the scope :)
[11:49:43] <rue_bed> I think pulsing the washing machine valves is gonna work awesome for controlling the air muscles
[11:50:14] <rue_bed> I need to make a setup for measuring the air volume
[11:51:29] <rue_bed> I think the double acting is gonna be important as I dont beleive that the muscles will dump as fast as they load
[12:31:57] <Tom_itx> rue_bed
[12:32:05] <Tom_itx> surround them with an outter bladder
[12:32:19] <Tom_itx> that will equalize when the inner pressure is released
[12:35:34] <rue_mohr> na I can just pull it with the other side
[12:36:09] <Tom_itx> it would give you a one way "cylinder"
[12:57:52] <RikusW> Added a progressbar to RavrProg :) now need to cleanup and fix the flashing code...
[13:20:47] <pc_magas> Hello emma
[13:36:55] <RikusW> vectory: http://sites.google.com/site/megau2s/home/supporting-software updated it a bit
[13:37:06] <RikusW> vectory: in particular you need bl32u2_avrdude_conf_patch.txt
[13:37:17] <RikusW> I think you already have most of the rest
[13:37:58] <vectory> didnt you give me the patch already? i added sth to avrdude.conf and i think it was the bl
[13:38:39] <RikusW> I have to modify it a little
[13:38:44] <RikusW> *had
[13:38:53] <RikusW> eeprom reading was broken... :S
[13:39:01] <RikusW> not in terminal mode...
[13:39:11] <RikusW> on the commandline it breaks with the old patch
[13:39:36] * RikusW removed a little too much ;)
[13:39:50] <vectory> eh
[13:39:54] <vectory> ok, thx
[13:40:06] <vectory> am on win atm and didnt get that to work yet
[13:40:29] <RikusW> 7 x64 ?
[13:40:40] <RikusW> ugh
[13:40:52] <RikusW> works on 7 x86 here
[13:45:07] <Sh4rK> hi
[13:45:07] <tobbor> Sh4rK! like, totally tell us about the project!
[13:45:15] <Sh4rK> ?
[13:45:30] <Sh4rK> what are you talking about?
[13:45:32] <Sh4rK> :D
[13:45:57] <Sh4rK> I have a question
[13:46:06] <vectory> tobbor is the bot
[13:46:11] <Sh4rK> oh
[13:46:12] <vectory> read backwards
[13:46:12] <Sh4rK> ok :D
[13:46:20] <Sh4rK> yeah
[13:46:21] <vectory> xD
[13:46:22] <RikusW> robbot
[13:46:30] <vectory> ask away
[13:46:31] <Sh4rK> so when I disable a pwm
[13:46:36] <RikusW> or do Info on it ;)
[13:46:57] <Sh4rK> by setting CS0 in TCCR0B to 0
[13:47:10] <Sh4rK> why does that pin becomes high?
[13:48:58] <Sh4rK> RikusW, vectory?
[13:51:07] <Sh4rK> *CS00
[13:51:22] <vectory> are there other registeres that modify the working of that pin?
[13:51:35] <vectory> like ddrb or what that was
[13:51:49] <vectory> maybe you set it to open drain and it reads input high
[13:51:57] <Sh4rK> well I set the direction to output
[13:52:13] <Sh4rK> I mean not when I read it it's 1
[13:52:20] <Sh4rK> from the outside
[13:52:51] <Sh4rK> so when the pwm runs and I disable it, it leaves the port on 1
[13:52:51] <vectory> open drain was the wrong term anyway >_<
[13:53:33] <vectory> and when you read it?
[13:53:44] <Sh4rK> I don't know
[13:53:50] <Sh4rK> I don't read it
[13:53:59] <Sh4rK> it just needs to be 0 volt
[13:54:16] <Sh4rK> or are there another way to turn off the pwm?
[13:54:16] <vectory> its not gonna be 0 volt, low output has voltage too
[13:54:25] <Sh4rK> ok, then low
[13:54:27] <Sh4rK> :)
[13:55:00] <vectory> i have no clue, really
[13:55:30] <Sh4rK> :S
[13:56:15] <Tom_itx> so when you disable it, set the port to 0
[13:56:35] <Sh4rK> the strange thing is, that doesn't seem to work
[13:56:52] <Sh4rK> i don't know what the problem is
[13:58:36] <Sh4rK> are these correct?
[13:58:38] <Sh4rK> #define setBit(port, bit) (port |= (1 << bit))
[13:58:38] <Sh4rK> #define clearBit(port, bit) (port &= ~(1 << bit))
[13:58:38] <Sh4rK> #define flipBit(port, bit) (port ^= (1 << bit))
[13:59:38] <RikusW> seems so
[13:59:38] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/c_bits/bits_index.php
[14:00:06] <RikusW> flipBit might also be done by PINx = (1<<bit)
[14:00:12] <RikusW> on most newer avr's
[14:00:21] <RikusW> Sh4rK: what avr do you use ?
[14:00:28] <Sh4rK> mega48/88
[14:01:25] <RikusW> m88 supports PINx toggling of ports
[14:02:04] <Sh4rK> is it documented somewhere?
[14:02:12] <RikusW> in the datasheet
[14:03:48] <Sh4rK> found it
[14:03:56] <Sh4rK> nice to know
[14:04:06] <Sh4rK> and it resets to 0 right after it?
[14:04:31] <RikusW> it toggle 0-1 1-0
[14:07:20] <Sh4rK> is setting the clock select bits the only way to turn on/off the pwm?
[14:08:43] <RikusW> no
[14:08:58] <RikusW> setting the port pin as input might also work
[14:09:15] <RikusW> or the output mode of the pwm
[14:09:56] <Sh4rK> but it doesn't actually stop it
[14:09:59] <Sh4rK> just "hides" it
[14:10:08] <Sh4rK> so it still consumes more energy
[14:10:16] <Sh4rK> i suppose
[14:11:30] <RikusW> yes
[14:33:09] <bsdfox> anyone know about plumbing gas fittings?
[14:33:50] <bsdfox> I can't find any threaded tees for the copper flex line. not sure if it's a regulatory thing or if I'm looking in the wrong places
[14:35:56] <ys0> oi
[14:37:18] <RikusW> seems this is now the gAs Valves and Regulators channel ;)
[14:41:40] <bsdfox> I'm sure a few of the guys in here know :P
[14:42:35] <RikusW> probably ;)
[14:43:02] <bsdfox> I went to home depot and they didn't have what I was looking for.. I'm guessing you're only allowed to tee off on the main pipe using the soldered on fittings
[14:43:08] <RikusW> I've only used plastic gas pipes so far
[14:43:08] <JanneP> well valves are used in electronics so.. :)
[14:43:32] <JanneP> aren't gas fittings normally soldered(i know nothing of them)
[14:43:33] <bsdfox> my brother in law is a plumber but he's at a wedding in vegas
[14:43:58] <bsdfox> JanneP: yeah but there is this flex line that's threaded that connects the water heater to the main line
[14:44:14] <bsdfox> I have a drier with the same fitting and figured I should be able to get some threaded tee to make it easy
[15:35:19] <RikusW> anyone ever tried making an LCR meter for avr ?
[15:35:31] <RikusW> how about transistor diode tester ?
[15:35:43] <RikusW> or ESR meter ?
[15:59:11] <JanneP> i think there is at least one attiny based LCR meter project in the nerdynet
[15:59:49] <JanneP> http://www.cappels.org/dproj/nlglcm/Pretty%20Good%20LC%20Meter%20Project.html
[16:00:10] <RikusW> ah thanks, will have a peek
[17:32:21] <Tom_itx> hey dean
[17:35:16] <wrongle> has anyone ever tried to get AVR samples via atmel.com?
[17:35:17] <wrongle> hah
[17:35:53] <Tom_itx> yes
[17:36:16] <wrongle> Tom_itx: do they hook it up?
[17:36:28] <Tom_itx> not easily
[17:37:07] <wrongle> I have a legit (software) engineering llc., one question stumps me though "Alternative Speed or Package *"
[17:39:06] <wrongle> oh Tom_itx since you were the key to me getting up and going. I ordered some ATiny45s. Since they have only 8 pins and don't do anything too crazy, I'm wondering what I will need to do since they don't have the arduino boot loader.
[17:39:20] <wrongle> What do "normal people" do with a "blank/factory" chip?
[17:39:58] <wrongle> I know that I can use my uno (ughhh) to program it, but I'd rather use my ftdi usb with embedded chip (minimal, works) to program it to serial like I'm doing with my atmega328p now.
[17:41:34] <Kevin`> wrongle: it's doubtful you will have the free space to stick a bootloader on it, or the free pins to dedicate to io for the host
[17:41:48] <abcminiuser> Hey Tom_itx
[17:41:54] <wrongle> ahh
[17:42:06] * abcminiuser will be out for a little while very soon - helping friend with last minute project stuff
[17:42:31] <wrongle> Kevin`: what is something minimal that i can buy to use with avrdude / usb connection -> serial? to program my attiny45?
[17:42:47] <wrongle> Kevin`: well. what do most people use ?
[17:42:47] <Kevin`> I would also like to see an LCR meter code/design if anyone knows of one
[17:43:46] <Kevin`> wrongle: tom's programmer is nice (the native usb avrisp2 clone). an avr dragon is nicer. any isp programmer will work though
[17:44:46] <Kevin`> I don't get why you don't want to use the uno for it
[17:46:06] <wrongle> I'm a minimalist. i love using a single cable that is usb with an ftdi chip embedded to 6 pin serial out.
[17:46:09] <wrongle> its "nice"
[17:46:16] <wrongle> vs. another board just sitting around for programming -
[17:46:34] <Kevin`> the ftdi chip doesn't do spi quickly, so it's not very appropriate for this
[17:46:49] <Kevin`> unless you stick another controller on it, but you might as well just use a usb one then
[17:47:00] <sabesto> PORTD.0=something does not compile in AS5 with avr-gcc, what should it be to compile?
[17:47:34] <wrongle> SPI?
[17:47:54] <sabesto> http://pastebin.com/QgG46y0M example code snip
[17:49:13] <Kevin`> sabesto: I don't think there is normally an enum or similar for the ports, just the byte value
[17:50:41] <sabesto> that is part of a working example code written for the very same uC as i'm trying to program
[17:50:48] <wrongle> maybe i will stick with the 328p.
[17:51:02] <wrongle> the limitations kind of suck now that think about it.
[17:51:26] <Kevin`> sabesto: it might be written for a different library code base or compiler
[17:52:04] <Kevin`> sabesto: anyway, just use PORTD
[17:52:28] <sabesto> yeah, i'm as good as completely new to C and avr
[17:52:31] <wrongle> i saw a boot loader for an attiny45. who uses CVS lol http://openservo.com/Software
[17:56:19] <Kevin`> sabesto: I suggest looking at a tutorial that covers binary math and port io
[17:56:39] <sabesto> the binary i know
[17:57:13] <sabesto> but i will have to look at io
[17:57:26] <sabesto> know of any good ones off hand?
[17:57:38] <Kevin`> not off hand
[17:58:56] <sabesto> the ones ive found is just basic
[18:00:05] <Kevin`> link one
[18:02:14] <sabesto> like this: http://iamsuhasm.wordpress.com/tutsproj/avr-gcc-tutorial/
[18:02:51] <Kevin`> yeah, that one covers how the ports work, but doesn't covery any of the binary math
[18:03:09] <Kevin`> I wonder what I looked at :/
[18:03:26] <Kevin`> did you look at the two sites in the topic?
[18:03:30] <sabesto> this maybe http://winavr.scienceprog.com/avr-gcc-tutorial/accessing-avr-microcontroller-ports-with-winavr-gcc.html
[18:03:49] <sabesto> looks more like it
[18:14:54] <sabesto> Kevin`: http://pastebin.com/HYR4sT98
[18:15:12] <sabesto> would what i wrote in the comment work?
[18:16:55] <sabesto> just a yes or no, if no i will not need an explanation, i will just read more :)
[18:18:07] <Kevin`> sabesto: I don't see why that would make any difference. where's PORTB.0 coming from?
[18:18:32] <sabesto> code example that doesnt compile
[18:18:32] <Kevin`> oh, in the comment
[18:18:54] <Kevin`> PORTB<<0 is nonsensical
[18:19:39] <sabesto> yeah, but if it was portb 2 for instance
[18:19:39] <Kevin`> that's still nonsensical
[18:19:52] <Kevin`> << is left shift
[18:20:29] <Kevin`> doing that to the port addres... should be technically possible, but is not what you want
[18:21:10] <sabesto> so its the other way?
[18:21:47] <sabesto> PORTB>>7?
[18:22:17] <Kevin`> no
[18:22:33] <Kevin`> PORTB is the address of a byte
[18:22:54] <Kevin`> obne of the io registers
[18:23:04] <Kevin`> you wouldn't do this, would you?
[18:23:06] <Kevin`> int a;
[18:23:11] <Kevin`> a<<0=12;
[18:23:26] <Kevin`> I just doesn't make sense
[18:24:59] <sabesto> if a is 2 bytes, cant i set the 5.th bit to 0 or 1 that way?
[18:25:53] <sabesto> thats what this piece of code is suppose to do, if the bit 0 in addr is 1, set portb.0 to 1
[18:27:03] <Kevin`> the memory location is in bytes too, if you add one to it you'll get a completely diferent register, not the second bit in the register
[18:27:03] <sabesto> b0000<<2=1, would that not yield b0100?
[18:27:43] <Kevin`> sabesto: b<<2=0, *0=1 = segfault
[18:28:00] <Kevin`> (aside from the fact you can't segfault these processors)
[18:28:10] <Kevin`> erm
[18:28:16] <Kevin`> 0<<2 = 0
[18:28:17] <Kevin`> rather
[18:29:29] <sabesto> that line makes no sence to me, but ok
[18:30:09] <sabesto> so, if i want to set bit 0 in portb to x, what is the correct syntax?
[18:30:56] <yardleydobon> PORTB = x<<0;
[18:31:24] <Kevin`> I don't think <<0 does anything, but that's closer to the right form :)
[18:31:53] <Kevin`> that will set the entire port though
[18:32:00] <sabesto> yes
[18:32:12] <yardleydobon> well it makes it clear you are setting bit 0
[18:32:47] <Kevin`> if you want to set bit 0 in portb, do something like: PORTB|=(1<<0);
[18:33:21] <sabesto> could i just insert (Addr>>(7-i))&0x01 where the "1" is?
[18:33:21] <sabesto> guess not
[18:33:27] <Kevin`> clearing is different, but since that type of instruction compiles to a single asm instruction (sbi or cbi), probably worth it
[18:33:38] <Kevin`> sabesto: yes
[18:34:32] <Kevin`> sabesto: actually, that code looks suspisciously like you should just do this instead of the loop:
[18:34:37] <Kevin`> PORTB=Addr;
[18:34:41] <yardleydobon> you should probably read abcminiusers bit manipulation tutorial
[18:35:04] <sabesto> Kevin`: its bit bang SPI
[18:35:17] <sabesto> so i dont think so
[18:35:22] <Kevin`> sabesto: ah. in that case, i assume most of the code is missing from the paste?
[18:35:30] <sabesto> yes
[18:35:40] <Kevin`> yardleydobon: link it
[18:36:02] <sabesto> http://pastebin.com/pJAkVhzG
[18:36:25] <sabesto> PORTB|=((Addr>>(7-i))&0x01<<0)
[18:36:33] <sabesto> for line 16
[18:37:28] <yardleydobon> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=37871
[18:37:52] <sabesto> thanks yardleydobon
[18:38:14] <Kevin`> if((Addr>>(7-i))&0x01) PORTB|=(1<<0); else PORTB&=~(1<<0);
[18:38:19] <Kevin`> that's not elegant enough though
[18:38:34] <Kevin`> even though as asm it's probably close to what you want
[18:38:57] <sabesto> yeah, i understand that
[18:38:58] <sabesto> but there must be a way
[18:39:22] <sabesto> wish this 2313 had HW spi
[18:39:42] <Kevin`> you CAN create a struct for the port for the .pin stuff
[18:40:00] <Kevin`> i'm not sure of the caveats of using that though
[18:40:23] <sabesto> i will just use that line
[18:43:00] <Kevin`> sabesto: abcminiuser's defines there look informative. for some reason I didn't think of using ?: for a non-return operation
[18:43:27] <sabesto> and for "nSEL=0;" i could do "cbi(PORTB, PB2);"
[18:43:56] <sabesto> nSEL was defined as PORTB.2
[18:44:32] <Kevin`> is cbi available directly in c?
[18:44:57] <sabesto> yes
[18:45:17] <sabesto> http://winavr.scienceprog.com/winavr-tool-set/avr-gcc-code-compatibility.html
[18:45:39] <sabesto> or i could use the new method
[18:45:41] <Kevin`> it looks like it's a define to use binary math, instead of direct inline asm
[18:46:03] <Kevin`> which is probably good overall since it will end up working for addresses that cbi wouldn't
[18:46:53] <Kevin`> the compiler should end up using it either way when possible
[18:52:06] <grummund> code it in C and gcc should Do The Right Thing with cbi if it can
[18:52:41] <sabesto> Kevin`: http://pastebin.com/6KBzpqpc
[18:52:58] <sabesto> someting happened to the format of the text though
[18:55:29] <Kevin`> sabesto: it looks like you have the right idea. you are inverting nSEL=1 at the bottom for some reason
[18:55:42] <sabesto> o, yeah
[18:56:14] <sabesto> sadly there is no easy way to check this
[18:56:33] <sabesto> oh, i actually got a xprotolab with SPI decoder
[18:56:33] <Kevin`> run it really slow
[18:56:36] <Kevin`> or use a scope
[18:56:57] <sabesto> http://www.gabotronics.com/development-boards/xmega-xprotolab.htm
[18:57:01] <sabesto> got that :P
[18:57:22] <sabesto> fits perfectly on the breadboard :)
[18:58:25] <Kevin`> that looks fairly capable for the hardware it's using (just a microcontroller apparently)
[18:59:12] <Kevin`> and source code too. writing that down, might be useful someday
[18:59:55] <sabesto> it was 35 usd when i bought it
[19:00:12] <sabesto> they upped the price many times since
[19:00:12] <sabesto> think its popular
[19:00:24] <sabesto> really great for breadboard work
[19:00:40] <sabesto> freq, decode, voltage and a itty bitty scope :)
[19:00:43] <abcminiuser> And I'm back.
[19:03:44] <grummund> sabesto: if timing is critical you'd be better off unrolling that loop manually
[19:04:35] <Kevin`> timing normally isn't critical as an spi host
[19:04:54] <Kevin`> the delays there are just to make sure it can't run too fast
[19:04:55] <sabesto> that code worked apparently
[19:05:21] <sabesto> in action http://www.youtube.com/watch?v=qkY5ufX6r4o
[19:05:31] <sabesto> RFM22B-S2 transmitters
[19:05:40] <sabesto> trancievers
[19:09:46] <Kevin`> I have some of the 12b transcievers. haven't done much with them yet other than read the status register
[19:10:57] <sabesto> this is pretty much my first project in C and AVR
[19:11:31] <sabesto> got the sparkfun example code, but its written for 328p and it has HW SPI
[19:12:05] <sabesto> so i need the read / write functions from that video
[19:12:25] <sabesto> then i should be good
[19:16:27] <grummund> sabesto: http://pastebin.com/dpci6Qaz
[19:18:49] <sabesto> thanks, i'm writing a test code now
[19:24:09] <sabesto> FUUU, keyboard hung on backspace while coding
[19:34:40] <Gurgalof> Tom_itx is the hardware opensource for the USBTinyMKii?
[19:35:15] <Kevin`> the hardware for that is pretty simple, whatever the case is
[19:37:31] <Gurgalof> The schematic would be nice
[19:37:53] <Gurgalof> Could save a lot of time
[19:38:34] <Gurgalof> Dont want to reverseengineer it from the code
[19:39:59] <raden> Is there a tutorial somewhere on long delays ?
[19:40:03] <raden> trying to make a 10 min timer
[19:40:34] * Landon just keeps a few extra bytes in sram for cases like that
[19:40:34] <sabesto> grummund: does not seem to work properly
[19:41:20] <sabesto> http://pastebin.com/hXAfVqfV
[19:41:42] <sabesto> spits out C4 C4
[19:42:09] <sabesto> if i change the values it changes on the decoder too
[19:42:19] <sabesto> but not what i set it to :P
[19:44:23] <Kevin`> raden: set the timer to a low frequency (lowest unless you are using it for something else), enable the overflow interrupt, and use the interrupt to increment a second counter value in ram for more bits
[19:46:05] <Kevin`> I have an example from my latest project if you want, although it's not the cleanest it could be. it has a 30 second delay and a 0.2 (iirc) second delay
[19:48:08] <sabesto> grummund: hehe, you wrote addr in both for loops
[19:48:18] <raden> Kevin`, that would be very helpful
[19:48:18] <sabesto> the data byte is being sent ok
[19:48:32] <sabesto> but the addr seems like its backwards
[19:48:34] <raden> Kevin`, this is my first attempt with AVR
[19:49:58] <Kevin`> raden: http://kwzs.be/~kevin/irctl.tbz2 - the chip i'm using only has two 8-bit timers, both of which are used for other functions
[19:50:10] <Kevin`> i'd link just the c file, but I already had that archive for.. archiving
[19:51:47] <sabesto> Kevin`: http://pastebin.com/Vr6FBRRf
[19:52:02] <sabesto> Kevin`: data counts perfectly
[19:52:11] <sabesto> but addr starts at 80, then counts up
[19:52:49] <sabesto> hmm, Addr=Addr|0x80;
[19:53:37] <sabesto> ok, now it works
[20:02:13] <karl_> you can also use the watch dog if you make it an interrupt rather than a reset.
[20:02:26] <karl_> and if the intervals it offers are suitable
[20:25:47] <sabesto> Kevin`: http://pastebin.com/Ye10gHgn
[20:26:03] <sabesto> Kevin`: does line 40 make sense?
[20:26:12] <sabesto> this is the read function
[20:26:22] <sabesto> write function is done and works
[20:26:53] <sabesto> wait, the pin isnt correct, but the syntax as a whole
[23:56:16] <Gurgalof> Tom_itx can i have the schematic of the tinyusbmkii?