#avr | Logs for 2013-05-16

Back
[02:11:46] <ptrkOP> I am trying to learn about PWM on the atmega128. I just want to fade an LED in an out. Should I just look in the datasheet for pwm?
[02:14:59] <theBear> it's a pretty good start, that's how i did it the first time (assuming you already know the basics of variables and loops in c)
[02:15:35] <ptrkOP> Yes I do. I just am kind of overwhelmed with the datasheet
[02:16:14] <theBear> it's pretty simple, just read the sections you need, it's all very well laid out and explained
[02:16:49] <ptrkOP> Yea step one for me is finding the section
[02:34:33] <theBear> it'd be under timers or pwm i'd think
[02:39:03] <sabesto> ptrkOP: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=68302&start=all&postdays=0&postorder=asc
[02:39:25] <sabesto> but, as it states, it build on timers tutorial, so read that first
[02:39:26] <ptrkOP> Oh wow thanks a lot!
[02:39:31] <ptrkOP> will do
[02:40:06] <sabesto> it is perhaps the hardest part of an avr HW wise because of all the different modes/functions
[02:40:39] <bitd> What is, sabesto
[02:40:44] <ptrkOP> Oh well that is good to know.
[02:40:55] <sabesto> timers/pwm
[02:41:01] <bitd> Ah yes, PWM :D
[02:41:15] <ptrkOP> Are there any really good texts for the AVR?
[02:41:24] <bitd> But timers are awesome <.<
[02:42:02] <bitd> I like to use the official Atmel application notes.
[02:42:08] <bitd> http://www.atmel.com/Images/doc2505.pdf
[02:42:14] <bitd> Thats one for timers.
[02:42:32] <ptrkOP> nice I am bookmarking all these links
[02:43:21] <ptrkOP> Is there like a place for all the app notes or do I need to find them individually
[02:45:44] <R0b0t1> http://www.murata.com/products/micromechatronics/demonstration/microblower/index.html
[02:45:46] <R0b0t1> I desire one
[02:45:48] <bitd> I usually just find em through google =)
[02:46:06] <ptrkOP> how hard is it to do sd card stuff. I look briefly at fatFS and stuff and it looked intense
[02:47:24] <bitd> R0b0t1, what are you going to use it for?
[02:47:37] <bitd> Never did anything with SD ptrkOP so could not tell you.
[02:47:44] <ptrkOP> just learning. Eventually I want to do logging to it and maybe bootloading
[02:47:59] <R0b0t1> bitd: I've absolutely no idea
[02:48:23] <R0b0t1> bitd: I found the site because of some tiny Bluetooth/WiFi/FM/GPS modules they had
[02:48:27] <R0b0t1> I couldn't find those
[02:48:53] <bitd> Hahaha, its shiny and you want one? <.<
[02:49:35] <R0b0t1> Okay okay, I know, tiny hovercraft.
[02:51:54] <bitd> That could work <.<
[02:52:06] <bitd> Or tiny supercharged combustion engine.
[02:53:29] <R0b0t1> You know I am unable to find their products anywhere
[02:53:43] <R0b0t1> I think they are an Asian company, maybe their products have not made it to US distributors
[04:04:58] <Tom_itx> ptrkOP, http://tom-itx.dyndns.org:81/~webpage/avr/mega128/pwm_test/
[04:26:56] <thetruthisoutthe> hi
[04:27:14] <thetruthisoutthe> woh do you initialize a at keyboard properly?
[04:27:41] <thetruthisoutthe> ping the ps2 bus at regular intervals with echo, and if got reply send a reset?
[04:33:46] <ptrkOP> oh wow tom thanks a lot!
[04:34:00] <ptrkOP> I am trying to make a really dirt simple triangle wave generator.
[04:34:13] <ptrkOP> Or really any waveform
[04:36:05] <ptrkOP> What pins generate the signal?
[04:41:17] <ptrkOP> nvm looked at spec sheet
[07:01:26] <Badaboom> morning
[07:03:56] <cart_man> RikusW: HEy Rikus
[07:10:46] <Badaboom> mmk
[07:31:56] <RikusW> hi cart_man
[07:35:25] <cart_man> Anybody knows a channel for VHDL?
[07:35:27] <cart_man> seems dead
[07:39:43] <Badaboom> nope,, sorry
[07:49:18] <twnqx> that's because verilog is better!
[07:49:25] * twnqx incites programming language war
[07:50:06] <cart_man> hahaha
[07:50:30] <cart_man> Well Pros and Cons twnqx...need to know before I learn the wrong ones
[07:50:34] <Frigolit> both ##vhdl and ##verilog are normally quite dead afaik :p
[07:50:41] <cart_man> nothing sucks more then learning a dead language
[07:50:46] <Frigolit> but people are there at least
[07:50:49] <twnqx> i only do verilog because that's what's my uni chose :P
[07:50:59] <cart_man> But with what do people code FPGA's?
[07:51:13] <Frigolit> i simply liked the syntax in verilog better :3
[07:59:08] <twnqx> verilog.
[07:59:17] <twnqx> or vhdl
[08:02:28] <RikusW> verilog syntax seemed much cleaner to me
[08:03:14] <twnqx> i like c-like languages
[08:03:20] <twnqx> so verilog is the natural choice :P
[08:29:35] <megal0maniac> I think I killed whatever drives my router's LEDs with brownout :/
[08:29:54] <thetruthisoutthe> hahaha how will that kill it?
[08:30:08] <thetruthisoutthe> is it a 10W led ?
[08:32:16] <megal0maniac> Well I was trying to run it off a battery. The shitty USB cable couldn't supply 1A so it never managed to boot. Now that I've plugged it back in to the AC adapter, none of the LEDs work except for power. Router works fine
[08:35:36] <twnqx> that sounds... unlikely
[08:35:56] <megal0ma1iac> zlog
[08:36:15] <megal0ma1iac> It happened.. :/
[08:36:45] <megal0ma1iac> Modem works perfectly, but even now, when I should have eth, dsl, internet LEDs on, there's nothing
[08:37:03] <megal0ma1iac> Internet is currently running through it
[08:37:48] <megal0ma1iac> Re-flashed the fimrware to eliminate the possibility of config corrupteion. And Telnet console reveals no way to configure LEDs
[08:38:16] <megal0maniac> *corruption
[08:38:29] <twnqx> still unlikely
[08:38:43] <megal0maniac> What's more likely?
[08:38:51] <thetruthisoutthe> want to see some real advanced debug code? :) http://pastebin.com/EY19wzjA
[08:39:46] <megal0maniac> That actually looks kind of useful :)
[08:41:29] <megal0maniac> twnqx: What do you think?
[08:43:26] <twnqx> no idea
[08:43:39] <twnqx> maybe one voltage regulator died, but it wasn't that important
[08:44:21] <thetruthisoutthe> megal0maniac<= connecting battery reverse, or overvoltage will kill it
[08:46:20] <megal0maniac> Definitely didn't connect it backwards. Was a pre-made cable, confirmed to work
[08:46:47] <megal0maniac> Just very thin and long. I changed the USB end and shortened it and it worked
[08:47:11] <thetruthisoutthe> hm;< some regulators may oscillate in case you have small capacitors
[08:47:35] <thetruthisoutthe> 100nf ceramic + 1-10uf electrolyte minimum
[08:47:44] <thetruthisoutthe> 1-10uf ceramic is way better
[08:48:34] <megal0maniac> Hmmm... I guess the best would be to just pop it open
[08:49:01] <megal0maniac> Strikes me as odd that only the LEDs have stopped working. And only the ones controlled by GPIO. Power is fine
[09:01:52] <megal0maniac> There's a single 1117 on this board, no sign of anything else
[09:02:01] <thetruthisoutthe> oh
[09:02:25] <thetruthisoutthe> that is an ldo common on motherboards and video cards too
[09:02:41] <thetruthisoutthe> it requires 10mA minimum current load
[09:02:49] <megal0maniac> What the hell?
[09:03:06] <thetruthisoutthe> the feedback loop provides it
[09:03:08] <megal0maniac> It's out of the box, on my leg. Powered it on and the LEDs blinked (for post)
[09:03:22] <megal0maniac> Or POST rather
[09:03:54] <megal0maniac> What does it do with <10mA load?
[09:04:07] <thetruthisoutthe> wel it should work up to 12V input and should be able to dissipate 1W in to sot-223 package
[09:04:56] <thetruthisoutthe> it generates a little heat for itself because it likes warm climates
[09:05:13] <megal0maniac> Ah :)
[09:05:18] <thetruthisoutthe> that is why it needs 10mA min load
[09:05:34] <megal0maniac> Nice way of putting it
[09:05:51] <thetruthisoutthe> yeah, and it will work in -55C if you push it harder
[09:05:53] <thetruthisoutthe> :)
[09:06:28] <megal0maniac> We're expecting load-shedding, hence the battery idea. But these DSL modems suck quite a bit of power
[09:08:01] <megal0maniac> thetruthisoutthe: Are you new here? Don't think I've seen your nick before
[09:08:22] <twnqx> as long as they don't glow red-yellow they don't use much power
[09:09:29] <megal0maniac> twnqx: I was hoping for significantly less than 1A average load, but I suppose it wasn't designed for battery operation
[09:09:54] <thetruthisoutthe> twnqx<= i had some experience with mosfets before, tested a dcdc converter without heatsink, the smell was interesting, touched the backside of an irfz44 with a finger and my fingerprint was on it after it
[09:10:19] <thetruthisoutthe> the solder melted at the back side...
[09:10:30] <megal0maniac> That's what you get for touching backsides :P
[09:10:30] <twnqx> well yes
[09:11:47] <thetruthisoutthe> megal0maniac<= dropped nick because it got taken
[09:12:05] <twnqx> the weird <= highlight should tell you who he is
[09:12:14] <l9> have been wondering howto too make a decent 100w led driver...
[09:12:35] <thetruthisoutthe> l9<= using resonant mode of course
[09:13:49] <thetruthisoutthe> where every milliwatts of power counts
[09:14:54] <thetruthisoutthe> Don't like ads? PRO users don't see any ads ;-) < i leel like one when i configured my localhost fakeproxy and dns poisoner :)
[09:14:57] <l9> I am completely and utterly newbie, but as i have understood it i could make a mosfet that is regulated from a pwm source... or have i missed the point completly
[09:15:15] * twnqx is inclined to build a bridgeless interleaved frequency clamped critical conduction mode regulator
[09:15:30] <thetruthisoutthe> l9<= then you need to climb a tall learning ladder to be able to summon a resonant mode power supply, maybe you should start out with something simpler ?
[09:18:02] <l9> thetruthisoutthe and that i have discovered :/ i have started on the ground with small leds, 3 watts and suchs but i feel like i need more... And all those arcticels i read on dosent explain how to make bigger leds
[09:18:17] <megal0maniac> 220vac :)
[09:19:13] <twnqx> just build a few switch mode power supplies until you get the hang of it
[09:19:21] <twnqx> and try not to kill yourself doing so :/
[09:20:06] <l9> twnqx i am careful, i am only working with 5-12 volt for now.
[09:20:17] <twnqx> that's where the problem starts
[09:20:23] <twnqx> 5v, 100W = 20A
[09:20:30] <l9> i know....
[09:21:38] <thetruthisoutthe> 10W leds are usually 10.5V minimum.
[09:21:44] <thetruthisoutthe> so, 1A
[09:21:56] <thetruthisoutthe> 20W -> 21V+
[09:22:24] <thetruthisoutthe> 10-20W led is a good pick i think, they give 800-1300 lumens
[09:22:57] <twnqx> ah, i thought more like 1000 leds totalling 100W
[09:23:20] <thetruthisoutthe> hm, there are single led chips with 3-10W power
[09:23:29] <twnqx> up to 50
[09:23:33] <thetruthisoutthe> sure, they usually connect them in arrays
[09:23:39] <thetruthisoutthe> it is much cheaper
[09:23:40] <l9> My plan and idea, when I started this was too build a 3*100w ledbar that wouold give me a crap load of lumens
[09:24:40] <megal0maniac> lawdie
[09:24:40] <thetruthisoutthe> l9<= you can use that to grow plants too
[09:25:20] <thetruthisoutthe> a led is like 2x more efficient than your compact fluorescent
[09:48:26] <megal0maniac> I know what happened :D
[09:48:34] <megal0maniac> But I feel stupid about it
[09:50:10] <tzanger> the sam4l is a pretty sweet little device
[09:50:13] <tzanger> cheaper than at90can too
[09:52:05] <twnqx> pah.
[09:52:10] <twnqx> at90can rules!
[09:52:40] <twnqx> i want to redo my pcb with a sam though
[09:52:51] <twnqx> i just can't figure out how to flash them :/
[09:53:25] <l9> thetruthisoutthe not so much plant growing but more strobe lighting and movie lightning... insted of xenox :P
[09:54:52] <RikusW> megal0maniac: another South African joined #avr :)
[09:56:08] <megal0maniac> RikusW: Oh yeah?
[09:56:15] <RikusW> cart_man did
[09:56:17] <RikusW> from PTA
[09:56:45] <megal0maniac> Ah! Didn't realise :)
[09:56:53] <megal0maniac> Cool
[09:57:08] * RikusW wonders where scuzzy is these days....
[09:57:19] <RikusW> probably kicked the IRC addiction :-P
[10:03:27] <megal0maniac> RikusW: Apparently Eskom is planning load shedding for winter
[10:03:37] <RikusW> oh crap :S
[10:03:44] <RikusW> not again...
[10:04:27] <megal0maniac> Have an ADSL modem which works on 5V :P
[10:05:18] <RikusW> nice
[10:05:39] <RikusW> buy a deep cycle battery and singleboard pc
[10:05:45] <tzanger> that ADSL modem will have to handle a bit more if you want to connect it to an AVR
[10:05:59] <megal0maniac> tzanger: Noooo
[10:06:27] <thetruthisoutthe> l9<= ohh, then you need that 3x100W led then, but you do it wrong, a flash will not require a full power rated power supply
[10:07:25] <tzanger> megal0maniac: I'm pretty sure you will have some trouble fitting a ppp stack, tcp/ip stack and PAP/CHAP auth into an AVR. :-)
[10:08:01] <l9> thetruthisoutthe I thought it would burn out the led if not..
[10:08:26] <thetruthisoutthe> use a resistor or something
[10:08:33] <thetruthisoutthe> and a storage capacitor.
[10:08:58] <thetruthisoutthe> the leds have like 1.2-1.5x max current rating
[10:09:37] <megal0maniac> tzanger: I've got a battery powered router as well :)
[10:09:49] <thetruthisoutthe> clock---__--__--__--__--__--__--__--__--
[10:09:50] <thetruthisoutthe> data --___----____----____----____------
[10:10:52] <tzanger> megal0maniac: oh I see
[10:10:59] <tzanger> thetruthisoutthe: what are you doing
[10:12:12] <l9> back to the drawing board and with a thinking cap on... ;)
[10:12:13] <thetruthisoutthe> this is a ps2 data flow
[10:12:20] <tzanger> ah
[10:12:30] <tzanger> there are all kinds of websites on ps2 protocol and implementations
[10:12:34] <tzanger> it ain't hard :-)
[10:12:45] <thetruthisoutthe> yea and they are mostly inconsistent :)
[10:13:17] <RikusW> tzanger: I know of someone that fitted 2 tcp ip stacks into m128
[10:13:25] <RikusW> and 2 soft uarts too
[10:13:31] <RikusW> at 7.3MHz
[10:14:06] <tzanger> RikusW: people do all kinds of things "just because they can"
[10:14:25] <RikusW> and dallas 1 wire, gps tracking, internet access point
[10:14:34] <RikusW> its a commercial product
[10:15:06] <RikusW> oh and its interfaced to tetra too
[10:18:19] <tzanger> tetra?
[10:18:45] <tzanger> heh this atmel video calls a potentiometer a "potmeter"
[10:23:10] <RikusW> tetra trunked radio
[10:23:24] <RikusW> used by police etc
[10:23:44] <RikusW> http://en.wikipedia.org/wiki/Tetra
[10:23:54] <RikusW> err not the fish :-P
[10:24:14] <RikusW> http://en.wikipedia.org/wiki/Terrestrial_Trunked_Radio
[10:32:26] <Vegar> tzanger: it's a common term
[10:37:55] <megal0maniac> Not here it isn't
[10:38:09] <megal0maniac> Or in tzanger land :)
[10:38:37] <tzanger> RikusW: ah. I'm not often in that industry :-)
[10:38:43] <tzanger> trunked radio sure
[10:38:49] <tzanger> I just didn't know it had a term
[10:42:37] <RikusW> tetra modems are expensive > $300
[10:53:31] <Tom_itx> http://www.coilcraft.com/lpr6235.cfm
[10:54:22] <Tom_itx> http://www.electronicproducts.com/Sensors_and_Transducers/Sensors_and_Transducers/MEMSIC_An_electronic_compass_that_keeps_its_heading.aspx
[11:42:39] <twnqx> just when l9 asked, an article on LED lightbulbs in the eetimes newsletter :)
[11:43:57] <theBear> who asked ?
[11:44:24] <theBear> and i can tell yer just about everythign there is to know on commercial led lighting between 3 and 150w
[11:45:37] <twnqx> Oo
[11:45:47] <twnqx> this led driver runs straight from AC
[11:45:48] <twnqx> wow
[11:46:04] <theBear> that's been pretty common in <$3 chips for years now
[11:46:17] <twnqx> was news to me
[11:56:35] <beaky> hello
[11:56:46] <beaky> why does my avr not work?
[11:56:59] <theBear> solar flares
[11:57:16] <theBear> oh wait, i mean if you ask a reasonable question, you'll get a reasonable answer
[11:58:19] <specing> (otherwise possibly no answer at all)
[11:58:33] <beaky> it fails to respond to my programmer thing :(
[11:58:40] <beaky> but my friends' avr works just fine
[11:58:57] <theBear> you just swap the chip, or a board ?
[11:59:04] <beaky> just the chips
[11:59:14] <theBear> have you recently programmed some fuse settings ?
[11:59:23] <beaky> no I bought it new
[11:59:31] <theBear> hmmm, sounds broken
[11:59:36] <specing> Is it pin compatible?
[11:59:45] <theBear> oh yeah, is it the same chip ?
[11:59:59] <beaky> yes I am using the same chip as my friend (the atmel avr atmega16)
[12:00:15] <theBear> and you didn't get it preprogrammed for some purpose ?
[12:00:23] <beaky> nope
[12:00:30] <theBear> hmmm, sounds broken
[12:00:35] <beaky> I bought three similar chips, and all are broken
[12:00:37] <beaky> I guess
[12:00:48] <beaky> I am an unlucky dude :(
[12:01:22] <specing> can he program them?
[12:02:01] <beaky> yes he can only program his own chips (and my programs run just fine on them :D)
[12:02:14] <beaky> my chips won't wake up :(
[12:02:52] <theBear> huh ? what kinda programmer you got ?
[12:03:20] <beaky> it's some board with a chip socket and a usb socket
[12:03:39] <specing> Now that was specific
[12:03:50] * specing hands the award to beaky
[12:03:55] <beaky> what programmer am I supposed to use with my chip?
[12:04:05] * beaky is completely new to mcu development
[12:04:14] <beaky> and has burned his friends chips many times
[12:04:52] <theBear> dare i ask, did you just call the local electronics supplier and say "i want a board with a chip socket and a usb socket" and they said "yeah sure, we'll send it right over"
[12:05:01] <beaky> yeah that's what I did
[12:05:25] <theBear> bullshit
[12:05:26] <specing> fool
[12:05:29] <beaky> :(
[12:06:04] <thetruthisoutthe> tzanger<= can you tell me how a keyboard should initialize after boot ?
[12:06:36] <beaky> how do you guys buy your chips and programmers?
[12:06:51] <beaky> maybe I should order another one (from a different dude)
[12:06:56] <theBear> we look them up then order them by name/stock number
[12:07:08] <thetruthisoutthe> hey theBear
[12:07:18] <theBear> dude ? a dude isn't an electronics supplier... we can't help you if you won't help us help you
[12:07:33] <theBear> hello truthdude
[12:08:02] <beaky> so I should order my stuff directly from atmel? :D
[12:08:23] <theBear> atmel aren't an electronics supplier
[12:08:27] <theBear> they make chips
[12:08:30] <beaky> ah
[12:09:01] <theBear> why do i get the feeling i'm being messed with here ?
[12:09:14] <inkjetunito> beaky :D
[12:09:19] <beaky> hello
[12:09:22] <inkjetunito> lo
[12:11:38] <cart_man> BHAHAHAHAH
[12:11:46] <cart_man> sounds like stk600 though
[12:11:51] <beaky> ah
[12:11:56] <beaky> so it's a defect in the chip?
[12:12:16] <theBear> "board with a chip socket and usb socket" sounds like anything ? damn, cartman must be psychic
[12:12:17] <specing> Its the common PEBKAC problem
[12:12:33] <theBear> what, the one where i can never remember what that acronym means ?
[12:12:47] <beaky> PEBKAC means it's my fault
[12:12:47] <specing> yeah
[12:12:58] <theBear> yeah, but the same problem stands
[12:13:08] <theBear> oh, keyboard, between
[12:13:10] <theBear> something something
[12:13:11] <beaky> "Problem Exists Between Keyboard and Computer"
[12:13:13] <theBear> chair
[12:13:16] <beaky> or chair
[12:13:26] <specing> PEBKAC is one specific ID 10-T problem
[12:13:40] <theBear> id 10-t ? is that one of those liquid metal robots ?
[12:14:09] <beaky> but how didd I break my chip?
[12:14:11] <beaky> did*
[12:14:35] <specing> Dunno, visit your local psychic?
[12:15:02] <specing> Or consult the Oracle?
[12:16:27] <beaky> alright I will order an stk600 and a new chip directly from atmel
[12:17:17] <theBear> noone said you can order from atmel OR to get a stk600
[12:17:39] <theBear> maybe you should go see a doctor, ask them why you can't make sense
[12:17:46] <beaky> :( ok
[12:20:59] <theBear> if you can't make one programmer work on a new chip, there's no reason to believe getting another one will change anything
[12:21:43] <theBear> and if you can't even say what the programmer you purchased is called, we sure as hell can't help you
[12:23:38] <beaky> I wish there was a way to continue debugging my code even without a real working chip... what software emulators do you guys recommend for the ATmega16 chip?
[12:23:58] <theBear> we don't
[12:24:03] <beaky> ah
[12:24:06] <thetruthisoutthe> beaky<= if you have parallel port you can hack a dapa cable on it, and print on it with avrdude
[12:24:39] <thetruthisoutthe> ( print the flash of your atmel microcontroller )
[12:34:10] <RikusW> beaky: use your friend's programmer on your chips
[12:34:51] <RikusW> see if that works
[12:35:59] <theBear> maybe your programmer is just offended you didn't manage to learn its name
[12:36:11] <beaky> yeah :(
[12:36:17] <theBear> there's still time you know
[12:36:36] <theBear> wait, does your programmer have any other chips on it ?
[12:36:39] <beaky> my friends' programmer won't work on my chips anyway... guess the only solution to my problem is to buy new chips
[12:36:47] <beaky> yes my programmer has an atmega8 for some reason
[12:37:42] <theBear> it's just about impossible you got 3 dead chips, between everyone here we musta bought a few hundred, probably thousand chips over the years, anyone else ever had one arrive broken/dead ?
[12:38:06] <specing> nope.jpg
[12:38:51] <beaky> maybe I am an exceptionally unlucky person, or exceptionally stupid for buying a dead chip off a dude in an electronics store
[12:39:46] <thetruthisoutthe> beaky<= quite possible, ESD can damage a chip, it only takes a tiny spark from the shopkeeper's t-shirt
[12:40:10] <theBear> whaddya mean a dude ? was he loitering in the dark corners of the store with a trenchcoat filled with anonymous programmers and dirty old chips ?
[12:40:31] <thetruthisoutthe> :)
[12:40:41] <beaky> yeah
[12:41:11] <beaky> I just asked him for an atmega16, and he asked me if I wanted an "atmega16(l)" variant, and I said okay and he brought a pair
[12:42:02] <beaky> (the atmega16(l) is the economy version, right?)
[12:42:46] <thetruthisoutthe> it is the slower version
[12:43:00] <theBear> did you really just read what i just said ?
[12:43:26] <beaky> yeah
[12:44:00] <Tom_itx> no
[12:44:30] <thetruthisoutthe> Tom_itx<= here's a chance to sell another one ;>>
[12:45:34] <Tom_itx> for who?
[12:45:54] <theBear> see, a dude in a trenchcoat filled with chips and programmers, he doesn't have anywhere to go, he doesn't work at the shop, he sure as hell can't get into the stockroom
[12:46:28] <beaky> heh sorry I meant the store clerk dude
[12:46:31] <theBear> Tom_itx, this crazy guy, but i'd be hesitant to sell something to someone who can't even say what they already have, 'cos chances are it won't work and they'll complain
[12:46:47] <Tom_itx> it's right here and it's awesome: http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[12:46:50] <theBear> beaky, yeah, so to sum up, you didn't read what i said much at all
[12:47:06] <Tom_itx> everybody should have one!
[12:47:13] <Tom_itx> theBear: how was that?
[12:49:07] <theBear> Tom_itx, he can't say what the programmer he already bought is for a start
[12:49:46] <theBear> Tom_itx, he just said/agreed he bought the chip and programmer from a guy in a back corner of the store wearing a trenchcoat filled with them, etc etc
[12:49:57] <theBear> we've really tried hard to help him, but he won't help us help him
[12:50:01] <Tom_itx> named gomez?
[12:50:57] <theBear> heh, i'll check that next round
[12:51:33] <theBear> tbh, i'd buy a chip from a guy called gomez loitering anywhere shady with a trenchcoat full of chips and programmers, but i'm also sure i could get it to program :)
[12:51:56] <Tom_itx> sure you could... you're theBear!
[12:52:06] <theBear> there's no denying it !
[12:52:09] <beaky> I just found out what programmer I have! its similar to the one in this article: (basically a custom PCB thingy with a usb and a chip socket) http://www.timteatro.net/2012/03/22/beginning-atmel-avr-development-in-linux-using-avr-eclipse-avr-gcc-and-avrdude/
[12:52:25] <Tom_itx> beaky get one of mine
[12:52:29] <Tom_itx> and you won't regret it
[12:52:46] <thetruthisoutthe> beaky<= trust nobody who handles ICs with bare hands
[12:52:55] <theBear> Tom_itx, he insists that his friends avr of an identical model programs fine in his programmer, and that he has 3 new ones all of which don't work
[12:53:06] <Tom_itx> mkay
[12:53:18] <beaky> yeah I think my chips are just broken; occams razor and all that
[12:53:35] <beaky> (I touch my chips with my bare hands)
[12:53:35] <Tom_itx> first of all they'r trying to use eclipse
[12:53:46] <Tom_itx> tmi
[12:54:20] <theBear> i'm not even convinced it's anything like the one in that article, he's only assuming that having an avr and two sockets on a pcb makes it the same
[12:54:49] <Tom_itx> well it's out there if he decides to 'see the light'
[12:56:14] <thetruthisoutthe> beaky<= unfortunately you need the programmer's name to use it
[12:56:43] <thetruthisoutthe> if it is usb, though it can return an id
[12:57:56] <thetruthisoutthe> Tom_itx<= how much now?
[12:59:42] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/commerce/commerce_index.php
[12:59:46] <Tom_itx> take your pick
[13:00:45] <Tom_itx> they are both the same save the blue box
[13:03:10] <thetruthisoutthe> Tom_itx<= AtTiny10 Reset Fuse Recovery Board < haha nice
[13:03:27] <Tom_itx> if you want one pm and i'll combine shipping
[13:03:44] <Tom_itx> don't have an option for that yet
[13:07:34] <beaky> Do function pointers or pointer indirection have a lot of overhead in the avr platform?
[13:09:59] <beaky> http://ideone.com/ZNeAgy my program profusely uses them
[13:10:21] <LoRez> can you even do that in a harvard architecture model usefully?
[13:11:31] <beaky> ah right; I keep forgetting that avr is so different from conventional platforms
[13:11:41] <beaky> i.e. the Von-neumann monstrosity that is x86
[13:12:08] <beaky> I like to treat my functions as data
[13:13:46] <beaky> my mind is blown
[13:14:41] <beaky> what is programming like when functions and data are completely separate?
[13:15:25] <Badaboom> Hello
[13:15:27] <theBear> kinda the same, i sit in my chair and wiggle my fingers
[13:16:04] <beaky> the mentality and approach under the Harvard architecture might be different
[13:16:08] <Badaboom> interesting
[13:17:22] <Badaboom> thebear: did you say you are in school?
[13:18:26] <theBear> i haven't been in school for a very long time
[13:18:44] <Badaboom> oh sorry, i have u mixed up with someone else then
[13:18:53] <theBear> tho now i'm crippled i'm looking into options... i like to learn
[13:19:31] <Badaboom> were you serious about the 232's?
[13:22:21] <thetruthisoutthe> beaky<= well i program my atmel the same way as i do my linux pc in C using gcc, also program using make && make install
[13:22:35] <thetruthisoutthe> do they differ that much ?
[13:23:22] <Badaboom> theBear: you teased me about sending you some yesterday
[13:23:40] <theBear> i'm not against them, but i can't do anything like offer to pay postage either.. i got a special extension on my powerbill today so it doesn't get cut off, that extension is about a week after the next bill will arrive... i got about a cup of rice and 6 bits of frozen bread and a litre of milk, i run out of fresh tobacco today, have less than $2 and don't get any money till wednesday
[13:23:56] <theBear> being crippled sucks balls
[13:24:35] <Badaboom> man,, sorry to hear that,, i could send a couple dips and soic's regular mail
[13:24:56] <theBear> i'm easy, it's hard to be worried about ics when yer hungry
[13:25:05] <Badaboom> god only knows i have enough packing material form free samples
[13:25:18] <theBear> heh, naughty naughty :)
[13:25:29] <Badaboom> naa:)
[13:25:46] <Badaboom> Oh btw, got my max7219 working late last night
[13:25:56] <theBear> whats a 7219 do ?
[13:26:25] <Badaboom> Its a display driver for a 7 segment display up to 8 digits
[13:26:46] <theBear> ooh, fancy
[13:27:02] <theBear> matrixed or err, not matrixed ?
[13:27:25] <Badaboom> but i found a display with only 7 digits from an old motorola cell phone years ago and finally got it working last night
[13:27:44] <Badaboom> It uses charlieplexing
[13:28:03] <Badaboom> ill photo it here in a minute
[13:29:02] <theBear> charlieplexing eh ? that's an interesting approach for 7segs
[13:29:34] <Badaboom> yep,, the concept was invented by an engineer at maxim years back
[13:30:04] <Badaboom> oh,, just dont laugh at my wiring
[13:30:23] <thetruthisoutthe> Badaboom<= i'd use a lookup table instead and some fets to drive more leds
[13:30:30] <theBear> i know what it is, just odd for 7segs
[13:31:07] <Tom_itx> yeah most are common anode or cathode
[13:31:09] <Badaboom> thetruthisoutthe: yeah i thought about that originaly
[13:31:09] <thetruthisoutthe> also you can use a demultiplexer like 74ls138 to select digits
[13:31:11] <Tom_itx> might make it harder
[13:32:25] <thetruthisoutthe> Badaboom<= well you need to select the common pin, and connect every digit's segment the same way, and cycle through all with the correct value to display
[13:32:31] <thetruthisoutthe> that is easy
[13:32:50] <Badaboom> oh ok
[13:33:09] <Badaboom> well hell, im learning alot
[13:33:18] <thetruthisoutthe> but if it is an LCD, then you must apply 50-100Hz AC signal to it with 50.0% duty
[13:33:25] <Badaboom> spent way to much time on it last night,,lol
[13:33:27] <thetruthisoutthe> it is more complex
[13:34:02] <Badaboom> do you know the difference in the 6915 vs the 7219?
[13:34:20] <thetruthisoutthe> no idea, never even thinked about using one
[13:34:29] <Badaboom> ahh ok
[13:36:00] <Badaboom> I love the attiny2313 i know its older but its so versatile
[13:36:22] <beaky> should I return 0 in my avr programs?
[13:36:22] <theBear> it's not older, the 90s2313 is older
[13:36:30] <beaky> (even if I never actually retur from main thanks to a busy loop?
[13:36:50] <theBear> what are you going to return to ?
[13:36:58] <Badaboom> theBear: thats what i started out with the at90s2313
[13:37:21] <twnqx> beaky: if it silences the compiler warning...
[13:37:26] <beaky> nowhere, but standard C says main should be declared as returning int, and it should have a return statement somewhere
[13:37:29] <beaky> ah
[13:37:49] <thetruthisoutthe> Badaboom<= take an atmega48 then
[13:38:17] <Badaboom> thetruthisoutthe: i just ordered some atmega328's and 644's
[13:38:33] <thetruthisoutthe> what are you building ?
[13:38:58] <Badaboom> Just wanted to follow this course online from cornel
[13:39:06] <Badaboom> they use those 2
[13:39:10] <thetruthisoutthe> beaky<= you do not have to return anything, you can use void in them
[13:39:17] <beaky> ah thanks
[13:39:22] <thetruthisoutthe> just return;
[13:39:36] <beaky> I guess standard C says its okay for a freestanding implementation
[13:40:06] <beaky> but avr-gcc won't shut up :(
[13:40:20] <thetruthisoutthe> like i said i program my atmel micro the exact same way as i do on my pc, it only has size and memory, and computing power limitations
[13:46:12] <thetruthisoutthe> beaky<= http://pastebin.com/q1DtMUJY < here, my first code for atmel mcu
[13:49:54] <beaky> is it a bad idea to use _delay_ms?
[13:52:56] <thetruthisoutthe> it makes the flashing slow so you can notice it.
[13:53:26] <Badaboom> I use _delay_ ms (x)
[13:54:25] <beaky> my professor said that real programmers don't use it
[13:54:36] <beaky> and use timer interrupts and a hand-rolled state machine instead
[13:55:20] <twnqx> i use both, whatever suits the situation better
[13:55:30] <Tom_itx> both have their place
[13:55:39] <thetruthisoutthe> beaky<= well i do not use this in an interrupt
[13:55:41] <beaky> ah
[13:55:43] <Tom_itx> ask him if he's a real programmer
[13:55:54] <thetruthisoutthe> interrupts will interrupt your delay in the mainloop btw
[13:55:54] * Badaboom just found out hes not a real boy
[13:56:16] <Tom_itx> you are just a cloned alien
[13:56:16] <beaky> maybe my professor was mistaken though :D
[13:56:24] <Tom_itx> they're never wrong
[13:56:31] <Tom_itx> until you get your final grade
[13:56:33] <beaky> (and that _delay_ms is actually used in production code)
[13:56:33] <Badaboom> lol
[13:56:37] <beaky> hah
[13:57:11] <twnqx> well, don't use _delay_ms in interrupt handlers. that would be bad.
[13:57:55] <twnqx> and be aware that the precision of the delay will probably not be precise in a real environment because of interrupts
[13:58:43] <beaky> right; I guess using the hardware timers give more precise control
[13:58:44] <thetruthisoutthe> twnqx<= hopefully an interrupt will not cause large problems if the led flashes for 1030ms instead of 1000ms :)
[13:59:31] <twnqx> beaky: yes, but it gives you other challenges.
[14:00:12] <twnqx> i know my production code _is_ pretty bad :P
[14:00:16] <Badaboom> thetruthisoutthe: the 2 atmegas i mentioned are good? (328 and 644)?
[14:00:21] <twnqx> 99% runs inside interrupt handlers
[14:00:41] <twnqx> and main is mostly... while (1) sleep ();
[14:00:44] <thetruthisoutthe> don't know of the 644, but i like the 328 (168) series
[14:00:58] <Badaboom> ahh ok
[14:01:05] <beaky> a lot of my code also runs inside interrupts too...
[14:01:13] <beaky> what should I do? :(
[14:01:26] <Badaboom> thetruthisoutthe: i also have here the atmega 128 and 2560
[14:01:30] <twnqx> hope that it doesn't take too long :P
[14:01:49] <thetruthisoutthe> beaky<= what you want to do? avoid a delay? program a timer, and count overflows
[14:02:11] <beaky> so you can program a separate timer from the builtin one?
[14:02:19] <thetruthisoutthe> sure
[14:02:33] <thetruthisoutthe> increment a variable at every timer1 overflow for example
[14:02:37] <twnqx> my timer code has the option to register events
[14:02:44] <twnqx> and uses function callbacks
[14:03:44] <beaky> how do callbacks work in a harvard architecthure?
[14:03:56] <beaky> I thought procedures and data were completely segregated
[14:04:32] <beaky> or maybe I have the wrong idea
[14:04:39] <twnqx> not really
[14:05:10] <Badaboom> does anyone know where i can to make this display scroll for the heck of it?
[14:05:30] <Badaboom> ie: example code?
[14:05:39] <twnqx> each addressable ram cell has an address of 0-65535 (8bit), each addressable flash cell has an address of 0-65535 (16bit each)
[14:05:40] <thetruthisoutthe> hd44780 ?
[14:05:48] <thetruthisoutthe> Badaboom
[14:05:54] <twnqx> that's why you have up to 64kB RAM but up to 128kB flash in the AVRs
[14:06:03] <Badaboom> thetruthisoutthe: no the 7seg 7digit i mentioned
[14:06:12] <thetruthisoutthe> what you mean by scroll ?
[14:06:21] <twnqx> if an address is used as a read/write operation, in refers to ram, if it's call/jmp it's flash
[14:06:29] <Badaboom> thetruthisoutthe: like one of the advertisement signs
[14:06:37] <Badaboom> left to right
[14:06:38] <twnqx> (exception: LPM, which reads from flash)
[14:06:46] <Tom_itx> put the segments in a loop counter
[14:06:53] <Tom_itx> incrementing them as you loop
[14:06:55] <thetruthisoutthe> Badaboom you use a microcontroller to control it ?
[14:07:09] <Badaboom> thetruthisoutthe: attiny23123
[14:07:12] <Badaboom> err 2313
[14:07:40] <thetruthisoutthe> ok, you select the digits one-by-one, just select the next one, and the digit is shifted...
[14:07:54] <Badaboom> oh ok
[14:08:20] <Badaboom> its that simple?
[14:08:23] <thetruthisoutthe> i'd use a display buffer though, and the display routine reads it
[14:08:32] <Badaboom> kk
[14:08:40] <thetruthisoutthe> want to scroll? just move all bytes one right
[14:08:53] <Badaboom> lol, i was so happy just to see it finally work last night
[14:09:09] <Badaboom> makes sense
[14:09:18] <twnqx> or make the display buffer a ringbuffer and shift the start
[14:09:25] <thetruthisoutthe> :)
[14:09:28] <thetruthisoutthe> yea
[14:09:43] <Badaboom> i gotta alot of reading to do,,lol
[14:10:36] <thetruthisoutthe> want to see some real advanced debug code? :) http://pastebin.com/EY19wzjA
[14:10:43] <Badaboom> sure
[14:10:47] <thetruthisoutthe> one RGB led output bytes
[14:11:28] <Badaboom> i have an rgb
[14:11:33] <Badaboom> hrmm
[14:11:34] <Badaboom> lol
[14:11:57] <twnqx> thetruthisoutthe: does it ouput three bits at once, then?
[14:12:01] <twnqx> output*
[14:12:55] <thetruthisoutthe> only one :) it does 2 methods
[14:13:11] <thetruthisoutthe> Green is 1, Red is 0 both ways
[14:13:30] <Badaboom> thetruthisoutthe: will that run on a 2313?
[14:13:31] <thetruthisoutthe> like a neat ttl level display pen
[14:13:34] <thetruthisoutthe> sure
[14:13:45] <thetruthisoutthe> just substitute ports...
[14:13:46] <Badaboom> mind if i mess aroun with it?
[14:13:58] <thetruthisoutthe> go on
[14:13:59] <Badaboom> kk
[14:14:26] <Badaboom> sub ports? it has d
[14:14:33] <thetruthisoutthe> i used this to hang all interrupts, and freeze the code while displaying some variable values
[14:14:56] <Badaboom> b is betetr aligned tho
[14:15:49] <thetruthisoutthe> use whatever port you connect your leds to, that code now assumes portd as output
[14:16:05] <Badaboom> rgr,, ty
[14:16:47] <thetruthisoutthe> i have used an RGB led in one 5mm package, it has 4 pins, one common +
[14:17:03] <thetruthisoutthe> ( or common - )
[14:17:10] <Badaboom> the one i have is common anode
[14:17:19] <Badaboom> so yeah +
[14:17:36] <thetruthisoutthe> then swap the on-off states and will work fine
[14:17:47] <Badaboom> I bought a bunch from china but wasnt very impressed
[14:19:13] <thetruthisoutthe> yeah they suck at color mixing
[14:19:45] <twnqx> :/
[14:19:59] <twnqx> i was looking at that too, and came to the same conclusion
[14:20:52] <Badaboom> difused is definitly the way to go for color mixing
[14:21:09] <twnqx> find me one :X
[14:21:12] <thetruthisoutthe> :)
[14:21:25] <thetruthisoutthe> wonder why they are hard to find
[14:21:35] <Badaboom> yeah,, good question
[14:21:43] <Badaboom> well aside from RS
[14:21:57] <thetruthisoutthe> everybody needs the crap colormixing type ?
[14:22:04] <thetruthisoutthe> the water clear lens
[14:22:08] <Badaboom> lol
[14:22:11] <Badaboom> roflmao
[14:22:15] <Badaboom> its so true
[14:22:25] <Badaboom> and and...
[14:22:36] <Badaboom> your lucky if all 3 colors work
[14:22:51] <thetruthisoutthe> wondering if one would sand the led lens with a sandpaper it'd become opal
[14:22:54] <Badaboom> 1 out of 10
[14:23:03] <Badaboom> lol
[14:23:13] <thetruthisoutthe> or they need some acid
[14:23:16] <thetruthisoutthe> i don't know now
[14:23:18] <Badaboom> Im willing to try on one here
[14:23:33] <Badaboom> I have enough of them
[14:23:38] <thetruthisoutthe> it is some kind of clear epoxy
[14:23:48] <thetruthisoutthe> so easy to scratch with a fine sandpaper
[14:24:10] <Badaboom> nail polisg remover?
[14:24:15] <Badaboom> polish
[14:24:23] <thetruthisoutthe> hmm, not sure it does anything with the epoxy
[14:24:29] <Badaboom> hmm
[14:24:42] <thetruthisoutthe> you mean acetone right?
[14:24:46] <Badaboom> yes
[14:25:00] <thetruthisoutthe> that dissolves your keyboard, but the led would survive i think
[14:25:09] <Badaboom> lol
[14:26:31] <Badaboom> Im gonna grab some late lunch and go to the store but ill be back shortly, thanks thetruthisoutthe
[14:26:40] <thetruthisoutthe> yw
[14:28:00] <thetruthisoutthe> twnqx<= i found that both versions are easy to read if you see colors well :)
[14:28:13] <thetruthisoutthe> 1 bit per iteration
[14:28:29] <thetruthisoutthe> no short/long pulse thing, only byte spacing
[14:28:39] <twnqx> you know
[14:28:44] <twnqx> i'll stick to rs232 :P
[14:28:58] <thetruthisoutthe> this is for you to read 8 bits from the led haha
[14:32:07] <twnqx> i like y ascii output better
[14:32:10] <twnqx> i mean
[14:32:31] <twnqx> tacking two color-sensitive phototransistors to the led to decode the signals.. nah
[14:34:09] <thetruthisoutthe> :)
[14:35:10] <thetruthisoutthe> depends on what you want to 'debug'
[14:35:49] <twnqx> i have four single LEDs and rs232
[14:38:00] <thetruthisoutthe> twnqx<= my other idea was to connect a piezo, and use more tones
[14:38:14] <thetruthisoutthe> but this required little time, and was fine
[14:56:54] <beaky> a pin on my chip got snapped off :(
[14:56:58] <beaky> what do i do?
[14:57:26] <thetruthisoutthe> use SMD and ISP
[14:57:44] <twnqx> solder it back on
[14:58:06] <twnqx> are avrs hard to get in the UAE?
[14:58:15] <beaky> no
[14:58:42] * twnqx never saw an electronics shop in dubai
[14:58:48] <twnqx> then again, i never really looked
[14:58:48] <thetruthisoutthe> hahaha
[14:58:57] <thetruthisoutthe> beaky<= you are in the UAE ?
[14:59:08] <twnqx> at least his IP is
[14:59:09] <beaky> there are electronics stores there, but its insane
[14:59:46] <thetruthisoutthe> twnqx<= they do not need shops, one click on a laptop (or phone) and they come with cargo-planes and drop the crops in the middle of the desert
[14:59:55] <twnqx> you should get a soukh (+-spelling) for electronics components
[15:00:08] <twnqx> like shenzen or tokyo :>
[15:00:19] <twnqx> now that would be fun
[15:01:01] <thetruthisoutthe> arabs bring palm-trees and watering systems into the desert
[15:01:08] <thetruthisoutthe> $$$ there
[15:01:19] <twnqx> you obviously never were there
[15:01:34] <twnqx> hm
[15:01:38] <thetruthisoutthe> yea
[15:01:42] <twnqx> you have obviously never been there?
[15:01:47] <twnqx> which one is correct in english :S
[15:01:59] <beaky> both
[15:02:14] <twnqx> ok :)
[15:03:16] <Fleck> http://www.rlocman.ru/i/Image/2010/01/27/10.gif << is this a good idea?
[15:03:53] <twnqx> is that...
[15:04:02] <Roklobsta> why didn't atmel just put a 16550 into the avr
[15:04:02] <twnqx> serial to isp? :S
[15:04:14] <Fleck> yep
[15:04:19] <twnqx> Roklobsta: because 16450s are noot enough
[15:04:23] <twnqx> good*
[15:04:36] <twnqx> yeah, a little higher interrupt load, bus ok
[15:05:21] <twnqx> but ok*
[15:05:25] <twnqx> :/
[15:05:29] <Fleck> :)
[15:05:50] <twnqx> anyway, Fleck: no idea how that would work
[15:06:26] <twnqx> probably very slow
[15:06:26] <Fleck> ok :)
[15:06:33] <Fleck> I don't like the idea too :P
[15:07:19] <twnqx> i bought from olimex once
[15:07:24] <twnqx> probably first AND last time
[15:10:41] <beaky> wow avr programs are tiny compared to normal programs on my pc
[15:10:43] <beaky> why is that?
[15:10:52] <twnqx> heh
[15:10:59] <beaky> even hello world takes 1MB on my machine
[15:11:00] <twnqx> no graphics included
[15:11:04] <twnqx> Oo
[15:11:07] <dunz0r> beaky: Because they contain so much less stuff.
[15:11:14] <dunz0r> No giant glib etc
[15:12:10] <twnqx> libraries make the biggest difference
[15:12:40] <twnqx> -rwxr-xr-x 1 charlie users 8046 May 16 21:57 hello
[15:12:49] <twnqx> then again, my compiled hello, world isn't THAT big
[15:15:20] <Roklobsta> but it needed a whole OS to work.
[15:20:00] <twnqx> pfff
[15:20:15] <twnqx> the OS is convenient
[15:20:20] <twnqx> i wouldn't want to chat on an AVR
[15:20:23] <twnqx> though
[15:20:34] <twnqx> does any of you know the demo scene?
[15:22:00] <twnqx> http://www.youtube.com/watch?v=sNCqrylNY-0 <- the things you can do with a mega88
[15:23:14] <twnqx> always wanted to build that :X
[15:34:49] <Trieste> Okay, this is a goddamn stupid problem, but I'm getting pretty desperate now
[15:35:11] <Trieste> http://pastie.org/private/2qrzewxwnqhxkqtjojf6q
[15:35:48] <RikusW> twnqx: I'd be happy if I can display 10sec of that vid ...
[15:36:08] <Trieste> that code is supposed to write the averaged measurement to address 0 when the LED is on, and to 2 otherwise, but somehow it always ends up the other way around
[15:36:16] <twnqx> RikusW: http://www.linusakesson.net/scene/craft/ downloads there
[15:37:28] <twnqx> Trieste: maybe that's because you turn the led on when color==0? :>
[15:37:38] <twnqx> or hm
[15:37:51] <twnqx> i can't even judge since i don't know the polarity you connected it...
[15:37:58] <Trieste> 1 = on
[15:38:10] <twnqx> so 0 turns it on
[15:38:12] <twnqx> weird setting
[15:38:21] <Trieste> no?
[15:38:25] <Trieste> 1 turns it on
[15:38:34] <Trieste> oh, you mean the "color" variable
[15:38:38] <Trieste> right, yes, sorry
[15:41:14] <twnqx> are you sure about the LEDs being on?
[15:41:18] <twnqx> with 1
[15:41:45] <Trieste> actually yes, I just loaded up a simple program that turns on the LED, and it does that
[15:41:59] <Trieste> I mean, it works as expected
[15:44:17] <RikusW> twnqx: that vid is amazing
[15:45:39] <twnqx> all realtime on a 20mhz avr :P
[15:46:39] <Badaboom> Im back
[15:49:19] <twnqx> RikusW: if he wouldn't use pure software VGA output i guess he could do better, that doesn't even have c64 level :P
[15:56:18] <megal0maniac> twnqx: The LEDs slot into tiny holes in the case. The legs are still like 2-3cm long so they have lots of room to bend. They weren't in the slots, except for the power LED, so I couldn't see them.. :)
[15:56:34] <twnqx> ;)
[15:56:56] <megal0maniac> So the LEDs were coming on as expected, but they were hiding. Makes much more sense now :P
[15:58:00] <RikusW> megal0maniac: saw that demo vid ?
[16:09:59] <megal0maniac_afk> megal0maniac is sitting in a netsplit. 159 users, which suggests that I'm all by myself :)
[16:27:29] <Badaboom> thetruthisoutthe: you around?
[16:28:00] <thetruthisoutthe> since c0d1ng
[16:28:19] <Badaboom> i found some rgb's ill pm you the link
[16:29:06] <thetruthisoutthe> do you think i can not find rgb leds ?
[16:29:26] <Badaboom> lol,, no you mentioned earlier about finding some
[16:29:29] <thetruthisoutthe> i just bought these clear ones because it was the only stock in local shop
[16:29:36] <Badaboom> ahh
[16:29:57] <thetruthisoutthe> i already have a few typenumbers for opal types from manufacturer
[16:30:05] <thetruthisoutthe> want 10k pieces ?
[16:30:05] <Badaboom> ok
[16:30:18] <Badaboom> wow 10k?
[16:30:49] <thetruthisoutthe> i think the minimum order is like 1k
[16:31:05] <OndraSter__> :)
[16:31:14] <OndraSter__> are there RGB (as in each line) bar graphs?
[16:31:15] <Badaboom> I was always curious about that led cube hanging from the ceilig..the one they built in japan
[16:31:19] <OndraSter__> I don't remember ever seeing any
[16:31:57] <cart_man> lol
[16:31:57] <cart_man> 1K
[16:32:06] <Badaboom> Ive never even heard of a bar graph using rgb:)
[16:42:41] <megal0maniac> cart_man: Do you have iburst or something? :P
[16:46:02] <twnqx> thetruthisoutthe: gimme a price for 4k
[16:47:28] <twnqx> cart_man: https://www.youtube.com/watch?v=f1YNyQqbiF0
[16:47:30] <twnqx> 32k leds.
[16:48:05] <thetruthisoutthe> twnqx<= take your pick http://www.kingbright.com/product_main1.php?product01=20050504115206&product02=20050530015744&lang=English#20050530015744
[16:48:43] <megal0maniac> You get LEDs in SOT-23?
[16:49:07] <megal0maniac> Guess it makes sense for bi-colour, but single?
[16:50:31] <thetruthisoutthe> and here are the through hole types http://www.kingbright.com/product_main_1.php?product01=20050504115300&product02=20050527093131&level=20050527023218&lang=English
[16:51:00] <thetruthisoutthe> L-154A4SURKQBDZGW < this is the white diffused type
[16:52:47] <twnqx> ah, 5mm not smd
[16:53:42] <thetruthisoutthe> yea ;/
[16:53:55] <thetruthisoutthe> but it can be mounted at board edge
[16:54:25] <twnqx> 60° angle is also not particularly great
[17:02:06] <thetruthisoutthe> twnqx<= yea, i have that now in the water-clear version it was like $0.5 /ea in low quantity locally
[17:02:52] <thetruthisoutthe> twnqx<= hmm, now only need transparent wires, and very small led chips (or transparent oled things) and you have a 3d display
[17:07:24] <twnqx> just use 0.14mm copper
[17:07:33] <twnqx> should be able to carry the load for a LED
[17:14:49] <Hotroot> Back with a quick noob question about parts in general. I've noticed part names can have abbreviations before and after. Sometimes the after seems to indicate pin type, sometimes not.
[17:15:50] <Hotroot> Like for this shift register, SN74HC595N and M74HC595B1R. One is made by STI, the other by TI, but they have the same exact picture.
[17:16:36] <twnqx> the ending with usually change with the form
[17:17:05] <twnqx> like i made a mistake and order TI's 74ahc...PWR
[17:17:14] <twnqx> and got a TSSOP instead of the SOIC i wanted :X
[17:17:40] <Hotroot> twnqx: That's what I noticed too, but these two are exactly the same. Same picture, same tech specs.
[17:17:58] <twnqx> well, standard chips can be made by several manufcaturers
[17:18:01] <Hotroot> N seems to indicate DIP, but "B1R" is the same
[17:18:15] <twnqx> sure, every vendor chooses their own names :P
[17:18:18] <Hotroot> twnqx: Right, but shouldn't that just account for one half?
[17:18:36] <Hotroot> Ehh...Would be a nice standard. Company/Part/type
[17:18:38] <twnqx> i think the 74 series is jedec standardized
[17:19:18] <Hotroot> Even part number does not exactly guarantee the same, right? Different voltage limits, etc?
[17:19:37] <twnqx> that's the HC, AHC, ...
[17:21:40] <Hotroot> Okay, so temperature variances is all I really need to expect, aside from pin types?
[17:21:56] <twnqx> yes
[17:21:57] <Badaboom> thetruthisoutthe: the question i asked earlier << is left and >> is right in shifting bits for the scrolling screen correct?
[17:22:17] <Hotroot> Awesome. I really like that Newark has pictures for everything, because many don't and it makes this rough
[17:22:25] <twnqx> be careful
[17:22:28] <twnqx> read the datasheets
[17:22:29] <Hotroot> Otherwise I would never have noticed these pin differences
[17:22:46] <twnqx> i knew about them and STILL failed :P
[17:22:52] <R0b0t1> Badaboom: Would you really expect << to be right shift?"
[17:22:57] <Hotroot> twnqx: What part of the data sheet did you fail on?
[17:23:01] <thetruthisoutthe> Badaboom<= yes. << shifts up
[17:23:02] <twnqx> i noticed when i put the chip on the printout of the PCB before ordering :P
[17:23:06] <Badaboom> lol,, sorrt reverse
[17:23:17] <Badaboom> siggh
[17:23:20] <Hotroot> twnqx: What was wrong?
[17:23:32] <twnqx> i accidently ordered tssop instead of soic
[17:23:57] <thetruthisoutthe> Badaboom<= but id just use 8 bytes to store the digits, and cycle through them, displaying
[17:24:07] <twnqx> half the pin spacing :P
[17:24:11] <Hotroot> Ah
[17:24:13] <Badaboom> gotcha
[17:24:19] <Hotroot> DIP is what I need to worry about for breadboard, right?
[17:24:26] <twnqx> what you want, yes
[17:24:52] <thetruthisoutthe> Badaboom<= or use more bytes, and define a display start, so you can display a window.
[17:24:56] <Hotroot> Right, awesome. And things like LED's, as long as it's a little metal stick I'm basically good?
[17:25:13] <twnqx> "mostly"
[17:25:14] <Hotroot> Or are there more specific things to watch for also
[17:25:20] <Hotroot> Like pin names
[17:25:25] <twnqx> sure, forward voltage & current
[17:25:31] <Badaboom> ok
[17:25:37] <twnqx> so you you need the right resistors :P
[17:25:43] <Hotroot> twnqx: Right, I just meant pin wise
[17:26:01] <thetruthisoutthe> i have 5 of this 7 segment things too, i'd hook it up for something :)
[17:26:26] <Hotroot> twnqx: But even DIP seems to be non BB compatible sometimes, because the pins don't go straight down
[17:26:35] <Badaboom> I love this one because its very small
[17:26:41] <thetruthisoutthe> they have a dot too
[17:27:00] <twnqx> Hotroot: matter of force.
[17:27:00] <Badaboom> no dp on this one but..
[17:27:09] <Hotroot> twnqx: But with BB I want straight down
[17:27:27] <thetruthisoutthe> like a freq meter, digital timer/temperature controller
[17:27:29] <twnqx> haven't seen other forms on leaded LEDs yet
[17:27:36] <Badaboom> it has 7 indication leds on top 1 green 1 double green 1 red double and 1 yellow double
[17:29:13] <Badaboom> It came out of an old motorola doc550 flip phone
[17:29:22] <Badaboom> dpc even
[17:30:09] <Tom_itx> abcminiuser are you good with linux makefiles?
[17:30:32] * twnqx wrote a 700 lines one that is for video encoding
[17:30:36] <twnqx> total abuse of make.
[17:34:11] <Trieste> wait, if a timer runs at say, F_CPU/128, does that mean that it's value increases F_CPU/128 - times every second?
[17:34:14] <Hotroot> twnqx: How does that take 700 lines? Converting NES ROM to HD video?
[17:34:34] <Trieste> (it's getting late here and I'm not sure if my reasoning is correct)
[17:34:38] <twnqx> autodetecting the source files, parsing .avs to figure out dependencies, ...
[17:38:10] <thetruthisoutthe> hah, here is the coldfusion reactor working at home! https://www.youtube.com/watch?v=sO2-tqoyGik
[17:39:53] <ambro718> for my code to work I need to know an upper bound on the number of instructions in a critical path, how is this normally handled?
[17:40:27] <ambro718> I'm talking about C - you never know what the compiler will do
[17:40:45] <Tom_itx> look at the asm output
[17:41:47] <ambro718> that isnt' very useful when someone compiles this with a different compiler or options
[17:42:12] <ambro718> is the inline asm the only option?
[17:45:30] <twnqx> no, you can have external asm files, too
[17:45:34] <thetruthisoutthe> twnqx<= ? :)
[17:45:56] <twnqx> ?
[17:46:18] <thetruthisoutthe> it could be made a 3d sphere display with more leds from the center
[17:46:42] <twnqx> well yes
[17:47:22] <thetruthisoutthe> a rotating disc with a layer of leds ?
[17:47:50] <thetruthisoutthe> problem is the rotation
[17:48:30] <twnqx> for sufficiently large discs it will be :P
[17:49:50] <thetruthisoutthe> wireless power transfer, and mount the control board
[17:50:05] <thetruthisoutthe> program it with bluetooth
[17:57:12] <thetruthisoutthe> hahaha found a nice electronic project Making an LED Throwie https://www.youtube.com/watch?v=YjTP_T-wR9w
[17:57:13] <Badaboom> that thing is fantastic
[18:01:57] <cart_man> Guys
[18:02:45] <cart_man> Just for interest sake.Why wouldnt (PINC5 == 1) work as an Input HIGH parameter?
[18:04:26] <Tom_itx> you read PINC
[18:04:40] <seldon> PINC5 is just #define PINC5 5. Try (PINC & _BV(PINC5)) != 0.
[18:05:43] <cart_man> Buts cant you just say (PINC &_BV(5)) != 0?
[18:06:05] <cart_man> So PINC5 etc are actually useless stuff?
[18:06:53] <Tom_itx> not if you're reading the pin
[18:07:26] <cart_man> So is there any other ways of reading pins seperetaly?
[18:07:44] <Tom_itx> PB5
[18:07:46] <Tom_itx> PC5
[18:07:54] <Tom_itx> is also defined as 5
[18:08:30] <ambro718> cart_man: you can write helper functions for indivudual pins. I'll probably be more efficient if you can use C++ with templates appropriately.
[18:09:15] <cart_man> PC5 = 5 or PC5 = "Actual PinC5"? yea Im thinking of going to C++
[18:09:30] <Tom_itx> pfft
[18:09:33] <twnqx> just use a few macros...
[18:09:47] <twnqx> and skip the != 0
[18:10:03] <twnqx> or == 1
[18:10:07] <seldon> The PIN[A-D][0-7] macros and others like them are largely useful for documentation. You would, for example, #define JOYSTICK_UP PINC5 in a header (or something like it) and later do if(INPUT_PIN & _BV(JOYSTICK_UP)) { stuff(); } instead of if(PINC & _BV(5)) because it is more readable.
[18:10:25] <Tom_itx> #define bit_get(p,m) ((p) & (m))
[18:10:25] <Tom_itx> #define bit_set(p,m) ((p) |= (m))
[18:10:25] <Tom_itx> #define bit_clear(p,m) ((p) &= ~(m))
[18:10:25] <Tom_itx> #define bit_flip(p,m) ((p) ^= (m))
[18:10:25] <Tom_itx> #define bit_write(c,p,m) (c ? bit_set(p,m) : bit_clear(p,m))
[18:10:30] <seldon> And if you change your circuit, you only have to change the header to make the code work again.
[18:10:30] <cart_man> Well actually I have functions that toggle seperate pins with &= 11110111; where the 0 is the bit to change
[18:10:42] <twnqx> i never got the idea of why someone would encode bit numbers instead of actual masks
[18:10:44] <Tom_itx> use those macros
[18:11:02] <seldon> It is easier to get the mask from the bit number than the other way around.
[18:11:11] <seldon> Especially in C at compile time.
[18:11:31] <twnqx> i can't argue with that
[18:11:40] <twnqx> except that i never so far needed the bit number
[18:11:41] <cart_man> OOoohhh ok I see
[18:11:43] <cart_man> Thanks Guys!
[18:12:24] <tzanger> pretty awesome atmel seminar today
[18:12:38] <Tom_itx> lucky dawg
[18:12:42] <tzanger> got a nice sam4l dev kit
[18:12:49] <thetruthisoutthe> Badaboom<= you'll like this https://www.youtube.com/watch?v=6z99H0Hiw9g
[18:12:58] <tzanger> has their radios too
[18:13:06] <twnqx> tzanger: if you figure out how to program them from linux command line, tell me
[18:13:43] <twnqx> as in, write the flash.
[18:14:46] <ambro718> cart_man: here's some C++ templates for you, http://ideone.com/7YAX7c
[18:15:15] <ambro718> I extracted it from my code, may need fixing to compile
[18:15:22] <cart_man> Sweet thanks :)
[18:15:57] <twnqx> i new that c++ made for longer code, but that...
[18:16:35] <ambro718> twnqx: it's just shortcuts for what you'd do by hand
[18:17:18] <ambro718> well be careful about the interrups though, these functions disable and reenable them
[18:17:24] <twnqx> ugh
[18:17:32] <thetruthisoutthe> lold on this hdd clock ;>> https://www.youtube.com/watch?v=5paowlfr6qw
[18:17:40] <twnqx> ambro718: ... why?
[18:18:21] <ambro718> twnqx: if main code is setting PortA1 and an interrupt happens to set PortA2 while the main code is doing that
[18:18:23] <seldon> Toggling a single pin on a port is atomic; there's no need for interrupt shenanigans.
[18:18:42] <twnqx> what seldon said, gcc emits single but setting/clearing instructions
[18:18:48] <twnqx> bit*
[18:18:53] <ambro718> seldon: how do you atomically toggle a pin?
[18:18:58] <seldon> sbi and cbi, iirc.
[18:19:03] <twnqx> exactly
[18:19:15] <ambro718> okay, then fix the code with inline asm :D
[18:19:23] <twnqx> gcc takes the structures, recognizes it, and automatically does that for you
[18:19:31] <ambro718> it isn't obvious
[18:19:32] <twnqx> just look at a disassembly
[18:20:11] <ambro718> nor am I sure if there's a guarantee if it'll always do that (consider different -O flags)
[18:20:34] <twnqx> i can tell you that it does without, with -Os and -O2
[18:20:40] <ambro718> how about -O0?
[18:20:48] <seldon> __asm__("sbi %0,%1" :: "i" (_SFR_IO_ADDR(YOUR_PORT)), "i" (PIN_NUMBER)); /* This, btw, is a place where you'd need the pin number instead of the bitmask. */
[18:20:52] <twnqx> never tried that, but would assume so
[18:20:54] <Badaboom> thetruthisoutthe: thats awesome:)
[18:21:17] <twnqx> heh
[18:21:55] <tzanger> twnqx: why wouldn't you be able to? they're arm, use gcc an jtag/swi
[18:22:08] <twnqx> and at "jtag" we go
[18:22:21] <twnqx> do you know any program that can write to atmel avrs via jtag?
[18:22:29] <twnqx> err
[18:22:29] <twnqx> atmel arms
[18:22:53] <tzanger> openocd can't talk to it? I'd be very surprised but it's possible if it couldn't
[18:24:14] <twnqx> couldn't find them in the support list
[18:25:37] <tzanger> pshaw. "support list"
[18:25:39] <seldon> http://www.nongnu.org/avr-libc/user-manual/group__avr__sfr.html <-- avr-gcc docs say PORTFOO |= _BV(PFOO); will use sbi.
[18:25:50] <tzanger> it's open source. any documentation is outdated the second it's written
[18:26:03] <seldon> Roughly middle of the page. Search for "Porting programs that use the deprecated sbi/cbi macros"
[18:26:35] <twnqx> well, i am not going to build a pcb around an avr just to later find out that i have to use some winblows GUI app to program them
[18:26:41] <twnqx> arm* again
[18:27:01] <twnqx> that might refuse to take my precompiled ihex files
[18:28:55] <twnqx> ambro718: can you at least fix your templates to overload the =, != and == operators?
[18:29:07] <twnqx> or is that not possible? i never used templates :X
[18:29:52] <ambro718> twnqx: of course, the operators need to be defined in the class that is in the macro. give me a minute
[18:30:01] <twnqx> nah, no need
[18:30:05] <twnqx> i was just curious
[18:30:58] <twnqx> because the use so far looks pretty similar to what i do with C macros :P
[18:31:26] <seldon> I'm not sold to that code, tbh. I like the idea of template magic, though; maybe to make the compiler barf if someone tries to use PA2 on PORTB or something.
[18:31:51] <twnqx> i use macro magic... not really better
[18:32:02] <twnqx> maybe even worse because undebuggable
[18:32:35] <twnqx> i recently created a macro nesting hell where the error messages always were totally wrong
[18:32:49] <twnqx> until i gave up and now use a perl code generator instead
[18:32:53] <seldon> ...
[18:33:53] <seldon> I'm afraid to ask what that macro hell was supposed to achieve.
[18:34:07] <twnqx> i was writing an emulator for a CPU
[18:34:21] <twnqx> so i encoded the instructions via macros
[18:34:52] <twnqx> automatic decoding of the instruction, adding to jump tables, generating functions with the right headers a
[18:35:02] <twnqx> nd code from vararg parameter lists
[18:35:24] <twnqx> i gave up when i couldn't have the dynamic macros i needed
[18:35:52] <timemage> twnqx, and you're doing that with perl now?
[18:35:59] <twnqx> yes
[18:36:19] <timemage> twnqx, out of curiosity, do you have it generating line directives?
[18:36:22] <twnqx> i now have perl generating my macros
[18:36:34] <timemage> ah.
[18:36:43] <twnqx> and far less nesting.
[18:37:22] <twnqx> e.g. i had macros inside macros inside macros for "abstracting" SIMD instructions
[18:38:10] * seldon casually mentions Boost.Preprocessor.
[18:38:28] * twnqx casually mentions that he generally doesn't use c++
[18:38:29] <seldon> I want to watch the world burn.
[18:38:38] <seldon> Boost.PP is plain C.
[18:38:43] <twnqx> really
[18:39:01] <seldon> Yes. The preprocessor is the same in C and C++.
[18:39:16] <OndraSter__> oh man, I read your nickname as sheldon
[18:39:24] <twnqx> well, my perl script kinda works
[18:39:35] <twnqx> though i haven't worked on it for a week or so
[18:39:40] <twnqx> but the wekeend is close :)
[18:39:47] <twnqx> and my bed near. good night
[18:39:57] <seldon> Night
[18:39:57] <OndraSter__> nn
[18:41:25] <ambro718> here's the operator version, http://ideone.com/K5rB9P
[18:42:15] <ambro718> to optimize with asm the asm would need to be written in the helper port classes in the macro
[18:43:52] <ambro718> but this one is not so easy to work with if you want to pass pins as template arguments (because the pins aren't types)
[18:43:58] <thetruthisoutthe> twnqx<= this thing might interest you it is not diffused, but only 1.6x1.6mm RGB http://www.kingbright.com/product_main_1.php?product01=20050504115206&product02=20050530015744&level=20100417110716&lang=English
[18:48:24] <Badaboom> i love that company,, was trying to think of the name to google earlier and typed lightbright..lol
[18:50:24] <Badaboom> oh by the way apparently atmel doesnt sample the 644 anymore
[18:50:48] <Badaboom> i just received my order conf and they only sent the 328
[18:50:59] <Badaboom> oh and only 2 of each type
[18:51:15] <Badaboom> but hey, thatll do just fine
[18:51:29] <Tom_itx> don't get greedy
[18:51:45] <Badaboom> no i know
[18:52:28] <Badaboom> i think ill use the atmega16u2 to interface with the 328
[18:52:39] <Badaboom> almost my own UNO
[18:57:06] <Badaboom> thetruthisoutthe: those orange ones are kinda neat
[18:57:53] <Badaboom> maybe mis red in and have a really cool fire color or lava
[18:57:57] <Badaboom> mix
[18:58:43] <Badaboom> kinda like that faucet that is aqua when cold water comes out and a lava color when hot
[18:59:18] <Badaboom> Im guessing that just a temp. sensor
[19:14:54] <Casper> look like he ran out of stamina
[19:18:01] <Valen> lol
[19:24:32] <Badaboom> did you really just go there?
[19:27:19] <dunz0r> Some one had to do it.
[19:31:21] <tzanger> undebuggable is an awesome word
[19:31:43] <Valen> probably invented by somebody looking at a perl program
[20:14:45] <Badaboom> my code looks like a cat threw up a hairball:(
[20:30:12] <R0b0t1> Badaboom, don't worry, that's normal.
[20:30:38] <Badaboom> lol..sad thing is it works:)
[21:19:11] <ambro718> hm, I bricked my atmega324a by accidentally programming it unpowered
[21:21:55] <Tom_itx> not a good idea
[21:29:07] <Badaboom> -ambro718: what code are u getting?
[21:33:22] <ambro718> avrdude: stk500v2_command(): command failed avrdude: initialization failed, rc=-1
[21:33:38] <ambro718> usbtiny programmer also fails, with only the latter message
[21:34:03] <ambro718> but don't bother, I've got 3 of these left
[21:34:56] <jadew> it's possible you screwed up the ports
[21:35:31] <Tom_itx> that err means it can't find the chip
[21:35:44] <jadew> IIRC the datasheet says the input has to be VCC +0.x
[21:35:59] <ambro718> it's definitely a bricked chip, I replaced it and the new one worked
[21:36:02] <jadew> given the fact that the VCC was pretty much 0, it's possible that 5v, screwed them up
[21:36:14] <jadew> which is why you can't control the chip anymore via ISP
[21:58:09] <GuShH> Hmm what's going on with eBay :/
[21:59:03] <GuShH> Example http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=150965125775&fromMakeTrack=true&ssPageName=VIP:watchlink:top:en if you want to check out the user's items, it says 0... but they clearly have at least 1 (which you just visited)
[21:59:57] <GuShH> Then for some reason it shows AU currency when the seller is in Hong Kong and locally in my case in Argentina, why is it even listed in AU?
[22:00:34] <GuShH> It even mentions AusPost Air Mail Parcel, which is impossible to obtain in Hong Kong.
[22:00:41] <dunz0r> Perhaps the seller listed it as such? 'Tis weird.
[22:00:54] * GuShH pouts and shrugs a few times
[22:01:04] <dunz0r> Same here btw, 0 items in the store
[22:01:36] <GuShH> I like how they ship "worldwide" except Hong Kong, which is where they are, allegedly.
[22:01:40] * GuShH facepalms
[22:03:50] <GuShH> seems they have multiple accounts
[22:03:51] <GuShH> http://www.ebay.com/itm/2-Pcs-250C-NC-250V-AC-10A-Ceramic-Thermostats-KSD301-/360512078710?pt=AU_B_I_Electrical_Test_Equipment&hash=item53f031c376
[22:09:50] * GuShH offers dunz0r a cappuccino
[22:11:17] <Badaboom> I just made the family laugh and programed some foul language into the display,, always a funny thing i guess
[22:11:34] <GuShH> heh
[22:11:48] <dunz0r> GuShH: Why thank you.
[22:11:58] <GuShH> Actually I make some mean cappuccinos
[22:12:24] <GuShH> but most people would rather drink a straight shot of espresso instead :/
[22:12:25] <Badaboom> That actually sounds good
[22:14:31] <dunz0r> I don't mind cappucinos.
[22:14:31] <Badaboom> ambro718L you need yourself a HV programmer
[22:14:46] <Badaboom> an
[22:14:46] <dunz0r> I prefer regular coffee or a double espresso though I think.
[22:15:01] <dunz0r> I mean, I'm swedish. I'll be jailed if I don't like coffee
[22:15:09] <Badaboom> lol
[22:15:30] <GuShH> :P
[22:32:21] <ambro718> lol, removing a branch makes the code larger
[22:34:56] <ambro718> has anyone done tests if -O2 actually increases speed (it does make code significantly larger)?
[22:38:19] <dunz0r> ambro718: My small tests with O2 vs Os says that the code sizes aren't that much different.
[22:38:28] <dunz0r> The ASM usually looks quite different though.ö
[22:38:31] <dunz0r>
[22:39:17] <ambro718> OndraSter__: stange, I have 3868 at -Os and 6868 as -O2
[22:39:22] <ambro718> sorry, I mean dunz0r:
[22:39:51] <dunz0r> Guess it depends on what your code contains and if it benefits from a -Os or not.
[22:39:58] <dunz0r> Or I might be mistaken
[22:48:29] <jadew> the only benefit of size optimization is smaller code, that's it
[22:53:00] <jadew> as for -O2, I guess it wouldn't be called optimization if it wouldn't improve something
[22:53:18] <jadew> and it's clearly not size oriented (even tho some optimizations might actually reduce code size)
[23:11:36] <dunz0r> I've read somewhere not to use -O0 with avr-gcc
[23:11:43] <dunz0r> Unless you're debugging.
[23:12:08] <jadew> well, that's what it's meant for
[23:13:12] <jadew> and it's the default behaviour most likely