#avr | Logs for 2011-12-03

Back
[00:04:16] <Casper> still, 66% is great
[00:04:26] <Casper> I was aiming 70%
[00:05:51] <rue_house> pushpull is an easier core to make
[00:06:07] <rue_house> I always do buck or pushpull
[00:06:16] <rue_house> you can make pushpull autotransform
[00:06:25] <rue_house> good for boosting
[00:06:33] <rue_house> !assist circuits
[00:06:34] <tobbor> Possibly http://eds.dyndns.org/~ircjunk/circuits
[00:07:17] <Casper> I have no access to any good pnp or p-chan, unless I make a digikey order... which shipping fee would be killing for "one" part
[00:08:11] <Casper> so I tried forward, then flyback, then pushpull, went back to flyback... and once I found out that the core was shitty... I used a good one and bingo!
[00:08:26] <Casper> rue_house: how do you figure out how many turns to do on the transfo?%
[00:10:44] <rue_house> http://eds.dyndns.org/~ircjunk/tutorials/elex/smps/6vto24v.jpg
[00:10:59] <rue_house> I work out the saturation flux density and try to not go over half
[00:12:20] <Casper> I'll drop you a note tomorrow
[00:12:25] <Casper> I need to go to sleep...
[00:12:28] <Casper> ... 1 hour ago...
[04:05:19] <ys0> oi
[04:33:13] <DanFrederiksen> in free running ADC (atmega) there is no way to ask when it was sampled?
[04:33:45] <DanFrederiksen> just sometime within the last 22 cycles
[04:34:19] <DanFrederiksen> (depending on prescaler)
[04:45:29] <DanFrederiksen> you guys are no help whatsoever :)
[04:55:53] <karlp> oh shush.
[04:56:08] <soul-d> isn't there a conversion complete
[04:56:10] <soul-d> thingy ?
[04:56:16] <karlp> I'd say, without any basis in fact, that there would be no way to know ehwn it was sampled
[04:56:20] <karlp> it's free running!
[04:56:21] <karlp> that's the point!
[04:56:46] <keenerd> Isn't there an interrupt that fires when it finishes, even while free running?
[04:58:40] <soul-d> http://atmel.com/dyn/resources/prod_documents/doc8352.pdf
[04:58:45] <soul-d> page 8
[04:59:57] <soul-d> Optionally wait for the Interrupt Flag bit in the ADCSRA register to be set,
[04:59:57] <soul-d> indicating that a new conversion is finished
[05:11:36] <DanFrederiksen> karlp, I was kidding
[05:11:55] <Steffanx> Sure?
[05:12:00] <DanFrederiksen> that's what the smiley means..
[05:13:02] <Steffanx> Always double check :)
[05:13:20] <DanFrederiksen> thanks soul-d
[05:13:32] <keenerd> Steffanx: Now I am confused :-(
[05:13:46] <Steffanx> Why mr keenerd ?
[05:14:03] <keenerd> Aw, nvm.
[05:14:24] <Steffanx> Sorry, me shuts up
[05:17:38] <soul-d> np, anyone knows a good read on stage in front of the adc ? im completey analog noob :( preferably a explaination oscilscope type of setup or how scope stage is made does question make sense this early ? :P
[05:19:36] <soul-d> maybe basic oscilloscope type of project
[05:20:44] <keenerd> There is a blog for everything: http://scope-probe-schematic.blogspot.com/
[05:21:41] <soul-d> i meant stage between adc and probe though although that is probably good read to
[05:21:52] <soul-d> probably somthing with opamps
[05:25:06] <keenerd> Maybe http://www.epanorama.net/sff/Test_equipment/Misc/Oscilloscope_Deflection_Amplifier.pdf ?
[05:25:29] <keenerd> Erm, no wait. That is for plate voltages.
[05:29:57] <soul-d> http://www.sparkfun.com/products/9484
[05:30:05] <soul-d> ill think ill browse the datasheets :)
[05:33:35] <inflex> heh, look at all the bad comments - and that people, is why I would never release a kit project
[05:34:30] <inflex> Love it when people who are likely utterly incapable of correctly assembling them try... and then bitch when it doesn't work
[05:35:15] <ziph> Aren't all your products basically kits? :)
[05:35:34] <inflex> pfft... don't require any assembly on the end-user's side
[05:36:43] <soul-d> oh i meant for general information egg terminology in datasheets so i can look for theoretical better :)
[05:41:01] <soul-d> i got a dual 100M/sample 8bit adc must be able to build somthing nice with that with fpga in a few years :) but i din't understand a word of datasheet's analog part :P
[05:41:43] <ziph> soul-d: Get the Art of Electronics.
[05:41:55] <ziph> And a good book on Microelectronics.
[05:42:42] <karlp> I love H&H, but I have one complaint, they don't say what's _wrong_ with any of the "bad circuit ideas"
[05:42:59] <karlp> it's always bugged me.
[05:47:05] <soul-d> http://www.amazon.com/Electronic-Circuits-Fundamentals-Applications-Third/dp/0750669233/ref=sr_1_1?ie=UTF8&qid=1322912091&sr=8-1
[05:47:08] <soul-d> http://www.amazon.com/Practical-Introduction-Electronic-Circuits/dp/0521478790/ref=sr_1_fkmr0_1?ie=UTF8&qid=1322912281&sr=8-1-fkmr0
[05:47:16] <soul-d> are the 2 i have laying around :P
[05:47:30] <soul-d> probably should use them lather one is mostly analog
[05:47:34] <amee2k> hahaa... capacitors as LED ballast sure suck big time XD
[05:47:48] <amee2k> http://ompldr.org/vYmtjYg/ledlamp0.png << yellow trace is current in 1V/A, blue trace is input voltage
[05:58:46] <inflex> soul-d: I made a simple unit the other day for tracking volts/amps
[05:59:02] <inflex> soul-d: uses a mega48 and serial connection, so it's only good for about 4000sps
[06:05:58] <soul-d> thats what you you showed with the graph i think ? yeah should start simple one anyhow also got dual digital pot for a voltage/ load regulator some day ;) above would suffice for info on it i , although on other hand those are not that expensive maybe more hasle :P
[06:07:32] <soul-d> hate this keyboard i hit insert instead of backspace to often
[06:08:41] <inflex> yeah, I'm no fan of this keyboard, wears my hands out typing on it. I need to save up to get a replacement IBM M
[06:16:18] <soul-d> what are your bench tools inflex since i got none still looking at affordable options making yourself is hard without tools to debug :P
[06:24:17] <Steffanx> You really USE your IBM M inflex ?
[07:01:27] <inflex> Steffanx: yes, I use my IBM-M keyboard a lot - have used them for a looooong time
[07:02:02] <inflex> soul-d: ermm... tell you what bench tools I still need to make properly... a computer controlled power supply with manual overrides and current control
[07:02:33] <inflex> soul-d: but, I have basically a good multimeter (Protek 608, 50,000 counts), a simple scope (Velleman 10MHz handheld) and... well that's about it really
[07:05:48] <mrfrenzy> inflex: will this power supply be linear or switched?
[07:05:58] <soul-d> k my velleman was worst buy ever though :P parralel port thingy long time crapy software donno about new ones since i don't have pc with parallel
[07:06:17] <inflex> mrfrenzy: was thinking linear
[07:06:30] <mrfrenzy> then your existing equipment will do the job fine
[07:06:49] <soul-d> what you mean with computer controlled
[07:07:20] <mrfrenzy> this is also a project I'm planning, but I never get past the planging stage ;)
[07:07:35] <soul-d> i was looking at mcu controlled so somthing to go to pc should be easy thats why i sampled a dual digital potentiometer :)
[07:07:56] <inflex> soul-d: basically would let me do PC-controlled tesqting
[07:08:17] <inflex> soul-d: my Velleman is a LCD handheld thingy
[07:09:52] <soul-d> what voltage range where you aiming for ?
[07:10:28] <inflex> 2-16V is my range that I plan for
[07:11:22] <inflex> basically the plan is a series of DAC driven opamps driving MOSFETs as resistors to program the voltage and current limits
[07:11:37] <soul-d> i was looking at lm317 or newer versions of it with transistor maybe for higher currents
[07:11:47] <soul-d> i saw a page on pwmed stuff
[07:12:05] <soul-d> http://www.edn.com/article/512537-Control_an_LM317T_with_a_PWM_signal.php
[07:12:24] <inflex> ja, I'm trying to avoid noise as much as possible, hence why I've not gone with switchmode or PWM'd options
[07:12:24] <soul-d> external link given from manufactor site
[07:12:50] <soul-d> ok yeah since i sampled digital pot i geus don't need that option either
[07:13:06] <inflex> basically, I'd take that circuit, and use a DAC instead of the PWM
[07:13:36] <mrfrenzy> I'm thinking of using something like an atmega168 and use the internal ADC and DAC
[07:13:58] <mrfrenzy> or - an external hall effect current sensor with spi ;)
[07:14:04] <inflex> 168 does't have a DAC
[07:14:31] <inflex> oooh, I see what you said there.... Internal-ADC.... _and_ (external) DAC
[07:14:33] <mrfrenzy> you can make it by filtering the pwm output
[07:14:42] <inflex> yeah, but there's always ripple in it
[07:14:59] <soul-d> but with these things do you want a electrical power on acting as enable ?
[07:15:16] <soul-d> egg startup and unknown states
[07:15:30] <mrfrenzy> yes naturally, I have not decided on what approach to take yet
[07:20:52] <soul-d> http://www.maxim-ic.com/datasheet/index.mvp/id/2568 planning to use that
[07:21:42] <soul-d> since a good mechanical pot probably more expensive :)
[07:38:44] <nomis> Tom_itx: Two questions regarding the usbtiny mkii programmer: Is it normal that programming a chip results in "reset full speed USB device using ehci_hcd and address xy" in the linux dmesg output?
[07:39:13] <nomis> and secondary: If in usb powered mode: is the power indicator led supposed to flash while programming?
[07:41:15] <nomis> (I have troubles programming an attiny2313 based circuit, and don't understand what could be the reason here. I am wodering if I managed to kill the power supply via ISP)
[07:41:30] <karlp> are you powring the target as well?
[07:41:39] <nomis> yes.
[07:41:41] <karlp> it sounds like you're overloading the power supply, and it's dropping out.
[07:42:07] <karlp> is it possible to try self powering the target, and letting usb only power the programmer itself?
[07:42:21] <nomis> karlp: not at the moment.
[07:42:53] <nomis> karlp: (broken power however would mean that the attiny2313 is defective for some reason, there is not much to the board)
[07:43:29] <karlp> how much power is the target board drawing?
[07:43:29] <nomis> karlp: the schematics of the target circuit is this: http://www.mikrocontroller.net/attachment/127642/blinkinvader.png
[07:44:04] <nomis> and with this specific board the FETs on the isp pins are not populated.
[07:45:44] <karlp> when you say tourbles programming, does it normally recognise the chipid and start programming but fail?
[07:46:57] <nomis> karlp: I get
[07:46:59] <nomis> avrdude: stk500v2_command(): command failed
[07:47:05] <nomis> avrdude: stk500v2_command(): unknown status 0xc9
[07:47:15] <nomis> avrdude: stk500v2_program_enable(): cannot get connection status
[07:47:25] <nomis> avrdude: initialization failed, rc=-1
[07:47:29] <nomis> [...]
[07:48:50] <karlp> if you have just the usbtiny programmer plugged in, with n o target, it shows up properly, and you can run avrdude -c usbtiny -p atmega88 (any part)
[07:49:09] <karlp> does it say, "can't fidn programmer" or "initialization failed" ?
[07:49:18] <Steffanx> No it's not a usbtiny karlp
[07:49:23] <Steffanx> It's a avrisp mkii clone
[07:49:28] <karlp> yeah, so a different name,
[07:49:29] <Steffanx> aka usbtiny mkii
[07:49:32] <Steffanx> :P
[07:49:35] <karlp> whatever the -c is,
[07:50:07] <nomis> just running avrdude -c avrisp2 -P usb -p t2313 results in the same message.
[07:51:02] <karlp> this might be obvious, but does it work with other targets? or is it only having problems with this target?
[07:51:39] <nomis> karlp: I have a second pcb without the fets populated and it works.
[07:52:41] <nomis> so "broken attiny2313" is not unlikely. But I don't get why it should break, the schematics seems ok to me.
[07:55:25] <Steffanx> Just double check the wiring
[07:56:26] <inflex> I'd say 95% of screaming tech issues in here are solved via the rubber-ducky method
[07:57:16] <inflex> about 1% are actually damaged AVRs... and 0.01% are factory failures/faults
[07:59:32] <nomis> the same wiring works with the second pcb
[07:59:47] * nomis doesn't get it.
[08:07:45] <karlp> I thought you said the fets weren't connected on the board you were having problems with?
[08:08:34] <nomis> karlp: one has 5 fets on the non-isp pins. the other one has no fets at all.
[09:46:46] <HalfMadDad> Hi Everyone. I repair circuit boards as pat of my business but I haven't really done anything embedded-wise
[09:46:58] <HalfMadDad> I have a scope, logic analyzer and have development boards and
[09:47:09] <HalfMadDad> a jtag pod ordered. Can anyone else recommend any other standard tools an embedded workshop would need?
[09:51:39] <Steffanx> You need the other half of the HalfMadDad
[09:52:40] <HalfMadDad> :)
[09:53:13] <soul-d> ok im stupid when it comes to relays i bought some relay's advertised with Max working voltage 250VAC/30VDC Max current: 2A bij 230 V actual device is -> http://www.futurlec.com/Relays/JRC-23F-03.shtml
[09:53:44] <HalfMadDad> any advice for fullyMadDad?
[09:54:38] <keenerd> Assuming you already have the more common general electronics stuff (iron, dmm, etc), you are well off for embedded.
[09:55:31] <Steffanx> Uhm, "Maximum Switching Voltage: 125Vac / 60Vdc" soul-d ..
[09:55:36] <Casper> HalfMadDad: you can do most with half of what you already have
[09:55:58] <HalfMadDad> keenerd, Casper: Okay thanks guys!
[09:58:24] <Casper> HalfMadDad: you need a way to code (computer), a mean to program (flashing equipment, if you use a bootloader it can be a simple serial cable....), a target, a mean to do something (led, speaker, lcd, whatever output) and optionally a debug mean (jtag, serial out, lcd, led, .....)
[09:59:02] <soul-d> :s yah got other relays saying that egg 1A/125vac to but it does switch 230v ( uv lights ) but clueless on how to know the max power of device
[09:59:23] <soul-d> but as far i can tell this is wrongly advertised thebn
[09:59:31] <Casper> relay ain't in watts
[09:59:34] <soul-d> http://www.samenkopen.net/action_product/936552/670454
[09:59:40] <soul-d> is what i orderd
[09:59:47] <Casper> relay have a few ratings
[10:00:01] <HalfMadDad> Casper: looks like I am good then, nice to know I don't need to spend more :) , thanks
[10:00:01] <soul-d> http://www.futurlec.com/Relays/JRC-23F-03.shtml what i have but still clueless on rating
[10:00:16] <soul-d> ok beter then how do i know how much power i can hook up on it
[10:00:20] <soul-d> @ 230 volt
[10:00:26] <Casper> maximum switchable voltage, AC and DC rating. Going past that could make the relay arc instead of opening
[10:00:34] <soul-d> im looking at 100 watts
[10:00:36] <soul-d> 500
[10:00:40] <soul-d> and 1000
[10:00:44] <Casper> you have maximum current, AC and DC. often it's the same
[10:00:47] <soul-d> what ratings would i need ?
[10:00:48] <Casper> and coil voltage
[10:00:56] <Casper> (I'm at work btw)
[10:01:01] <HalfMadDad> I'm going to take my Son out for a Sunday drive(on Sat) talk to you guys later
[10:01:07] <Casper> there is a car that just came in... here or neighbour?
[10:04:34] <soul-d> so if device is more power then say Maximum Switching Power: 62.5VA @ 125Vac this translate to swithing on a device egg 36Watt TL @ 230 would already be out of specs ?
[10:08:27] <Casper> relay ain't in VA
[10:08:31] <Casper> nor in watt
[10:08:49] <soul-d> anyhow other question is cause its adevertised as 2A at 230volt wich would mean i could switch on few lights egg 480 waats
[10:08:58] <soul-d> those aint my data
[10:09:02] <Casper> if your device is in VA or watt, you first need to convert in amps
[10:09:03] <soul-d> all datasheet
[10:09:24] <Casper> you can have up to 2A of current
[10:09:35] <Casper> and a working voltage of up to 230 volts
[10:09:55] <soul-d> how does that comply with Maximum Switching Voltage: 125Vac / 60Vdc
[10:09:55] <soul-d> Maximum Switching Current: 2 A
[10:09:55] <soul-d> Maximum Switching Power: 62.5VA / 30W
[10:09:57] <soul-d> actual data
[10:10:02] <soul-d> thats what i recevied
[10:10:07] <soul-d> as said device
[10:10:43] <soul-d> and the naming
[10:10:43] <soul-d> JRC-23F-03 - SPDT 3V 1A DIP Relay
[10:10:46] <soul-d> :S
[10:10:48] <Casper> is that your device you want to control?
[10:10:49] <soul-d> it becomes
[10:10:50] <soul-d> less
[10:11:04] <soul-d> wait from 0
[10:11:14] <soul-d> orderd -> http://www.samenkopen.net/action_product/936552/670454
[10:11:26] <soul-d> http://www.futurlec.com/Relays/JRC-23F-03.shtml
[10:11:30] <soul-d> is what i received
[10:11:39] <soul-d> doubt it's the same or can do the same :P
[10:12:21] <soul-d> might have the 5v version though instead of 3v
[10:13:02] <Casper> ok
[10:13:11] <Casper> contact rating of 0.5A
[10:13:20] <Casper> but can take a surge of 2A for a few seconds
[10:13:28] <soul-d> my target device is a 36 watt @230V for example
[10:13:32] <soul-d> so not for this :P
[10:13:55] <soul-d> but i got send wrong device i can conclude that
[10:14:10] <Casper> so 36/230=0.16A
[10:14:56] <Casper> you need a relay with a contact rating of >=230V >=0.16A and a coil voltage of whatever you want to control it with
[10:15:31] <Casper> notice that if you use a transistor and 5V, you might want to use a 4.5V coil
[10:15:36] <Casper> hmm another car....
[10:15:56] <soul-d> k first send notice he send wrong relay's then since advertised as 2A @230V
[10:20:03] <Casper> why wrong relay?
[10:20:19] <soul-d> since it's not what i orderd ?
[10:20:42] <soul-d> if i order a relay 2A @230 and get one that is 0.5 @125
[10:23:19] <soul-d> hardly can use it for intended purposes
[10:28:39] <Casper> ah yeah I see
[10:28:42] <vectory> can someone recommend a good free book on avr? would be nice to have all info in one plave, not scatter across several datasheets
[10:29:05] <vectory> ad a book from the library but e book would be nice, too
[10:29:09] <mrfrenzy> there are good books to teach you programming, still you need to read the datasheet for the particular micro you are building with
[10:29:22] <Casper> vectory: the datasheet is a really nice starting book
[10:29:28] <vectory> :)
[10:29:28] <Casper> really, I'm not kidding
[10:29:35] <Casper> start with the huge datasheet
[10:29:36] <vectory> which one?
[10:29:46] <vectory> generall avr or for a specific chip
[10:29:53] <Casper> the one for the part you want
[10:30:27] <Casper> if you have no part in particular, maybe the atmega32 would be a good start.... or 328
[10:30:37] <Casper> yes, the datasheet is big
[10:30:41] <vectory> i thought of something which is cattered more to the beginners, something that explains what a pull up is for example
[10:30:46] <Casper> you do not need to read all
[10:31:08] <Casper> pullup is a resistor from the pin to VCC
[10:31:16] <Casper> a pulldown would be pin to ground
[10:31:20] <vectory> i know, it was in the book i had
[10:31:52] <jacekowski> talking about avr's is there any place where i can download one big package with all atmel pdf's
[10:31:52] <vectory> but thats something i wouldnt find in the ds, ofc i could search the web for afditional info or just come here and ask newb questions but you wouldnt want that all the time ;)
[10:32:09] <jacekowski> pullup is basic electronics
[10:32:21] <mrfrenzy> vectory: I have a very good book, but it is not free. if you want to spend a few dollars on amazon I can go and look up the name
[10:32:31] <jacekowski> and for that everyone will recommend art of electronics and microelectronic circuits by sedra
[10:32:47] <vectory> yes, and i want a book that covers the basics :) nvm mind tho, i thought there might be a definate must read
[10:32:51] <jacekowski> http://www.amazon.com/Microelectronic-Circuits-Oxford-Electrical-Engineering/dp/0195116631
[10:33:11] <jacekowski> http://www.amazon.com/Art-Electronics-Paul-Horowitz/dp/0521370957/ref=sr_1_1?s=books&ie=UTF8&qid=1322929469&sr=1-1
[10:33:14] <jacekowski> those two books
[10:33:25] <Casper> vectory: thing is, as jacekowski said, pullup is very basic electronics... all boook on microcontroll;er assume that you know the very basics
[10:33:26] <vectory> jacekowski, thx, not free though
[10:33:34] <Casper> like basic electronics and programmation
[10:33:46] <jacekowski> vectory: no, but it has everything in it
[10:33:54] <jacekowski> vectory: and it's well worth every penny spent on it
[10:34:42] <vectory> i think we can let that statement stand for itself :)
[10:35:09] <jacekowski> ask anybody who is into electronics which book he will think of as electronics bible
[10:35:20] <jacekowski> it will be one of those books
[10:36:06] <vectory> theres a german equivalent from, maybe, when i find the time
[10:36:32] <vectory> from tietze and schenk
[10:37:12] <jacekowski> it's like K&R for C programming
[10:39:34] <keenerd> 'Getting Started in Electronics' by Forrest Mimms. Written at a 3rd grade level but covers all the practical stuff of the first 3 years of an EE degree.
[10:40:42] <keenerd> Does not really talk about micros though.
[10:42:06] <jacekowski> principles are the same
[11:19:48] <karlp> avr datasheets are pretty good too, because it is _all_ in the one sheet
[11:19:56] <karlp> unlike some other parts....
[11:33:54] <Fleck> hey, crystal capacitors, why 33pF and not 20pF and whats the difference?
[11:38:26] <karlp> depends on the crystal really.
[11:41:19] <Tom_itx> i've got some that require 8pf
[11:41:30] <Tom_itx> you need to read the spec sheet for the crystal
[11:42:04] <jacekowski> well, it depends on crystal and electronics connected to it
[11:42:15] <jacekowski> and there is quite complex math behind it
[11:42:30] <jacekowski> not enough capacitance and it won't be stable, too much and it will stop
[11:45:46] <Fleck> atmega168-AU
[11:45:51] <Fleck> and 16Mhz crystal
[11:47:56] <Fleck> getting crystal datasheet... :D fun, i even dunno who made it
[11:48:23] <karlp> so, you try a few an dhope it works :)
[11:48:45] <karlp> and if you care enough about reliable startup and so forth over time and temperature, you buy a crystal with a known datasheet :)
[11:50:29] <jacekowski> 20-30pf
[11:50:33] <jacekowski> look at avr datasheet
[11:50:34] <jacekowski> it's there
[11:50:54] <jacekowski> in some cases you may have to enable full rail to rail swing
[11:51:13] <jacekowski> which increases current consumption but makes crystal much more stable
[16:20:10] <amee2k> if i have a circuit that carries, say, 500mAdc constantly (+/- 5%), do i use a 500mA fuse to fuse it, or should i pick one size larger?
[16:23:39] <Vegar> amee2k: depends on the components you are protecting with the fuse
[16:23:44] <Vegar> what's their rating?
[16:24:30] <amee2k> bunch of power LEDs rated for 500mA continuous and (depending on which ones i'll pick for the final setup) 700 or 1000mA pulsed respectively
[16:25:01] <amee2k> i want some way to protect them in case the driver circuit fucks up and floors it
[16:25:27] <amee2k> i expect peak current on a failure that makes to go all out to be 1.5-2A
[16:26:01] <mrfrenzy> glass fuse?
[16:26:06] <amee2k> so i was thinking fast-blow fuse to provide a basic level of protection
[16:26:13] <mrfrenzy> should work fine
[16:26:28] <amee2k> yeah, 5x20mm fuses are cheap and easy to get
[16:27:23] <amee2k> but can i use the fuse at the nominal rating for extended periods of time without risking nuisance tripping?
[16:27:29] <mrfrenzy> yes
[16:27:35] <amee2k> good :)
[17:27:48] <specing> What does avr-gcc set when compiling for AVR?
[17:27:52] <specing> __AVR__?
[17:29:46] <Casper> ???
[17:30:25] <specing> Casper: something I can #ifdef
[17:30:53] <Tom_itx> i saw a list of those somewhere...
[17:30:55] <Casper> maybe check the headers...
[17:31:03] <Casper> or a library?
[17:31:11] <Tom_itx> lemme find it
[17:31:28] <karlp> wasn't it some command someone where said to make gcc shwo you what it would define?
[17:31:34] <karlp> cpp -M /dev/null or something?
[17:32:02] <grummund> specing: yes. amongst others, like GCC version, MCU type, etc.
[17:37:06] <Tom_itx> http://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html#AVR-Options
[17:40:09] <specing> Tom_itx: I'm looking for something to #ifdef
[17:40:30] <Tom_itx> look over some of dean's makefiles
[17:41:50] <specing> Tom_itx: Im looking for defines set by the compiler
[17:42:04] <Tom_itx> can't help you there
[17:46:00] <grummund> http://www.nongnu.org/avr-libc/user-manual/using_tools.html
[17:46:18] <grummund> #if defined __AVR__
[17:46:27] <grummund> #if defined __GNUC__
[17:50:22] <specing> I was told -dD does it
[17:53:33] <grummund> simply using avr-gcc should do it
[17:54:06] <untitled> :)
[17:54:13] <untitled> capitan
[18:05:34] <grummund> oh i see...
[18:06:42] <grummund> ~$ touch foo.h; avr-cpp -dM foo.h | grep __AVR_
[18:06:42] <grummund> #define __AVR_2_BYTE_PC__ 1
[18:06:42] <grummund> #define __AVR_ARCH__ 2
[18:06:43] <grummund> #define __AVR__ 1
[18:07:07] <grummund> ~$ touch foo.h; avr-cpp -dM foo.h | grep __GNUC_
[18:07:07] <grummund> #define __GNUC_PATCHLEVEL__ 3
[18:07:07] <grummund> #define __GNUC__ 4
[18:07:07] <grummund> #define __GNUC_MINOR__ 3
[18:07:08] <grummund> #define __GNUC_GNU_INLINE__ 1
[18:40:41] <jon-> Is there a real reason why new is not supported in avr-c++?
[18:44:33] <specing> Is there a real reason why new should be supported in avr-c++?
[18:45:31] <Tom_itx> is there a real reason to program in avr-c++?
[18:45:52] <jon-> specing: it is an integral part of c++
[18:46:27] <Casper> is there a real reason why should C++ be supported on avr?
[18:46:40] <jon-> Why support avr-c++ and then tell people they shouldnt use it?
[18:46:50] <Casper> it is not supported actually
[18:47:20] * specing uses C++ on AVRs (to a limited extent)
[18:47:20] <Casper> man that stapler sound so mean!
[18:47:58] <Casper> it can staple up to 25 sheets, but do so with a loud KLANK! it's spring loaded like those T50
[18:48:03] <jon-> I dont see why malloc is supported but new seems intentionally omitted
[18:48:24] <Casper> maybe it's because of memory limitation
[18:48:47] <Casper> or because there is other way to do the same thing
[18:57:20] <allgood38> Hey, anybody dealt with winavr?
[18:58:56] <jon-> Casper: then they shouldnt support classes
[19:02:44] <Casper> jon-: from what I read somewhere, c++ is not supported. BUT since some function work as it, they added those and some worked with minimal hack
[19:03:09] <Casper> and some was just plain needed (like malloc, hard to find another way)
[19:04:44] <jon-> Casper: the manual seems to act as if C++ is supported except for the std library, new/delete, and exceptions
[19:04:58] <jon-> it seems like new/delete were intentionally omitted, at least from how I am seeing it
[19:05:26] <Casper> or they just didn'T got enought demand for it and it's on the bottom of the list
[19:06:24] <jon-> it seems pretty straightforward to add, just malloc the space and call the constructor >_<
[19:06:39] <jon-> I can see maybe wanting to discourage its use, maybe thats why they did it
[19:07:53] <jon-> hell, there is even a patch for it
[20:12:39] <inflex> Dear God #electronics has degenerated into bullshit again
[20:12:42] <inflex> I don't know why I bother
[20:14:12] <allgood38> Whats up?
[20:15:23] <inflex> it's impossible to ask meaningful questions in there without being drowned out by the nearly perpetual pointless degenerative discussions of non-topic items.
[20:15:40] <keenerd> No ops who care?
[20:16:01] <allgood38> I'm noticing a lot of linux talk
[20:17:38] <Casper> inflex: that is why I sadly have to rely on other channel sometime....
[20:17:53] <allgood38> Have any of you dealt with Arduino?
[20:18:00] <Casper> because there is no control at all, and many troll should be banned to make the channel usefull again...
[20:18:19] <Casper> allgood38: the brainless library or the overpriced dev board?
[20:18:45] <allgood38> Casper: lol, see this is a new world to me, and I am slowly learning what you have just said
[20:19:47] <allgood38> Casper: I've replaced the Arduino IDE with Eclipse, which uses avr tools directly
[20:20:00] <allgood38> The Arduino IDE hid everything
[20:20:06] <allgood38> Everything!
[20:20:20] <inflex> Casper: rather unfortunate indeed - since there's a good number of people in there and I don't always like to ask Q's in here since they're not always AVR related
[20:21:02] <Casper> inflex: like my smps question... some idiot tried to answer when they don't even know what a mosfet is...
[20:21:25] <Casper> and tried to appear like they knew what they were talking about...
[20:21:51] <Casper> one idiot said something like: "are you using an lm317?" :D
[20:22:28] <keenerd> Casper: Mosfet was that place in the star wars movie, right?
[20:23:03] * Casper kicks keenerd leg
[20:23:19] <keenerd> No, he was a bounty hunter. My bad.
[20:23:27] <allgood38> Hey are either of you in engineering?
[20:24:52] <keenerd> allgood38: So how is the transition to working in real C going?
[20:25:21] <CMiYC> In real C?
[20:25:25] <allgood38> keenerd: Its actually really nice
[20:25:46] <CMiYC> What is fake C?
[20:25:56] <allgood38> When you call a function, its not magically built in, you have to include the library
[20:26:08] <keenerd> CMiYC: Arduino wiring.
[20:26:19] <CMiYC> Really? I never considered it "fake" since it is, in fact, C
[20:26:49] <allgood38> Isn't it just a method of implementing the C/C++ languages?
[20:26:59] <CMiYC> no, it is C++
[20:27:17] <CMiYC> All of the arduino-specific function calls are just that, function calls
[20:27:18] <allgood38> yeah, it just doesn't implement the entire thing
[20:27:35] <CMiYC> if by "doesn't" you mean "it does" then you are correct
[20:27:43] <CMiYC> The arduino ide supports everything avr-gcc does
[20:27:54] <allgood38> It doesn't have templates though doesn't it?
[20:28:00] <inflex> Casper: yes, a lot of people try to answer questions they have no knowledge about
[20:28:16] <inflex> Casper: most are in the situation of "A little knowledge is a dangerous thing"
[20:28:34] <CMiYC> If avr-gcc supports them, then yes
[20:29:00] <CMiYC> Don't get me wrong the Arduino/Wiring IDE is pretty stripped down, but everything done there goes to avr-gcc
[20:29:20] <Casper> http://img341.imageshack.us/img341/7020/img3062s.jpg ← for those interrested to see the difference between a cheap 300W psu vs a cheaper 350W psu. Notice here that the left transfo is the 5VSTB, identical on both. middle seems to be the control transfo for the main switcher. right one is main switcher
[20:29:52] <Casper> Notice the transfo and inductor size, and missing parts
[20:30:41] <inflex> Casper: yeah, bit of a difference in there
[20:30:59] <Casper> also wire size...
[20:31:01] <inflex> curious that they've replaced the inductors
[20:31:24] <Casper> left use LCLC filter, while right use LC only
[20:31:43] <inflex> yes
[20:31:52] <Casper> they would have removed the L if it wasn't a forward one
[20:32:07] <inflex> strangely, they went with the more-labour intensive option of 4 x rectifier diodes vs simpler bridge diode
[20:32:20] <Casper> yeah
[20:32:25] <Casper> that surprised me too
[20:32:44] <inflex> labour is cheaper than parts O_o
[20:33:01] <inflex> am I correct though in seeing that only the "cheap" one has an opto-isolator
[20:33:03] <keenerd> Ooh, Amforth cranked out another release last month.
[20:33:19] <Casper> both have the opto
[20:33:27] <inflex> Casper: aaaah, just see it now on the edge of the transformer
[20:33:28] <Casper> and the opto is only for the standby one
[20:33:41] <Casper> btw
[20:33:45] <Casper> that one is so cheap that....
[20:33:57] <Casper> .... on the bench like that it want to turn on the main switcher!
[20:34:10] <Casper> the wire act as an antenna and turn on the switcher
[20:34:15] <inflex> bloody hell
[20:34:20] <inflex> it's a feature!
[20:34:53] <Casper> yup
[20:34:55] <Casper> hmmm
[20:35:04] <Casper> looking at the power distribution
[20:35:27] <Casper> no wonder why they didn't really exploded... they boosted the "useless" 3.3V and 5V current and hardly touched the rest
[20:37:04] <Casper> btw
[20:37:24] <Casper> the right one use 2 diodes soldered to a metal "cap", clipped around the diode, screwed on the sink
[20:38:14] <inflex> wow, as some sort of cheap hack?
[20:38:30] <Casper> kinda
[20:39:22] <inflex> I still need to get proper caps for my 1U PSU
[20:39:37] <inflex> I'm using Panasonic FM 1000uF units instead of the 2200uF's that were in there
[20:39:47] <inflex> that said, the PSU now works fine
[20:40:11] <Casper> http://img64.imageshack.us/img64/4286/img3063v.jpg ← see
[20:40:35] <inflex> holy hell...
[20:40:51] <Casper> yeah
[20:41:04] <keenerd> You guys have any opinions on a variable psu like http://www.google.com/products/catalog?tbm=shop&cid=9692033724743738998
[20:41:49] <Casper> keenerd: they are very usefull, but if you plan on doing audio then 2 of them would be needed...
[20:43:41] <keenerd> Only if you are doing AB stuff. Class D does not need multiple supplies.
[21:39:47] <Casper> inflex: for forward smps, is it more efficient to have the output of the transfo at way higher than output? or close to output?
[21:39:53] <Casper> for efficiency that's it
[21:40:04] <inflex> ugh, that I cannot answer :(
[21:41:01] <Casper> can you answer for buck?
[21:44:44] <Casper> inflex: ?
[21:44:59] <inflex> nope... I don't have enough experience at all :(
[21:45:24] <Casper> atx psu seems to have about a 10:1 for the 12V
[21:45:39] <Casper> that's why I ask....
[21:45:48] <Casper> so 2.5x the output
[21:48:17] <inflex> I do believe that having a bigger gap between in/out is gainful
[21:48:22] <inflex> but that's just an assumption
[21:49:35] <Casper> so to make a buck I need to make a boost... funny :D
[22:32:18] <Casper> hmmm....
[22:32:34] <Casper> 38 turns primary for 340VDC...
[22:32:49] <Casper> that mean I should use 1 turn primary ?!?
[22:32:56] <Casper> and 2 turns secondary?!?
[22:33:06] <inflex> mmm... that sort of makes the transfer probably a bit inefficient?
[22:33:23] <inflex> don't you want something more like at least 5 turns or s?
[22:34:16] <inflex> (yes,I know it means you'll ave to put a lot more turns into the primary to compensate
[22:36:33] <Casper> well, if I want to keep the original volt/turn...
[23:58:04] <Subverted> anyone care to help me out w/ using the atmega8u2 on my arduino uno smd to burn the sanguino bootloader on an atmega644p? pretty sure i have everything setup correctly but would appreciate double checking it with someone before i brick this ic =)