#avr | Logs for 2013-01-08

Back
[00:00:28] <Casper> does anyone here is used to recap boards?
[00:12:32] <r00t|home> Casper: try again, in english?
[00:13:10] <Casper> r00t|home: that mean the question wasn'T for you then
[00:19:00] <jadew> http://vplay.ro/watch/741sfz96
[01:34:34] <r00t|home> Casper: maybe you need a new keyboard...
[01:41:43] <theBear> Casper, yeah, i done more than a handful
[01:45:55] <sabesto> is it usual to use #if DEBUG to include or exclude debug code?
[01:46:45] <sabesto> i got some pins toggling for debug that i want to turn off easily, and this saves space aswell doesnt it?
[01:47:21] <theBear> it's not a silly idea, lets put it that way
[01:47:27] <RikusW> #ifdef DEBUG
[01:47:34] <theBear> err, yeah that :)
[01:47:43] <RikusW> #endif
[01:48:28] <sabesto> when will that be true? #define DEBUG 0 too?
[01:48:41] <RikusW> yes
[01:48:50] <RikusW> even for #define DEBUG
[01:48:55] <sabesto> ok, i will do that then
[01:50:00] <sabesto> thanks
[03:15:18] <Tom_itx> diametric, not sluggish like before?
[04:23:05] <giaour> Hi all. Question. Is there a cheaper way to drive a small(12V) 4-wire stepper than to get a stepper driver?
[04:23:35] <OndraSter> get a cheaper stepper driver :)
[04:23:51] <giaour> And by "stepper driver' I mean an almost $60 board at sparkfun. Haha
[04:24:18] <OndraSter> huh
[04:24:24] <OndraSter> the chips are $5 tops
[04:25:02] <giaour> Yeah, it doesn't make sense, especially since the details going into driving a motor, don't seem so hard...
[04:25:33] <giaour> 12V on each wire, switched with a TIP120 I bet. Then, the appropriate sequence of on/off for each of those wires should be used
[04:26:51] <giaour> hmm, okay, maybe my $60 board disappeared from sparkfun(thank god).
[04:30:31] <Timelord83> u can get a pulou stepstick from any reprap dealer for $10-$15 its a breakout board of the allergo stepper
[04:31:05] <Timelord83> http://www.ebay.com/itm/StepStick-A4988-Stepper-Driver-Module-Reprap-Prusa-Mendel-/280959816219?pt=LH_DefaultDomain_0&hash=item416a82921b
[04:31:22] <giaour> Thank you so much, Timelord83.
[04:31:31] <Timelord83> thats the QTF package it comes in SMD package aswell
[04:31:31] <giaour> I'll get me two at least.
[04:31:45] <giaour> I am using it with an (you guessed it) arduino
[04:31:51] <Timelord83> both need heatsinks if your stepper draws more than 1 amp
[04:32:08] <Timelord83> i figured gia
[04:32:31] <giaour> hmm, I doubt they'd need heatsinks, since I won't be going crazy fast with them, but there's a holding force with steppers anyway, so might as well be safe
[04:32:41] <Timelord83> if the stepper is active
[04:32:44] <Timelord83> and it uses more than 1 amp
[04:32:45] <Timelord83> u will
[04:32:48] <Timelord83> i promise
[04:33:00] <Timelord83> i have blown a few already
[04:33:47] <giaour> hahaha
[04:33:59] <giaour> okay, let me look for this with heatsinks.
[04:34:27] <giaour> God damn. And this has the allegro driver on it?
[04:37:42] <giaour> 35V. That's a lot.
[04:37:54] <giaour> Thanks a lot, Timelord83. I might even use this for much bigger motors.
[04:40:56] <Timelord83> i do
[04:41:01] <Timelord83> i have 1.8 amp
[04:41:11] <Timelord83> 70 oz-in holding nema 17's
[04:41:13] <Timelord83> they are fun
[04:42:07] <giaour> and cheap.
[04:42:17] <giaour> I have no idea how they can make it so expensive elsewhere
[04:43:34] <giaour> unless it makes me get laid faster(okay bad joke), I don't see why I should pay more than double the price.
[04:44:31] <Timelord83> thats assembled
[04:44:52] <Timelord83> i think if u buy ur parts in bulk and can manufacture ur own pcb u can put one together for alittle under $5
[04:44:54] <giaour> so, what am I facing here? A few minutes of soldering?
[04:45:06] <Timelord83> with the one i linked Giaour
[04:45:21] <Timelord83> its fully assembled with .100 pins on comming out the bottom
[04:45:31] <Timelord83> so u need to just breadboard it
[04:45:59] <giaour> peace of cake then :)
[04:46:16] <giaour> http://www.pololu.com/catalog/product/1182 this is where I'll get it. Just for reference
[04:46:59] <giaour> we could get 5 and drive our most insane projects in the future. but wait, how much current can this thing handle?
[04:47:04] <giaour> http://www.allegromicro.com/Products/Motor-Driver-And-Interface-ICs/Bipolar-Stepper-Motor-Drivers/A4988.aspx
[04:47:09] <giaour> doesn't say anything about current over there
[04:47:39] <Timelord83> 2 amps
[04:48:02] <Timelord83> an output drive capacity of up to 35 V and ±2 A.
[04:48:43] <giaour> oh. shit. sorry I missed that.
[04:48:54] <giaour> 2amps is decent for many motors I've seen so far
[04:49:11] <giaour> good stuff. *initiates "shut up and take my money" mode*
[04:49:45] <giaour> SUATMM |= (1 << BROKE_IE);
[04:53:17] <giaour> one little comment about those pins in the picture that come with the board
[04:53:33] <giaour> how the heck does one attach them without having a slight touch screw things up?
[04:53:53] <giaour> (I had a severe problem with so-called xbee-sheild because of this before. it was horrible to say the least)
[04:56:49] <Timelord83> they are 2.54mm pins they should be fine in a breadboard. should almost hard to remove
[05:08:59] <creep> giaour<< well i just saw flashlights priced $200+
[05:10:32] <creep> and the $500 one is worse than a $300 one haha
[05:10:46] <creep> the cheaper had a wireless charger
[05:14:25] <creep> giaour<< 4 wire steppers are a little more difficult to drive than 5-6 wires because you need a full bridge, but if you want the cheapest you can go with 3-5A DC and a simple NPfet hbridge driven with some logic ic, or atmel
[05:14:42] <creep> it will work, but slower than at 35v
[05:31:07] <creep> the cheapest <3A 4 wire driver can be done in about $5 + a microcontroller or a few cmos ics
[05:31:41] <creep> care should be taken to avoid cross conduction
[07:19:50] <OndraSter> damn, too bad you can't control the RESET pin function on the tinies/megas from software
[07:19:53] <OndraSter> just like JTAG...
[07:19:58] <OndraSter> although it makes sense :P
[07:55:19] <tzanger> if you just want to reset, set up the watchdog and don't pet it
[07:55:24] <tzanger> but if you want to drive the line... yeah
[08:15:04] <OndraSter> tzanger, I mean RSTDSBL fuse
[08:15:08] <OndraSter> so the RESET pin becomes GPIO
[08:15:20] <OndraSter> on xmegas you can do software reset of course :)
[08:36:09] <tzanger> I've not used that yet. RSTDSBL turns the reset pin into an input-only GPIO?
[08:59:40] <OndraSter> tzanger, no, into GPIO
[08:59:48] <OndraSter> but you cannot use it as RESET anymore
[08:59:54] <OndraSter> thus you cannot re-programm the chip without applying high voltage
[09:00:11] <tzanger> oh I am misunderstanding
[09:00:14] <tzanger> ok
[09:07:53] <OndraSter> ffs which idiot thought it would be nice to have 15% VAT for food and the essentials and 21% for EVERYTHING ELSE?
[09:08:00] <OndraSter> the government keeps about 60% of all the money you have
[09:08:10] <OndraSter> unlike other countries, where it is closer to 30% tops
[09:08:18] <OndraSter> and you have to pay everything
[09:08:27] <OndraSter> gas to cars costs 3 times more than in the US, too
[09:08:29] <OndraSter> here
[09:08:50] <OndraSter> average salary is supposedly 24000 CZK or thereabouts - just below 1000 eur
[09:09:18] <OndraSter> but 1 liter of petrol costs 1.5€
[09:09:26] <OndraSter> ridiculous
[09:10:21] <OndraSter> US: 2.47 eur per gallon
[09:10:41] <OndraSter> that is 0.65€ per liter of petrol in the US
[09:11:44] <OndraSter> note that average salary != actual salary
[09:11:52] <OndraSter> I don't know much people who get >700 eur/month
[09:25:39] <tzanger> gas is heavily subsidized in north america
[09:25:57] <tzanger> there's a saying "In America, 100 years is old. In Europe, 100 km is far"
[09:26:14] <OndraSter> hehe
[09:26:19] <OndraSter> yes, 100km is very far
[09:26:32] <OndraSter> the govt asks for +100% or so I am guessing on the petrol
[09:26:37] <OndraSter> (ok, in reality probably something like 50%)
[09:28:42] <RikusW> taxes are bad enough here too, especially for the higher income group
[09:29:09] <RikusW> 14%VAT and up to 40% income tax
[09:29:16] <OndraSter> only 40%? :)
[09:29:28] <OndraSter> yeah from new year's there is now "solidarity tax" -- another 7% for 1M CZK+ I think
[09:29:41] <RikusW> and about 1Euro / L petrol, but about half of that is taxes too
[09:30:02] <RikusW> and then there is hidden taxes...
[09:30:28] <RikusW> income tax at 40% combined with VAT is like 50%
[09:30:47] <OndraSter> all the income taxes together here add upto 60% I think
[09:30:51] <RikusW> the first 3500E income is tax free here
[09:31:06] <RikusW> maybe its 4k now
[09:31:46] <OndraSter> per year?
[09:31:57] <OndraSter> here it is 4k eur I think
[09:31:59] <OndraSter> per year
[09:32:04] <OndraSter> or maybe 8k? Not sure right now
[09:32:07] <OndraSter> but then you pay A LTO
[09:32:09] <OndraSter> LOT*
[09:32:16] <RikusW> per year
[09:34:11] <OndraSter> damnit, I should have been learning math logic crap all day long
[09:34:18] <OndraSter> but instead I have been procrastinating
[09:34:51] <RikusW> irc ing ?
[09:35:39] <OndraSter> that too
[09:35:57] <OndraSter> I have revised my mini dice board
[09:35:57] <OndraSter> http://clip2net.com/s/2GBdr
[09:36:02] <OndraSter> and I will be doing it as a kit
[09:36:05] <OndraSter> with preprogrammed MCU
[09:38:18] <OndraSter> CR2032 from the bottom..
[09:38:24] <OndraSter> resistors and caps from the bottom, too
[09:38:29] <OndraSter> on the top only MCU, button and 7 LEDs
[09:38:59] <RikusW> seems you like copper, you remove the minimum ;)
[09:39:30] <RikusW> gtg
[09:39:32] <OndraSter> yep
[09:39:39] <OndraSter> coppah!
[09:39:40] <OndraSter> <3
[09:39:43] <OndraSter> maybe ENIG
[09:43:05] <tzanger> win 19
[09:43:06] <tzanger> er
[10:38:12] <soul-d> always weird when you leave project alone for a day it magicaly does more then before in case of init an glcd
[10:44:21] <OndraSter> hehe
[10:44:42] <OndraSter> I more often leave projects and the next day they are 2 steps behind the previous day from what I left them at
[11:52:35] <mitsakos> hello there, i have developed an RTC using asynchronous timer2 on Atmega168 and i also use power save mode in order to save as much power as possible. To prevent the device get stuck from possible bugs i also use the watchdog.
[11:53:54] <mitsakos> everything works fine on normal mode. when the mcu goes to power save mode about after 40 minutes the watchdog makes a reset
[11:55:56] <mitsakos> when the mcu is in power save mode and an interrupt wake's it up the mcu runs the interrupt routine right? and after it finish the ISR it returns on the next instruction from the one that put it in power save mode
[11:55:58] <mitsakos> right?
[12:02:39] <specing> yes
[12:03:31] <mitsakos> i can't find what is going wrong when it goes in power save mode. This problem occures only in that state. In normal mode everything works fine
[12:04:03] <specing> mitsakos: it is likely you don't clear the rtc
[12:04:08] <specing> err watchdog
[12:04:16] <OndraSter> yep
[12:04:31] <mitsakos> Well i use timer2 in asynchronous mode with 32.768 and 128 prescaller so an interrupt occures every second which updates the RTC
[12:04:49] <mitsakos> when the mcu is in power save mode this interrupt wakes it up every second
[12:04:56] <specing> Why not just turn off the wdt?
[12:05:03] <mitsakos> if i clear the watchdog in this interrupt
[12:05:16] <mitsakos> it is sure that the watchdog is cleared once per second
[12:05:29] <mitsakos> i have configured the watchdog for 2 seconds
[12:06:01] <mitsakos> correct?
[12:06:39] <mitsakos> so it is supposed to be working
[12:07:18] <specing> Why are you using the wdt anyway?
[12:07:34] <mitsakos> to be sure that the device will never stuck at any state
[12:07:40] <specing> since you clear it in the rtc interrupt
[12:07:54] <specing> the main code could be totaly canuck'd
[12:08:01] <specing> and the interrupt would still be clearing it
[12:08:08] <specing> pointless.
[12:08:39] <mitsakos> well i just put the wdt clear in the RTC interrupt in order to be sure that it is clear at least one per second
[12:08:59] <mitsakos> and still the wdt is reseting
[12:11:27] <mitsakos> can anything else occure a wdt reset?
[13:36:44] <iSaleK> I wan't to make a stabilized +/-3.3,5,12V from PC power supply unit. Any suggestions since I'll beging making it in a few hours :)
[13:52:00] <GuShH> iSaleK: for what purpose?
[13:59:48] * GuShH wonders if iSaleK is already dead from mains
[14:02:57] <specing> probably
[14:03:17] <specing> those 12V can kill you
[14:03:46] <specing> especially if that is the difference between the 232V line and a 220V one :)
[14:05:16] <GuShH> Don't worry though, he'll come back as a zombie... "Maaaaains!..."
[14:07:44] <Honeyclaw> iSaleK: doesn't an ATX PSU already have regulated power at all those voltages? I believe you can just tie the green wire to ground (normally done on the motherboard), and the PSU will fire up whenever it's switched on.
[14:08:45] <Honeyclaw> I think sparkfun sells a breakout board for the ATX connector, but I just cut the wires and attached banana plugs -> breadboard
[14:09:58] <iSaleK> Honeyclaw: specing Lol, I'm not using it from mains
[14:10:13] <iSaleK> I'm going to use power unit from PC that has about 300w power
[14:10:37] <iSaleK> and use those 3.3V, 5V and 12V
[14:11:36] <iSaleK> I'm also going to cut the cables and make them into female jacks, so I can simply connect them with male jack and use with breadboard :)
[14:14:37] <Honeyclaw> iSaleK: I guess it wasn't clear what you wanted tips regarding
[14:19:33] <GuShH> Honeyclaw: without a load that psu won't regulate properly at all...
[14:21:47] <kulminaator123> hi
[14:21:47] <tobbor> Hello kulminaator123
[14:22:09] <OndraSter> GuShH, smart PSUs will turn off in 5 seconds :)
[14:22:16] <kulminaator123> quick troubleshooting ... i had a huge cap connected to my circuitry when i tried to access it with avr dragon ...
[14:22:30] <OndraSter> hmm kulminaator123 ?
[14:22:35] <kulminaator123> and now the atmega328 makes no communication anymore :^)
[14:22:46] <kulminaator123> another identical chip works with the same dragon though
[14:22:57] <OndraSter> what cap? where?
[14:23:08] <GuShH> OndraSter: meh
[14:23:09] <kulminaator123> cap on the vcc-gnd pins
[14:23:17] <OndraSter> that should not make any problem
[14:23:17] <OndraSter> s
[14:23:28] <kulminaator123> well it was a 3300uF one ...
[14:23:42] <OndraSter> so?
[14:23:49] <kulminaator123> so the dragon didn't really fancy it ... probably exceeded it's power ratings when it was charging up
[14:23:58] <GuShH> that would current-limit most power supplies for a short period of time... so short you wouldn't notice it, being a mere mortal.
[14:23:59] <OndraSter> you powered it from the 5V out on dragon?
[14:24:10] <OndraSter> also why the hell should it damage the chip?
[14:24:16] <kulminaator123> no idea
[14:24:24] <kulminaator123> i'm more worried that it did a brownout on it
[14:24:32] <kulminaator123> and now the fuses are in some weird state
[14:24:32] <GuShH> maybe his electrolytic was the wrong way around
[14:24:52] <OndraSter> 5V on elyte won't kill it
[14:25:00] <OndraSter> I tried 12V for few minutes - it did not kill it :)
[14:25:03] <OndraSter> 12V reversed of course
[14:25:04] <kulminaator123> wrong way around ... tall pin into the + and short into the gnd ....
[14:25:07] <OndraSter> 32V did the trick and it blew!
[14:25:27] <GuShH> kulminaator123: what happens if I cut all your component leads to equal sizes, you'll be lost forever?
[14:25:40] <kulminaator123> is it worth investing the time into making myself the hv programming cable now ? :^)
[14:25:50] <GuShH> that's not how polarity is identified in components.
[14:26:14] <OndraSter> I dare you to check the length of wires on SMD elytes :D
[14:26:16] <OndraSter> or SMD LEDs
[14:26:44] <kulminaator123> well it wasn't an smd led now was it ^_^
[14:27:47] <kulminaator123> the negatively marked terminal was connnected to ground, happy now ?
[14:27:53] <GuShH> lol
[14:28:24] <dunz0r> Before I dive to deep in to the datasheets etc... I can make the ADC on an Atmega328 "auto-trigger" when it's done right?
[14:28:25] <GuShH> kulminaator123: just like a very-big-cap would, if you had the polarity reversed it would've pulled the power rail down, that's all
[14:28:27] <dunz0r> Like the ISR storing values in global variables or something.
[14:29:13] <OndraSter> huhu dunz0r ?
[14:29:40] <dunz0r> OndraSter: I've only seen people use timers or compare matches etc for triggering the ADC-conversion
[14:29:51] <kulminaator123> well anyway, the dragon is still operational ... and i can progam another atmega328 with it ...
[14:29:54] <OndraSter> well what do you want then dunz0r ?
[14:29:58] <OndraSter> it can be running in free-running mode
[14:30:20] <dunz0r> OndraSter: Ah. That's what I want I think :)
[14:30:53] * dunz0r dives deep in to the datasheet
[14:31:15] <kulminaator123> wondering now, is it worth the time to make the high voltage programming cable and try to rescue the first from it's awkward death like state ?
[14:31:28] <dunz0r> Hmm... I can make it change channels too, right?
[14:32:03] <OndraSter> dunz0r, on mega? Not sure, I think you can't
[14:32:07] <OndraSter> on xmega you can
[14:32:09] <iSaleK> So you think PSU will turn off if there is no load?
[14:32:18] <OndraSter> on xmega you can be sampling two sources nearly at once (off by one cycle)
[14:32:24] <iSaleK> What about if I short PS_ON and GND
[14:32:24] <OndraSter> iSaleK, better ones do
[14:32:39] <OndraSter> better ones, when powered on, shut down with not sufficient load
[14:32:40] <dunz0r> if(adCount<(NR_AD_CHANEL-1)) { adCount++;} else adCount = 0;} :)
[14:32:42] <iSaleK> Well, this one is really cheap :)
[14:32:50] <OndraSter> yeah hands away from those iSaleK
[14:33:01] <OndraSter> I am buying older Fortron 350s
[14:33:07] <OndraSter> they are very high quality
[14:33:10] <OndraSter> and cheap!
[14:33:22] <OndraSter> if anybody brings their PC that their PSU blew I get these ones for <$10 delivered
[14:33:25] <dunz0r> Then: ADMUX = (ADMUX & 0b11111000) | adCount;
[14:33:31] <dunz0r> Should work... right?:)
[14:33:39] <OndraSter> dunz0r, you cannot change the channel during conversion or something, check datasheet
[14:33:43] <iSaleK> Well this one I got for free from old pc :)
[14:33:48] <iSaleK> I guess it will work
[14:34:04] <iSaleK> And I will use no more than 1A max so it should work fine :)
[14:34:06] <dunz0r> OndraSter: That will be done in the ADC_vect ISR, so it triggers when the conversion is done.
[14:34:13] <OndraSter> iSaleK, yeah I had one from old PC too. Then I didn't put enough load on 12V rail/loaded +5VSB with 1.5A (rated 2A) and it blew up
[14:34:30] <OndraSter> dunz0r, make sure that the next conversion does not start before you set it
[14:34:40] <OndraSter> iSaleK, just connect some old spare HDD to it
[14:35:11] <iSaleK> OndraSter: Can I simulate HDD load with something else?
[14:36:16] <iSaleK> And should I add diodes to the + and - rails to protect them from reverse polarity or is it obsolete?
[14:37:17] <dunz0r> Something like this is my plan: http://sprunge.us/KECj
[14:38:15] <OndraSter> iSaleK, resistors
[14:38:21] <OndraSter> reverse polarity?
[14:38:56] <OndraSter> dunz0r, try it
[14:39:06] <dunz0r> Yep. Going to now :)
[14:40:31] <iSaleK> OndraSter: never mind reverse polarity, my bad :D
[14:41:10] <iSaleK> So I should create resistor load on 12V rail that is as close to the rated one? :)
[14:42:08] <OndraSter> who was the person here (or somewhere else?) who was playing with receiving raw GPS data..?
[14:42:19] <OndraSter> iSaleK, rated one? Just load it with 10W on all the rails
[14:44:48] <GuShH> no need for that, as long as you load the primary rail
[14:45:23] <OndraSter> loading all = better safe than sorry
[14:45:57] <iSaleK> ok, thanks for the advices
[14:50:34] <kulminaator123> GuShH: as you seem to be the know-it-all ... i had nothing else connected to the chip at the time (just the programmer and the big cap on the power) ... can it be that the voltage just dropped low and corrupted the fuses ?
[14:50:52] <GuShH> kulminaator123: just for that I won't answer!
[14:51:21] <kulminaator123> too bad
[15:20:05] <kulminaator123> GuShH: if it makes you feel any better, you can tell the next guy that comes along with such awesome ideas to double check his reset cable ... both chips behave ok now
[16:03:14] <diametric> so, I'm really not sure I understand how I can store and reference the port registers in variables.
[16:06:35] <tzanger> diametric: what do you mean?
[16:07:12] <diametric> say I want to store PORTC into a variable, and then set bits in it, I can't see to make that happen
[16:07:42] <diametric> or more aptly, I want to store an array where I can define which port X device is connected to, and reference a that to a second array for which bit the device is on
[16:07:54] <diametric> and then of course affect those ports
[16:07:58] <tzanger> am I missing something obvious? myvar = PORTC; myvar |= (1 << 4); ?
[16:08:17] <tzanger> hm
[16:08:18] <diametric> yeah, that does not seem to work
[16:08:22] <tzanger> I just use something like this
[16:08:26] <tzanger> well exactly like this:
[16:08:33] <tzanger> (pastebinning, moment)
[16:10:17] <OndraSter> diametric, you are doing something wrong
[16:10:43] <tzanger> http://pastebin.com/RPnMC83M
[16:10:43] <diametric> well clearly.
[16:10:53] <tzanger> that's a very basic example, but should get you going
[16:11:12] <diametric> thats just a series of defines, and I can't iterate over precompiler definitions :(
[16:11:48] <tzanger> I understand that, I'm showing you an alternate form of organization which might work better for you
[16:11:52] <diametric> heres an example, I have 10 servos, the servos are plugged into these ports, with this port mask. Then later I want to iterate over those ports in an ISR to update the duty cycle for the PWM waveform.
[16:12:14] <tzanger> sure, if you want to do everything neat and tidy you'll ahve to do some preprocessor magic
[16:12:17] <diametric> tzanger: no I appreciate it, thanks =) some of those macros are just handy anyway
[16:12:18] <tzanger> I do that for error conditions
[16:12:47] <tzanger> I like the fact that you're looking for a clean way to do it rather than just assuming that all servos are on two ports and so on
[16:12:52] <diametric> yeah
[16:13:15] <tzanger> the fact of the matter is that you may end up creating those arrays at runtime if you don't want to (ab)use the preprocessor
[16:13:34] <tzanger> I had to do it similarly
[16:13:59] <tzanger> I wrote a routine that reads the pin status of (some of) my digital outputs and compares them to what I think they should be
[16:14:16] <tzanger> I'll pastebin that, I'm not happy with the double-macros but it was what I had to do
[16:15:36] <tzanger> http://pastebin.com/usB8wmVm
[16:16:09] <tzanger> I forgot to include the enum for the relays but you can figure out what it is easily enough. the enum does not map to bits at all, it just provides a convenient way of saying which output I want to touch
[16:16:45] <tzanger> the bit in the middle is what I'm referring to for the ugly way of keeping things organized (lines 16-25)
[16:18:04] <tzanger> it's funny, today must be a "do shit organized" day, I just spent a bit of time trying to get a csv-to-sqlite importer to stay reasonably organized if the table format changes
[16:19:09] <tzanger> ZOMG I won the google lottery
[16:19:24] <OndraSter> google runs lottery now?
[16:19:50] <tzanger> that's what the scammers want you to believe
[16:24:11] <diametric> figured it out.
[16:24:31] <tzanger> diametric: what'd you end up doing?
[16:24:43] <tzanger> two tables, seeded with macro expansion abuse? :-)
[16:24:44] <diametric> volatile uint8_t *reg = (volatile uint8_t *)(&PORTC)
[16:24:50] <diametric> then I can simply *reg |= mask
[16:24:58] <diametric> now I can just shove those into arrays
[16:25:00] <diametric> and be on my way
[16:26:02] <tzanger> volatile uint8_t *ports[6] = { &PORTA, &PORTB, &PORTC, &PORTD, &PORTE, &PORTF };
[16:26:03] <tzanger> ?
[16:26:58] <diametric> yep
[16:27:17] <tzanger> hm, I wouldn't have done it that way
[16:27:31] <diametric> then another for modes, and another albeit non-volatile one full of bitmasks
[16:27:32] <tzanger> since now you're assuming servo 0-7 is in bit-order on a given port
[16:28:01] <diametric> well i implemented it a bit different, one set pastebin
[16:28:49] <diametric> http://pastebin.com/uhNcXWQY
[16:29:18] <tzanger> ahh yes, there you go
[16:29:19] <diametric> so now I can easily put a servo on any port/pin
[16:29:43] <tzanger> I still think macro abuse would be cleaner but that's just semantics. you've got something that works
[16:29:55] <diametric> =) thanks for the help
[16:30:10] <tzanger> np
[16:37:51] <diametric> http://i.imgur.com/r4U4g.jpg - in case you're curious what I'm making with servos =)
[16:38:11] <diametric> little quadruped
[16:55:18] <OndraSter> quadruped? :D
[19:14:24] <tzanger> diametric: your power adapter on the left is interesting
[19:14:44] <tzanger> and it looks like a tripod, not a quadropod
[19:14:49] <diametric> theres 4 legs
[19:14:50] <diametric> =)
[19:14:56] <diametric> its a little terminal block to female 2.1mm DC jack
[19:14:58] <diametric> its nice
[19:15:08] <tzanger> yeah, I haven't seen something like that before
[19:15:45] <diametric> hang around for a few minutes i'll post a video of this little guy
[19:22:52] <diametric> http://www.youtube.com/watch?v=3tqFJ9UT7wc
[19:26:02] <tzanger> nice. what's with the "come hither" leg movement? :-)
[19:26:34] <diametric> haha
[19:27:04] <diametric> my wires are atrocious i need to recrimp them shorter
[19:28:22] <tzanger> my stuff's not nearly as cool
[19:29:11] <tzanger> https://twitter.com/i/#!/akohlsmith/media/slideshow?url=pic.twitter.com%2F1Zr76SHC
[19:29:26] <tzanger> https://twitter.com/i/#!/akohlsmith/media/slideshow?url=pic.twitter.com%2FweL1NKUu
[19:29:57] <diametric> what kind of prototyping system/kit/board is that?
[19:30:18] <jadew> is that robot giving us the finger?
[19:30:26] <tzanger> https://twitter.com/i/#!/akohlsmith/media/slideshow?url=pic.twitter.com%2Fm2DRYL0E
[19:30:30] <tzanger> which
[19:30:40] <jadew> the one that looks like a spider
[19:30:48] <tzanger> no diametric's comment
[19:31:04] <diametric> jadew: I clearly said he's waving! haha
[19:31:11] <jadew> :)
[19:31:19] <diametric> tzanger: all of the above
[19:31:26] <jadew> tzanger, are you controlling house appliances with that?
[19:31:28] <tzanger> there's only one prototype there
[19:31:54] <diametric> the avr can?
[19:32:03] <tzanger> the first is my shop controller (security, theromstat), second is an industrial logger prototype and third is a piledriver controller
[19:32:08] <diametric> ohhh okay
[19:32:09] <tzanger> diametric: oh that, that's an olimex avr-can
[19:33:08] <diametric> crap I better get home before my wife kills me
[19:33:12] <tzanger> the most recent pic (one before the first I posted) is part of my workbench at the shop with it controlling the thermostat and one of the prox readers
[19:33:13] <diametric> I lost track of time playing with my robot at work haha
[19:33:17] <tzanger> haha
[22:45:17] <diametric> hi hi
[22:46:13] <rlc> you are still alive
[22:46:35] <rlc> lucky bastard
[23:00:48] <Casper> rlc: lucky... that can still be debatable I guess?
[23:03:10] <rlc> Casper: now he can play with wife, not robots. Isn't that lucky?
[23:03:39] <Casper> quite unlucky
[23:03:50] <Casper> the wife will cost him loooots of money
[23:03:59] <Casper> and will always complain
[23:04:11] <Casper> a robot would be cheaper, and do not complain
[23:04:12] <rlc> lol, he make too much money from robots anyway!
[23:04:49] <Casper> I wonder when the parts will be delivered...
[23:05:03] <Casper> before I leave for work or while I'm at work...
[23:05:24] <rlc> they usually come in the morning
[23:05:38] <rlc> around 10-11 am
[23:06:20] <rlc> but it really depends how close you are from the distribution center
[23:07:01] <Casper> my boss hate fedex, because they have a tendency to deliver when the store is closed (this is for home)
[23:07:10] <Casper> and then say: "come pick up the package"
[23:07:30] <Lt_Lemming> does the store keep unusual hours or something?
[23:07:47] <Casper> and where it is? where it take 3 hours to go there and back...
[23:07:53] <Casper> Lt_Lemming: more or less
[23:08:40] <Casper> once they came at 7am... and we explicitelly took the 12-5 service, leaving a note "not open before 10am"... they don't care about the delivery time we select and the note
[23:08:52] <Lt_Lemming> heh
[23:09:13] <Casper> called them, they said that the driver should have followed the delivery time, but nothing they can do
[23:09:14] <Lt_Lemming> one advantage of working from home I suppose
[23:09:22] <Lt_Lemming> I rarely miss a delivery
[23:10:11] <Casper> they also delivered a package that an hold was put on it, to the neighbour...
[23:10:16] <Casper> which tought it was for them
[23:10:19] <Casper> and opened it up
[23:10:22] <Lt_Lemming> wow...
[23:10:26] <Casper> making us lose 600$
[23:10:46] <Lt_Lemming> I would've claimed that from them, they fucked up they should pay
[23:10:50] <Casper> father had ordered some stuff on ebay, while the package was in transit we found out it was a scam
[23:11:10] <Casper> contacted them, put an hold on it, so they return it...
[23:11:46] <Casper> not only did they didn't obeyed the hold, they also delivered it to the neighbour, without telling them it was for us
[23:12:13] <Lt_Lemming> one nice thing here in australia is we have pretty good consumer protection, if a company fucks up and costs you money it's pretty easy to get them in a lot of shit if they won't cover it
[23:12:30] <Lt_Lemming> i.e. they can end up paying huge fines if they don't sort it our in a reasonable timeframe
[23:12:40] <Casper> 2 words: ebay/paypal
[23:12:58] <Lt_Lemming> you can even get them in shti
[23:13:09] <Lt_Lemming> ebay has an australian presense, as do paypal
[23:13:25] <Lt_Lemming> and in this case it sounds like the courier company were at fault
[23:13:26] <Casper> paypal refused do shit, because the funds came from a bank account, not a credit card or paypal
[23:13:34] <Casper> ebay said to contact paypal
[23:13:45] <Casper> paypal then redirected to the bank
[23:13:59] <Casper> which said that they ain't responsable and contact paypal fraud protection
[23:14:06] <Lt_Lemming> yeah, here paypal are registered as a financial industry, so they have to answer to the banking industry ombudsman
[23:14:13] <Lt_Lemming> institude not industry
[23:14:30] <Casper> here's the thing: paypal can not be held responsable for the users...
[23:14:55] <Lt_Lemming> beside the point, the courier company are the ones who really fucked up
[23:15:04] <Casper> they did their job: move the money
[23:15:10] <Lt_Lemming> so they should be the ones you went after
[23:15:25] <Casper> Lt_Lemming: there was no insurance on the package
[23:15:30] <Casper> the shipper didn't took some
[23:15:45] <Casper> what father ordered: the latest intel processor at that time
[23:15:56] <Lt_Lemming> doesn't matter, if you put a hold in it and they didn't obey it, then they are liable
[23:16:43] <Casper> what he got: about 50 used cpu in the P4, early P4 and equivalent in amd, tossed in, with zero pin protection so not even usable, probably all fried
[23:16:51] <Casper> they ain't liable for the hold
[23:17:25] <Casper> their answer to that is: it was too late for it, it passed the last control point
[23:17:33] <Lt_Lemming> even then, they shouldn't have delivered it to your neighbour
[23:17:42] <Casper> then it's up to the driver to see the note, if he see it somewhere
[23:18:11] <Casper> fedex TOS say that they may deliver to the neighbour unless explicitelly stated
[23:18:24] <Lt_Lemming> WTF >_<
[23:18:27] <Casper> yup
[23:18:31] <Lt_Lemming> show me where it says that?
[23:18:43] <Lt_Lemming> that would break sooo many privacy laws here
[23:20:14] <rlc> Casper: your father ordered a new intel p and got 50 used p instead?
[23:20:34] <Casper> rlc: at that time it was a 6 core core2
[23:20:48] <Casper> you know, the extreme one, that was near 1500$...
[23:21:54] <rlc> Casper: where were the seller located?
[23:21:59] <Casper> in the usa
[23:22:16] <rlc> Casper: with good reputation?
[23:22:35] <Casper> 3 sales, but then mysteriously had a few high end brand new cpu... I told him it looked fishy... and if he do, pay with his credit card...
[23:22:46] <Casper> ... he paid with a bank transfert via paypal...
[23:22:50] <Casper> zero protection
[23:22:52] <Lt_Lemming> err, afaik there are no Core 2 Extreme hex cores
[23:23:04] <Lt_Lemming> the first hex core intel cpu was an i7
[23:23:15] <Casper> there was one
[23:23:28] <Lt_Lemming> I call bs, prove it
[23:23:43] <rlc> how did you figure it was a scam midway?
[23:24:11] <Casper> rlc: since the seller is in the USA and us in canada, it took time for the package to come
[23:24:19] <Casper> he sold many, including in the usa
[23:24:29] <Casper> so the feedback started to come as scam
[23:24:35] <rlc> ah
[23:24:39] <Lt_Lemming> Casper, there are NO hex core in the Core 2 range
[23:24:42] <Lt_Lemming> none, not one
[23:25:34] <Lt_Lemming> it was one of the reasons intel moved to the new core, to support more cores per cpu
[23:25:37] <rlc> so he made a few thousand grands out of nothing. nice
[23:26:12] <Casper> I'm sure they made some 6...
[23:26:26] <Lt_Lemming> there are core 2's with 6MB of cache, no Hexacores though
[23:27:06] <Lt_Lemming> "The Core i7 name was introduced with the Bloomfield Quad-core processor in late 2008.[34][35][36][37] In 2009 new Core i7 models based on the Lynnfield desktop quad-core processor and the Clarksfield quad-core mobile were added,[38] and models based on the Arrandale dual-core mobile processor were added in January 2010. The first six-core processor in the Core lineup is the Gulftown, which was
[23:27:06] <Lt_Lemming> launched on March 16, 2010."
[23:27:46] <Casper> or maybe they only announced it....
[23:28:01] <Casper> well, anyway, it was a core2 extreme edition
[23:28:11] <Casper> the latest, highest performance one...
[23:28:28] <Casper> whatever if it was a quad or hex...
[23:30:11] <rlc> and your dad just fell for it!
[23:30:56] <rlc> (the most amazing he ever encountered in his life)
[23:31:03] <rlc> *deal
[23:32:08] <Casper> he's a deal idiot
[23:32:18] <Casper> he always find some wonderfull deals
[23:32:22] <Casper> and never work well
[23:32:36] <Casper> but anyway, if fedex wouln't have messed up, it would have been fine
[23:32:55] <Casper> he almost decided to take them to court
[23:33:05] <Casper> but decided that it wasn'T worth it
[23:33:47] <Casper> Jan 8, 2013 11:11 PM Left FedEx origin facility GRAND FORKS, ND
[23:33:49] <Casper> yay
[23:34:46] <rlc> did you order lots?
[23:36:14] <Casper> not alot, 3 caps values and some cellcoins
[23:36:22] <Casper> but I have a monitor to repair
[23:36:33] <Casper> which is in piece
[23:37:36] <rlc> first time you order from digikey?
[23:37:46] <Casper> nope
[23:38:19] <Casper> once I ordered at 7:30pm, the door rang at 7:30am
[23:38:42] <rlc> the caps, can't you get them at local store?
[23:38:56] <Casper> the package crossed the border and 3 provinces... in 12 hours!
[23:38:58] <Casper> no
[23:39:12] <Casper> the nearest local store only have expired caps...
[23:39:20] <Casper> (as in 20 years old one)
[23:39:34] <Casper> the other one don't have low ESR one
[23:39:45] <Casper> then they complain that people don't buy there anymore
[23:44:10] <Casper> I should have enought parts to recap a few monitors now :D
[23:45:10] <rlc> lcd?
[23:45:59] <Casper> ya
[23:46:05] <Casper> 20" LG
[23:46:10] <rlc> how much are you selling them?
[23:46:13] <Casper> with failed caps in the psu
[23:46:21] <Casper> this one is for bro
[23:46:27] <rlc> ah
[23:46:29] <Casper> he need a second monitor for his job
[23:47:24] <Casper> but there is a second monitor at work that I might recap
[23:47:30] <Casper> and possibly 3-4 others
[23:47:43] <Casper> their official fate is recycling