#avr | Logs for 2011-10-26

Back
[00:08:42] <CapnKernel> I think I've worked it out now.
[01:59:25] <CapnKernel> inflex: Secret is to translate, then scale, then apply the inverse translate.
[02:05:43] <inflex> that just seems so damned wrong
[02:06:23] <ziph> Not when you concatenate the operations and _then_ apply them to the object.
[02:07:28] <ziph> Or if you're doing it frequently, algebraically concatenate the operations and then code in the formula for each of the matrix entries.
[02:16:31] <crazy_pete> i think the secret is to be able to do both operations independantly
[02:16:57] <crazy_pete> remember knuth "Premature optimisation is the root of all evil"
[02:17:19] <ziph> Huh?
[02:18:19] <crazy_pete> concatenating the operations into a single operation makes it harder to debug, especially the first time (i.e. when you haven't even gotten either one right yet)
[02:18:54] <crazy_pete> hence "PREMATURE optimisation is the root of all evil"
[02:19:07] <ziph> Ever read much Knuth?
[02:20:27] <ziph> Practically every problem he applies MIX to ends up being a premature optimisation contest.
[02:22:37] <ziph> And if you concatenate two translations and a scale you get a 3x3 affine matrix with 5 non-zero entries, which is hardly a debugging horror.
[02:35:34] <CapnKernel> The coordinates that come out of GNU barcode are based on the size of an A4 page, but include a whitespace border. I don't want to change the origin of the coordinates coming out of GNU barcode (after all, it was hard enough finding and fixing the bugs in GNU barcode), but I want to translate and scale relative to the bottom left corner in order to compensate for my laser printer.
[02:36:36] <ziph> Do you have the coordinates of the bottom left corner?
[02:39:06] <CapnKernel> Yes. FWIW 4.3, 10.1
[02:40:52] <ziph> And translating - those, then scale, then + those doesn't work?
[02:41:48] <CapnKernel> One translates to get the origin over the corner, does the scale, then most importantly, you have to translate back, otherwise the barcode doesn't work, because the PS for that assumes the origin is 0,0
[02:42:28] <CapnKernel> And in other news, the transformations are applied in reverse order :-)
[02:43:06] <CapnKernel> For example, if your program has a translate then rotate, postscript applies these to subsequent operations in the reverse order.
[02:46:38] <ziph> Doing an order handling system, eh? :)
[02:46:56] <inflex> oh fun
[02:47:03] * inflex wrote his own storefront for NQRC
[02:47:14] <inflex> only wish I had done it using SQLite though, rather that PostgreSQL
[02:47:25] <ziph> Why?
[02:47:30] <inflex> ( that said, PostgreSQL is great, it's just that SQLite is a lighter fit )
[02:47:43] <ziph> It isn't that great for concurrency though.
[02:47:56] <inflex> no, it's not - but then I only get about a couple of orders a day
[02:48:09] <inflex> Anyhow, it runs on PostgreSQL for now
[02:48:52] <inflex> SQLite is just so nice in terms of backup and portability
[02:49:48] <inflex> Am looking to rewrite a lot of my Xamime stuff in SQLite
[02:49:50] <ziph> Yeah, I love it, but i wouldn't use it for a web site.
[02:50:38] <ziph> Non MVCC databases can be hilarious. Open a table an an SQL editor and the entire system grinds to a halt because the editor put a bunch of row locks in.
[03:08:08] <inflex> ziph: depends - sometimes SQLite is perfect for if you're using a DB for the layout/construction of the site
[03:08:18] <inflex> or simple sites
[03:08:25] <inflex> I dare say 90% of existing sites would be just fine on SQLite
[03:10:11] <ziph> Except it would needlessly slow down even single requests (where the browser is fetching with multiple connections).
[03:10:33] <ziph> I've seen some web packages do it though.
[03:11:49] <sporp> I'm really stumped. I have an attiny13 that has the low order fuse bits set to (0x7a) which, from what I understand, is configured to 9.6 MHz internal RC and CKDIV8 disabled. I have a timer interrupt enabled to fire every cpu cycle ( TCCR0B |= (0<<CS02) | (0<<CS01) | (1<<CS00); ) yet it seems like the timer interrupt is firing 1/256th the time it should be
[03:15:02] <inflex> ziph: never really found that problem, especially if you actually design things right - like with any DB app
[03:15:34] <inflex> but remember, I'm talking about sites that don't see more than 1000 hits a day
[03:17:26] <inflex> anyhow, I should be focusing right now on selling
[03:27:04] <sporp> arg! the timer only fires when it hit's 0 in the it's counter...
[03:28:05] <Valen> you have an interrupt on overflow
[03:28:11] <Valen> thats normal
[03:33:10] <jd_ce> is there something about the avr studio debugger that wont let it read a pointer to char. trying to do a simple strtok and 'watch' it. it only reads a single byte of the pointer to char variables
[03:48:16] <jd_ce> i took it to gcc/gdb and it worked just fine. sigh
[03:52:28] <Fleck> sporp are u sure its TCCR0B ?
[03:52:57] <Fleck> i had the same problem, was setting bits to wrong register or how do you call them
[04:43:56] <karlp> sporp: are you really meaning to have the interrupt fire every cpu clock?
[05:00:57] <grummund> CapnKernel: care to explain further?
[05:02:18] <CapnKernel> grummund: wrt what?
[05:02:39] <grummund> "The current through the LED will change with temperature and phase of the moon."
[05:02:51] <grummund> was it a joke?
[05:03:29] <CapnKernel> No!
[05:03:54] <CapnKernel> You need to drive LEDs at a constant current. You can't use resistors for doing that.
[05:04:12] <CapnKernel> (Except in the sense of measuring current using a low-value sense resistor
[05:04:35] <CapnKernel> LEDs change their characteristics with temperature and age.
[05:05:24] <grummund> Q1/Q2/R1 form a constant-current driver
[05:06:46] <CapnKernel> What's the link again?
[05:09:28] <grummund> http://i44.tinypic.com/j94jma.png
[05:10:12] <CapnKernel> How does it do constant current? Is it lossy?
[05:10:31] <grummund> it's magic
[05:10:47] <CapnKernel> Obviously.
[05:12:47] <grummund> it finds equilibrium with Vbe of Q2 at around 0.7V (in theory)
[05:14:07] <CapnKernel> In order to get a certain current, there needs to be a certain voltage across the LED. Assuming your battery voltage is higher than that certain voltage, what happens to the balance of the energy?
[05:14:15] <CapnKernel> (Sorry, I'm not an analog guy)
[05:14:37] <grummund> it's dropped across R1 and Q1(Vce)
[05:14:47] <CapnKernel> Isn't that wasteful?
[05:15:51] <karlp> that link doesn't work for me...
[05:16:37] <CapnKernel> In the same way as linear regulators are wasteful.
[05:16:55] <karlp> oh, not that link :)
[05:16:58] <karlp> I knew what you meant :)
[05:17:12] <grummund> yes, it *is* linear regulation.
[05:17:15] <karlp> the link to the schematic doesn't work for me :)
[05:21:17] <CapnKernel> grummund: Can't believe you're not doing it the smart way, with PWM
[05:23:20] <grummund> do you still believe:
[05:23:23] <grummund> "The current through the LED will change with temperature and phase of the moon."
[05:23:25] <grummund> ?
[05:23:30] <karlp> still got to get the current from somewhere
[05:23:34] <CapnKernel> With a constant voltage, yes.
[05:23:43] <karlp> not phase of the moon though
[05:23:46] <karlp> at least, not likelyl
[05:23:51] <grummund> Q1/Q2/R1 form a constant-current driver
[05:24:18] <CapnKernel> Q1/Q2/R1 form a circuit I wouldn't want to put on my resume.
[05:24:28] <karlp> it's constant current, relying on the Vbe though right?
[05:24:34] <karlp> whihc will change with junction temperature?
[05:24:36] <CapnKernel> Linear sux so hard, dude!
[05:25:11] <karlp> except it works, and has no software :)
[05:25:27] <grummund> karlp: yes, i'm hoping that won't be a problem
[05:26:01] <karlp> grummund: probably nto, with modern transistors, I wouldn't expect it to swing enough tomake a _visible_ difference
[05:26:33] <karlp> but you should be able to work out how much power is eaten by the driver for a full battery and a flat battery
[05:27:00] <karlp> and the transistor datasheet might give you some advice on just how much change you could expect
[05:27:04] <CapnKernel> So I'm riding my bike with your light, and it's going to be doubly hot, right to the point where it leaves me in the dark only half-way home.
[05:27:51] <grummund> lol. you're right... maybe i should stick an avr in there.
[05:28:05] <CapnKernel> Nice constant current circuit when you need a *low* amount of constant current. Float for a NiCd for example.
[05:28:35] <CapnKernel> Some kind of micro.
[05:28:38] <karlp> linear for high currents is like big heavy audio amps
[05:28:47] <karlp> it's better _because_ it's heavy and needs heatsinks!
[05:33:04] <CapnKernel> karlp: that's rubbish
[05:33:37] <CapnKernel> Do I want my bikelight to be heavy, and pointlessly dump battery power into energy in heatsinks?
[05:33:38] <karlp> of course it is :)
[05:33:50] <karlp> I was agreeing :)
[05:34:02] <CapnKernel> Next thing you know, you'll be trying to sell me a valve-powered light :-)
[05:34:35] <karlp> I had a valve powered light on my fixie years ago mang, the light is just so much smooother, more real you know?
[05:36:17] <crazy_pete> as long as it is a very heavy heat sink, CapnKernel :)
[05:37:17] <CapnKernel> karlp: funny
[05:38:23] <karlp> I wonder if I could fine someone stupid enough to actually buy a valve controlled bike light
[05:41:27] <karlp> probably, but I think it will go into the, "never ever do that" box of ideas
[05:41:41] <karlp> bikes! hah! it'll never catch on
[05:43:29] <ziph> CapnKernel: What would you do other than Linear?
[05:49:59] <CapnKernel> PWM for sure. Have the PWM hardware of an AVR or similar drive a MOSFET. As long as the average current is what you'd get with your special circuit, your LED won't mind.
[05:50:43] <CapnKernel> Have a low value sense resistor and measure the voltage drop across it. Use this to determine current, and adjust duty cycle to suit.
[05:56:44] <grummund> you'd still need to limit peak current
[06:13:27] <CapnKernel> Grummund: How so?
[06:13:44] <CapnKernel> I'm not quite sure what you mean.
[06:14:20] <CapnKernel> Sure, when the MOSFET is on, you will get a high current, far higher than the sustained current the LED is happy with.
[06:14:36] <CapnKernel> In most designs I've seen, that high current is not a problem.
[06:15:59] <karlp> from what I've heard of high power LEDs, it does seem to dramatically reduce their lifespan though
[06:16:19] <karlp> but, it's again a case of back to the datasheet
[06:16:24] <CapnKernel> I thought it was heat that drastically reduced their lifespan.
[06:16:42] <grummund> the LED will have max rating for pulse current
[06:33:37] <abcminiuser> Holy crap, science! http://www.youtube.com/watch?v=Ws6AAhTw7RA\
[06:33:40] <abcminiuser> Err http://www.youtube.com/watch?v=Ws6AAhTw7RA
[06:34:22] <Tom_itx> over time won't the high current of the pulsed mosfet shorten the led life?
[06:35:31] <Tom_itx> watch his fingers fall off next
[06:38:55] <Tom_itx> abcminiuser mount a pair to the bottom of your shoes
[06:39:14] <ziph> Why are they calling it Quantum Levitation? I thought superconductor levitation was commonly explained by and referred to by classical electro/magnetostatics?
[06:39:34] <abcminiuser> It
[06:39:38] <abcminiuser> It's goddam magic
[06:39:44] <abcminiuser> And I want my hoverboard damnit
[06:40:32] <ziph> abcminiuser: You know that other fancy watch I posted you a link to? You can buy them now.
[06:40:37] <Tom_itx> with electromagnets at intersections to 'auto stop' you on red
[06:41:59] <abcminiuser> ziph, the TI one?
[06:42:06] <abcminiuser> I've bought one, got the discount this afternoon
[06:42:11] <abcminiuser> $25 shipped
[06:42:26] <ziph> How do you get the discount?
[06:43:13] <ziph> abcminiuser: And I mean this one: http://www.metawatch.org/models/
[06:43:25] <ziph> abcminiuser: And you can now buy them: https://estore.ti.com/MSP-WDS430BT2000D-Bluetooth-Wearable-Watch-development-system-with-Digital-display-P2447.aspx
[06:44:37] <ziph> abcminiuser: And those are Bluetooth, so you could control your robot via your watch. :)
[06:44:55] <Tom_itx> alarm driven
[06:45:04] <abcminiuser> http://tideals.com/
[06:45:13] <abcminiuser> ziph, hrm, I got the MSP430 TI watch
[06:45:33] <abcminiuser> Crappier, but a heck of a lot cheaper than the bluetooth one
[06:45:33] <ziph> abcminiuser: That's ok, for $25 you could afford to buy one for your cat.
[06:46:00] <ziph> abcminiuser: Do you get an RF USB dongle with it?
[06:46:04] <abcminiuser> Yup
[06:46:16] <abcminiuser> USB RF Dongle, programmer and watch
[06:46:18] <ziph> So you'll be doing a version of firmware that uses that? :)
[06:46:24] <abcminiuser> So pretty sweet deal
[06:46:43] <Tom_itx> the RF or Bluetooth would drain the battery pretty quick i'd think
[06:46:49] <abcminiuser> http://www.youtube.com/watch?v=LDJIBydJvoM
[06:47:11] <ziph> http://en.wikipedia.org/wiki/Bluetooth_low_energy promises to be quite lean.
[06:47:38] <ziph> abcminiuser: Insist on wearing it until AVR puts out a replacement.
[06:48:05] <abcminiuser> ziph, I will :D
[06:48:13] <abcminiuser> I'll wear it to Atmel HQ until someone notices
[06:48:21] <abcminiuser> And forces me to glue a RZRaven to my arm instead
[06:48:30] <abcminiuser> Actually, I'm not sure what I'll do with it yet
[06:48:38] <abcminiuser> But as an email monitor it would be cool
[06:49:08] <ziph> abcminiuser: Also, the Australian tax system does have a special category for Engineers; it's called the Alienation of Personal Services Legislation. :)
[06:49:26] <abcminiuser> ziph, one day I'll just hire you as my tax consultant
[06:49:31] <abcminiuser> I was utterly bamboozled
[06:49:42] <ziph> With the personal services stuff?
[06:49:47] <abcminiuser> Ended up with something that seemed plausable, but I might go to jail for that $5000 :P
[06:50:01] <abcminiuser> Well, I had domestic earnings from my Uni for tutoring
[06:50:06] <abcminiuser> Payments through my ABN for LUFA
[06:50:13] <abcminiuser> Private consulting done without the ABN
[06:50:18] <abcminiuser> And my Atmel earnings overseas
[06:50:26] <abcminiuser> Altogether a tiny amount, but gaaaah
[06:50:28] <ziph> The ABN was just for a sole trader though, right?
[06:50:33] <abcminiuser> Yup
[06:50:45] <abcminiuser> If I ever end up getting audited I'll just jump out a window
[06:51:01] <ziph> Yeah, so it all goes into your personal return, but the income goes under "Business Income" rather than regular income.
[06:51:24] <ziph> They won't really care unless it changes the amount of tax you've paid.
[06:51:47] <Tom_itx> abcminiuser, for the norway stuff deduct your travel and lodging
[06:52:15] <Tom_itx> and at the pub, if there was mention of avr deduct that
[06:53:29] <crazy_pete> hell i have considered demanding an audit just to waste their tim e
[06:53:39] <crazy_pete> by law they have to give you an audit if you ask
[06:53:54] <crazy_pete> so everyone asks and they end up spending more money in audits then they take in and the government dies :)
[06:54:08] <crazy_pete> no more taking our billions to give to banker billionaires
[06:54:22] <abcminiuser> ...
[06:54:41] <abcminiuser> Well as long as I never get screwed because I put a few grand in the wrong spot I'm good
[06:54:56] <abcminiuser> As far as I can tell I qualify for a crazy amount of offsets for my "small business" anyway
[06:55:13] <crazy_pete> awesome, abcminiuser
[06:55:15] <abcminiuser> So until I earn like $26K in a year from my ABN I won't pay tax on it
[06:55:34] <abcminiuser> Next year I'll be at Atmel, and I'll cry
[06:55:38] <Tom_itx> find the right tax guy and you may show a loss
[06:55:40] <Tom_itx> :)
[06:55:42] <abcminiuser> Then I'll have two lots of tax to figure out
[06:55:55] <abcminiuser> Tom_itx, holywood accountants?
[06:56:12] <Tom_itx> possibly
[06:58:12] <Tom_itx> or an ex govt employee
[06:58:19] <crazy_pete> what is an ABN, may i ask?
[06:59:23] <Tom_itx> like a tax number
[06:59:24] <abcminiuser> Australian Business Number
[06:59:37] <abcminiuser> Tom_itx, we have individual tax numbers too
[06:59:43] <Tom_itx> so do we
[06:59:49] <abcminiuser> But the ABN is for our businesses, for tax purposes
[06:59:58] <Tom_itx> yes
[07:00:05] <abcminiuser> Although I have both, since I'm a "sole trader" - a business of myself
[07:00:05] <karlp> and for buying a .au domain name :)
[07:00:11] <Tom_itx> we have fed and state numbers for your ABN
[07:00:18] <abcminiuser> Garg
[07:00:27] <crazy_pete> sounds like a "federal employer id number" in the USA, basically a tax id for a company
[07:00:55] <crazy_pete> BTW thanks for all your work on LUFA
[07:00:56] <Tom_itx> and if you work in multiple states you need to pay them all
[07:01:34] <abcminiuser> Cheers :)
[07:03:07] <abcminiuser> Oh FFS, I need to work out how to firewall off my GF from any site I touch
[07:03:24] <karlp> what, like, "the internet" ?
[07:04:06] <crazy_pete> has learnt the hard way "no GF, mail order bride instead"
[07:04:29] <crazy_pete> you see if you divorce a girl friend, you end up paying a huge settlement and she gets the house and all your income
[07:04:40] <Tom_itx> daily rentals are much cheaper
[07:05:10] <crazy_pete> if you divorce a mail order bride, she gets sent back to her home country where she goes in a concentration camp for "suspicion of treason and spying" because she married a westerner
[07:05:31] <crazy_pete> they work much harder at keeping the relationship going under those circumstances
[07:06:11] <crazy_pete> (american women get really angry when i point that out to them)
[07:08:59] <crazy_pete> so whats a good site to read to become an expert in USB ? :)
[07:14:01] <crazy_pete> the USB spec at 650 pages i guess :)
[08:13:18] <Valen> do you divorce a mail order bride or RMA them?
[09:04:32] <scuzzy> abcminiuser: how hard would it be do put a feature like this into the bootloader: when it starts, it performs a CRC on the flash, to see if it's corrupt, and if it doesn't match a given CRC, then it doesn't jump to the start address, it stays in the bootloader
[09:04:33] <scuzzy> ?
[09:04:50] <scuzzy> say, the CRC can stay in eprom or something
[09:05:29] <abcminiuser> scuzzy, easy enough, I guess
[09:05:40] <scuzzy> ok cool
[09:06:13] <abcminiuser> for (uint32_t Address = 0; Address < FLASHEND; Address++) { FlashCRC =CRC16(FlashCRC, pgm_read_byte_far(Address)); }
[09:06:14] <abcminiuser> Etc
[09:06:23] <scuzzy> yeah
[09:08:05] <scuzzy> then, whenever the device is flashed, and is successful you just mash a CRC to eeprom
[09:10:10] <abcminiuser> Yup
[09:10:13] <abcminiuser> I gotta get to bed :P
[09:21:48] <scuzzy> night, thanks again
[09:58:26] <RikusW> Still can't get my xmega :S -- RS: Please be advised that we are unable to supply stock no 6963216 as we still cannot obtain a licence for it.
[09:59:44] <Tom_itx> huh?
[10:01:42] <vectory> licence from the government?
[10:03:15] <RikusW> yes
[10:03:29] <RikusW> for the encryption modules on the xmega...
[10:03:50] <RikusW> thats just plain crazy red tape...
[10:04:22] <RikusW> it can be done in firmware as well... I actually have the (illegal ??) appnotes to do it...
[10:04:51] <vectory> dont say that too loud, this channel is logged xD
[10:05:12] <vectory> damn, in germany we have all rights to encrypt whatever we want
[10:05:19] <RikusW> those appnotes can be downloaded form atmel...
[10:05:28] <RikusW> *from
[10:06:43] <RikusW> If I get say a fpga I could implement a high speed AES module on that too, sidestepping the red tape....
[10:07:05] <RikusW> Not that I need AES...
[10:08:01] <vectory> trying to run a VM with xilinx and mentor software. the rar is 13 gb, 30gb when expanded. i have it on an external hdd with 40gb free and want to extract to an internal hdd where the partition has 35gb of free space. /tmp only has 3gb left. after 4gb of unraring it aborts, saying the file is too big, am i doing sth wrong?
[10:08:38] <vectory> when extracting to the external hdd, it works eazy peasy
[10:09:44] <RikusW> get a lager disk ;)
[10:09:50] <RikusW> larger
[10:10:04] <vectory> why, i would think the space is enough
[10:10:07] <RikusW> 30GB for dev sw ?! ugh
[10:10:31] <vectory> for the whole disk image with xp
[10:10:35] <RikusW> maybe it use some extra space while extracting
[10:10:48] <vectory> but on which partition?
[10:11:41] <vectory> seeing extracting on the external one works now, despite /tmp still being 3gb
[10:11:58] <vectory> so ill just move it afterwards
[10:12:08] <vectory> and the vm will still be unbearably slow
[10:12:59] <RikusW> why not install XP on another partition and dual boot ?
[10:13:47] <vectory> the software connects to a licence server, to check validity of the licences, dont know how to work that in to my xp
[10:14:17] <karlp> get a different unrar?
[10:14:36] <vectory> isnt rar aways the same propriatary backend?
[10:14:42] <vectory> *always
[10:14:58] <karlp> maybe for the compression, but clearly something's buffering in memory, when it should be streaming out to the disk
[10:15:15] <karlp> what's the rpoblem with extracting externally and just moving it anyway?
[10:15:19] <karlp> if that's known to work?
[10:15:30] <vectory> its slow
[10:15:35] <vectory> usb 2.0 >_<
[10:15:43] <karlp> it's only 30gig, suck it up
[10:16:01] <vectory> i do
[10:16:23] <RikusW> 20 minutes or more....
[10:38:25] <crazy_pete> do you mind if i ask what country you are in that you can't get a licence for the xmega? I am kind of curious about this sort of thing
[10:38:36] <Tom_itx> Africa
[10:38:38] <crazy_pete> (availability of hardware i mean)
[10:39:12] <RikusW> South Africa
[10:39:17] <Tom_itx> it's damn hard to ship anything there too
[10:39:19] <Tom_itx> :)
[10:39:27] <RikusW> seems RS cant deliver...
[10:39:37] <RikusW> Tom_itx: you tried ?
[10:39:42] <Tom_itx> yep
[10:39:50] <Tom_itx> never arrived
[10:41:08] <Tom_itx> western cape
[10:41:29] <RikusW> to scuzzy ?
[10:41:36] <Tom_itx> i dunno
[10:41:45] <RikusW> too bad
[10:42:11] <RikusW> customs maybe ?
[10:42:23] <Tom_itx> he may be on irc but i didn't associate the name/nick
[10:42:27] <Tom_itx> i'm sure it was customs
[10:43:01] <Tom_itx> living there i'm sure they're aware of the problem
[10:44:45] <RikusW> Tom_itx: Daine maybe ?
[10:44:55] <Tom_itx> no
[10:45:27] <Tom_itx> i feel kinda bad cause they keep trying
[10:46:14] <Tom_itx> only available tracking would be something like fedex or ups and they want more than the order is worth just to ship it
[10:46:29] <RikusW> yes found that out too :S
[10:46:30] <Tom_itx> 2-3x more
[10:47:00] <RikusW> ZAR140 for tracked parcel....
[10:47:13] <Tom_itx> don't know what that is
[10:47:21] <RikusW> instead of ZAR25 untracked
[10:47:28] <Tom_itx> oh cost?
[10:47:33] <RikusW> about ZAR8 / $
[10:47:47] <Tom_itx> sounds about right
[10:48:39] <Tom_itx> fedex wanted ~ $100-120
[10:48:48] <RikusW> ouch
[10:48:55] <RikusW> thats crazy
[10:49:02] <crazy_pete> wow that sucks
[10:49:05] <Tom_itx> i should be in internatinal shipping
[10:56:31] <chupas> is there any guide lines for using devices on the programing pins, MISO, MOSI, etc pins?
[10:56:50] <chupas> I want to put LEDs on them but do not want them to hinder ISP programing
[10:57:44] <Tom_itx> maybe not a good idea
[10:57:57] <chupas> doh
[10:58:17] <RikusW> try and see ?
[10:58:50] <RikusW> probably won't work at high speeds like 500kbps anymore
[10:58:57] <chupas> ehhhh
[10:59:06] <chupas> ill just switch things around i guess
[10:59:11] <Tom_itx> use larger than planned resistors on the leds too
[10:59:13] <chupas> put open buttons on there
[10:59:22] <chupas> with pull down when pressed
[10:59:35] <chupas> and avoid all issues
[11:12:46] <karlp> chupas: there's some notes in the avr hardware design considerations document
[11:12:57] <karlp> but it's more towards having more devices on teh spi bus
[11:13:13] <chupas> yea, i saw it
[11:13:33] <chupas> Im just going to avoid it alltogether
[11:14:06] <karlp> normally best :)
[11:14:47] <chupas> I thoght i was going to be short on pins
[11:14:48] <chupas> but im not
[11:14:51] <chupas> so no big
[11:58:55] <Tom_itx> http://www.nxp.com/news/press-releases/2011/10/nxp-cortex-m0-microcontrollers-in-high-volume-tssop-and-so-packages-target-8-16-bit-applications.html
[11:59:00] <Tom_itx> watch out atmel
[11:59:54] <Tom_itx> sub-40 cent 32-bit MCU solutions in 2012
[12:00:07] <lifeeth> Woah
[12:01:13] <Tom_itx> Samples are available in November 2011
[12:03:05] <vectory> Tom_itx: didnt TI try that with the MSP430 already?
[12:03:15] <Tom_itx> probably
[12:03:38] <vectory> although, launchpad here would costs me at least twice the price
[12:04:25] <karlp> I've been waiting for m0's to get made in better form factors
[12:04:36] <karlp> currently the smallest in lfqp is still 48 pins
[12:04:46] <karlp> 26 pads for QFN, which is rather unfriendly
[12:04:55] <karlp> wow, even in dip28?
[12:04:58] <karlp> yeah, game over
[12:06:26] <karlp> these will be fun!
[12:20:29] <karlp> hmm, double on avr, is that meant to only be 32 bit?
[12:20:52] <karlp> I know, I know, 64 bits is 8 registers, but to just outright claim that a double is the same as a single?
[12:21:01] <karlp> no warning from gcc?
[12:23:17] <karlp> yaya, read the avr-libc docs, don't try and let the compiler do your dirtywork, yayay
[12:24:10] <Kevin`> I tend to just use the specifically sized types. eg uintx_t
[12:24:22] <jevin> can someone recommend a handheld dmm <= $250? some kind of frequency measurement and capacitance measurement would be a plus
[12:25:15] <karlp> Kevin`: I am doing some floating point maths, and was going to just keep the result long term in a double.
[12:25:38] <karlp> guess I keep the float, but then *= 1000 and store it in a int64_t, instead of a double
[12:25:48] <karlp> should be good enough
[12:26:19] <vectory> copying the extracted VM gives the same error input/outputerror T_T
[12:27:59] <karlp> is there a preprocessor trick to check things like sizeof(double) ?
[12:28:11] <karlp> so I can know ehther a file is being compiled for avr, or for something witha full double?
[12:30:27] <vectory> since sizeof is a preprocessor macro, i think it should be possible
[12:33:59] <vectory> #if sizeof(double) > AVRDOUBLE
[12:35:47] <vectory> if need be, because sizeof isnt implemented as macro, you can declare a constant
[14:11:21] <crazy_pete> is sizeof a preprocessor macro? (I really don't know)
[14:11:27] <crazy_pete> or a keyword?
[14:12:31] <ziph> It's a keyword.
[14:12:53] <ziph> "sizeof int" is valid C, but because of precedence you almost always end up putting brackets after it.
[14:15:17] <crazy_pete> brackets?
[14:15:30] <crazy_pete> oh '(' brackets (sorry)
[14:16:13] <crazy_pete> yeah i just ran sizeof through gcc -E (run preprocessor only) and it comes through unchanged
[14:19:26] <vectory> still, it might work in a preprocessor if expression
[14:20:20] <crazy_pete> i forget why it works in a preprocessor expression
[14:20:30] <ziph> That would surprise me.
[14:20:40] <crazy_pete> thats a good question though vectory because it does
[14:20:50] <ziph> Given that the preprocessor wouldn't have access to most type information.
[14:21:16] <crazy_pete> yeah the preprocessor shouldn't have access to any type information
[14:22:01] <vectory> you can use character constants there too, i dont think they mean #define constants. from "http://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp_4.html"
[14:23:43] <crazy_pete> hmm that doesn't work after all
[14:24:53] <crazy_pete> i am sorry i would have sworn sizeof was the one keyword you could use in preproc expressions
[14:26:17] <karlp> there's a few tricks apparently to have something declare code that becomes invalid: http://scaryreasoner.wordpress.com/2009/02/28/checking-sizeof-at-compile-time/
[14:26:53] <ziph> cpp's expressions aren't really even close to C's given that they deal with macro symbol tables.
[14:41:45] <crazy_pete> yeah i don't know why i thought sizeof worked in preprocessor expressions
[14:42:12] <crazy_pete> i would still swear i have seen it done but it sure doesn't make sense (or work on avr-gcc)
[14:42:12] <ziph> There's always C++ metaprogramming. :)
[14:46:45] <crazy_pete> wow thats cool karlp
[14:51:12] <ziph> Heh, that is a neat idea.
[14:51:57] <ziph> The result of constant folding that would otherwise result in a runtime error isn't usually that well defined in languages, but I can't imagine the C compiler doing anything other than what you expect with that.
[17:49:18] <resixian> is there some way to restor stk500 factory settings from avrdude
[17:51:50] <resixian> i was messing with mie the other day (to slow it down) and now it is broken, everything gives `avrdude: stk500v2_command(): warning: Command timed out`
[17:59:53] <resixian> ah, -B 2.4 fixes it
[18:01:15] <CapnKernel> Tom_itx: I'm hungering for that NXP chip!
[18:06:29] <district> what nxp chip?
[18:06:46] <district> oh the cortex m0
[18:07:07] <district> ooh, in a nice package as well.
[18:09:12] <CapnKernel> And this page even says DIP28: http://www.nxp.com/products/microcontrollers/cortex_m0/lpc1100l/
[18:19:13] <district> dip40 would be nice
[19:24:38] <resixian> hm. it seems now I have to use -B 2.4 every time with avrdude, didnt used to. Is there something i am missing?
[20:15:28] <inflex> oooh, I hate DIPs
[20:15:55] <inflex> woah, 2.4? I didn't even know you could specify fractional bitrate speeds
[20:18:32] <Landon> I've just been curious about this lately, but does anyone know where I can find information on how to interface with DDR2 SDRAM that I can just pop out of my computer
[20:19:05] <CapnKernel> Landon: If you're looking for a quick and easy solution, there isn't one.
[20:19:06] <Valen> Landon: FPGA?
[20:19:31] <Landon> Valen: yes, thinking about it, but right now I just want to see generally how they work
[20:20:10] <Landon> CapnKernel: I figured :P I'm a couple hundred pins short on the DIP avrs I have floating around
[20:22:12] <CapnKernel> Here's a lib to do it: http://www.gaisler.com/cms/index.php?option=com_content&task=section&id=13&Itemid=125
[20:22:23] <CapnKernel> License: GPL or commercial, you choose
[20:22:23] <Valen> i think they have fairly tight clocking requirements too so using a port expander probably wont work
[20:22:38] <Valen> you could perhaps use a chip off one?
[20:23:45] <Landon> oh, that's an idea too
[20:24:16] <CapnKernel> Good luck, you're going to need it.
[20:24:23] <Landon> (going to do an oscilloscope project with the girlfriend, trying to come up with preliminary ideas to improve on the 15ksps I could get on an AVR)
[20:24:36] <Valen> buy gsps ADC
[20:24:46] <Valen> use existing open source scopes
[20:24:51] <CapnKernel> "I saw an ex-F1 V12 engine on EBay, how can I attach it to my lawnmower?"
[20:24:56] <Valen> give me gfs number
[20:25:00] <Landon> haha
[20:25:04] <Valen> its not that bad CapnKernel
[20:25:21] <Valen> if your after high sample speed an AVR is perhaps not the best answer
[20:25:45] <CapnKernel> Landon: Check here: http://www.sump.org/projects/analyzer/
[20:26:45] <Landon> we're trying to do this from the ground up, one step at a time, so all I'm really concerned about now is storing ADC readings
[20:27:07] <Landon> CapnKernel: bookmarked
[20:27:50] <Valen> sometimes a top down approach is a good thing as well
[20:28:04] <Valen> see if its going to be a viable project
[20:28:10] <Landon> well, it's not ;)
[20:32:10] <Landon> I'm a big fan of iterating on existing components/design until they need completely redone
[20:32:20] <Landon> with some sort of lofty goal to pursue
[22:50:50] <inflex> hey fol;ks
[22:50:56] * inflex is waiting eagerly for his PCBs to arrive
[22:53:56] * Valen is pondering making PCB's for his bookshelf
[22:54:10] <Valen> going to illuminate ~16 boxes
[22:54:18] <Valen> I'm thinking 3 or 4 RGB LED's in each
[22:54:32] <Valen> what you think a 1cmx20cm board would cost?
[22:54:36] <Valen> in qty 20
[23:00:56] <ziph> inflex: Fedex is claiming mine are on schedule when they left Guangzhou at 3:30 AM and the Fedex runs here generally start at 7-8:00 AM. :)
[23:02:06] <inflex> ziph: mine landed in Syd last night
[23:02:15] <inflex> ziph: they "usually" get here the next day
[23:02:24] <inflex> no biggie if not - because I don't have the LCDs any how
[23:02:37] <ziph> inflex: Yours are coming from GP?
[23:03:00] <inflex> ziph: yes
[23:03:16] <ziph> inflex: Do they go through Singapore?
[23:03:20] <inflex> yes
[23:04:23] <ziph> Luckily if mine hit the Perth airport in the morning I'll get them that day,
[23:04:56] <Valen> any ideas on price for my one?
[23:05:00] <Valen> or if its feasable
[23:05:06] <Valen> its a pretty high aspect ratio
[23:06:44] <inflex> Valen: ?
[23:06:58] <inflex> ooh, ermm, GP just charges by the 100 or 155in.sq
[23:06:59] <Valen> ~20 of 20-25cm x 1cm or so
[23:07:05] <inflex> $120 for 155in.sq
[23:08:11] <ziph> Annoyingly my board was exactly 480 sq cm and needed to go up to the next size to be panelised. :)
[23:08:22] <inflex> bummer.
[23:08:31] <ziph> inflex: Can you get re-orders without paying tooling from GP?
[23:08:38] <Valen> sucky
[23:08:42] <inflex> I have that with my LOM boards, they're 55x55mm.... so I have to use the 10x10cm itead option for proto'ing
[23:08:48] <inflex> ziph: not that I know of, no
[23:08:54] <Valen> what was that cheap proto place again?
[23:08:56] <inflex> ziph: I've always had to pay full price each time
[23:09:01] <inflex> Valen: iteadstudio
[23:09:01] <Valen> itead
[23:09:03] <ziph> Valen: Silver Circuits is good.
[23:09:04] <Valen> lol
[23:10:10] <Valen> $119 from silver circuits for 20
[23:11:18] <Valen> itead doesn't really seem quite right
[23:11:41] <Valen> http://iteadstudio.com/store/index.php?main_page=product_info&cPath=19_20&products_id=446 seems to be the cloest
[23:11:51] <ziph> You can wait a couple of months for the boards from itead.
[23:12:13] <Valen> ouch
[23:12:20] <inflex> most/all of mine have been 2~3wks
[23:12:22] <Valen> though i might have the bookcase done by then
[23:12:22] <ziph> Better to use laen's pcb service.
[23:12:31] <ziph> inflex: Lately they've been bad.
[23:12:38] <inflex> ziph: hrmm.. my last ones were about 2mths ago
[23:13:07] * CapnKernel doesn't like itead
[23:13:08] <Valen> mmm and laen does 4 layer too
[23:13:25] <CapnKernel> itead is run by an ex-employee of SeeedStudio
[23:13:42] <CapnKernel> that ex-employee stole stuff from Seeed, including the Seeed website.
[23:14:39] <Valen> laen works out at $3330
[23:14:45] <Valen> 330 rather
[23:15:08] <Valen> I should probably just mill it myself
[23:15:17] <inflex> CapnKernel: yep, but that's like everything
[23:15:32] <inflex> CapnKernel: to be honest, I thought it was just Seeed making another site to draw in more customers
[23:15:40] <Valen> cept in china you get away with it?
[23:15:56] <inflex> that said, I found Seeed turnaround/delivery times worse than ITead.
[23:16:02] <CapnKernel> No, I'm telling you what happened.
[23:16:19] <CapnKernel> May well be but doesn't change the fact that you're putting money into the pocket of a scumbag.
[23:16:26] <inflex> yes, and I said what I personally had thought, prior to you telling me ;)
[23:16:29] <CapnKernel> Why, next thing you know, you'll be telling me you shop at GoDaddy!
[23:16:33] <CapnKernel> :-)
[23:16:36] <inflex> CapnKernel: yeah, I do.
[23:16:56] * Valen wonders something. You know how you cant take more than X grams of lithium on a plane
[23:17:05] <Valen> what about electric planes
[23:17:18] <Valen> with a hundred+kg of Li batts in em ;->
[23:17:28] <CapnKernel> Valen: Take meaning carry, or take meaning consume as a pharmaceutical???
[23:17:38] <Valen> in battery form
[23:17:50] <ziph> GoDaddy is fantastic.
[23:18:04] <ziph> I love getting a bit of boob with my domain renewals.
[23:18:10] <inflex> *groan*
[23:18:12] <Valen> free boob?
[23:18:13] <CapnKernel> http://en.wikipedia.org/wiki/Lithium_%28medication%29
[23:18:20] <Valen> i know that
[23:18:42] <ziph> And to know that I'm funding a man who is nice enough to kill elephants threatening poor third world villages makes it even better.
[23:18:59] <Valen> but there are many long and arduous rules about taking batteries on aeroplanes
[23:19:07] <CapnKernel> Bob "GoDaddy" Parsons is a low-life redneck misogynist. Then there's the elephant thing.
[23:19:26] <ziph> Ahh, my kind of guy.
[23:19:36] <CapnKernel> I find it's easier to take the button cells. Don't get stuck on the way down.
[23:20:03] <ziph> Valen: What were your board dimensions?
[23:20:21] <Valen> thinking ~20cmx1cm
[23:20:31] <RikusW> inflex: solved your level conversion problem yet ?
[23:21:16] <ziph> Valen: Laen will be $108
[23:21:32] <inflex> RikusW: went with using a Tiny10 that'll modulate/encode the data across an AC coupled link
[23:21:34] <ziph> Valen: It's three boards at $5/inch
[23:21:37] <Valen> he said $5 per inch for 3 parts
[23:21:51] <ziph> That's $15 for 3 boards.
[23:22:07] <Valen> hmm i got an extra 0 somewhere
[23:22:14] <ziph> 7 of those to make up the 2 gives you $108.
[23:22:24] <ziph> Valen: But if you're paying $108 already, use Silver Circuits.
[23:22:37] <inflex> RikusW: the T10 is cheaper than either digital isolators or optocouplers
[23:22:41] <ziph> Valen: Drop the guy an e-mail, he's in the US/Canada and has exceptional English.
[23:22:52] <ziph> Valen: (The Silver Circuits guy, that is)
[23:22:55] <Valen> I think i'll just mill it, probably easier
[23:23:28] <Valen> need to conformal coat it anyway
[23:23:33] <RikusW> inflex: the t10 is about $1 usd at RS what do you pay for it ?
[23:23:44] <inflex> RikusW: about $0.58
[23:24:16] <RikusW> single or quatity ?
[23:24:36] <inflex> ermm... I think that was my 100 price
[23:24:43] <RikusW> ah
[23:25:08] <RikusW> I'm thinking of getting 2 to test TPI programming
[23:25:37] <Valen> why you need a level shifter inflex?
[23:26:09] <RikusW> inflex: what about the 2 transistor shifter I sent you ?
[23:27:04] <inflex> RikusW: obscenely complex considering I'm handling 3 lines
[23:27:08] <inflex> and space constraints
[23:27:32] <inflex> Valen: moving data between circuits with differing grounds (by about 30V)
[23:27:41] <Valen> yeah thats a fair bit ;->
[23:27:56] <Valen> not going to do that with a resistor divider lol
[23:28:23] <RikusW> inflex: 3 lines... well.... that will be a lot of transistors/resistors....
[23:29:55] <inflex> yep, but with the T10, I can just manage it all nicely with the one chip
[23:30:15] <RikusW> you have 3 coulomb counters ?
[23:33:38] <RikusW> I've done my pcb's at bosco.co.za they can reuse the masks when reordering. And they make prototypes in 24 hours. (up to 6 pcbs)
[23:33:44] <inflex> RikusW: no, there's 3 data lines per counter
[23:33:48] <inflex> INT, CLR and POL
[23:33:58] <RikusW> bidirectional too ?
[23:34:13] <inflex> no, all omni
[23:34:17] <inflex> ermmmm uni
[23:34:20] <inflex> *slaps own face*
[23:34:35] <inflex> INT and POL are outward, CLR is inward
[23:34:38] <RikusW> that simplifies things a bit.
[23:34:53] <inflex> well, still hard to beat 1 SOT23-6 chip + 1 cap
[23:35:15] <RikusW> nF pF ?
[23:36:02] <inflex> 1uF 0603, and remember, that handles all 3 lines
[23:36:34] <RikusW> won't 470nF or smaller work too ?
[23:37:00] <RikusW> 1uF 0603... thats small my 1uF is 1210...
[23:53:16] <RikusW> ppp