#avr | Logs for 2012-11-21

Back
[04:24:51] <slidercrank> .tr en: :it good afternoon
[04:24:58] <slidercrank> dammit. wrong channel
[04:34:45] <darsie> How can I find out how much RAM is left in a C program?
[04:36:10] <Malinuss> darsie, you mean - how much flash ram there is left? or how much sram there is at a defined point in your code?
[04:36:27] <darsie> sram
[04:36:45] <darsie> I want to use it, but don't know how much there is.
[04:36:52] <darsie> before I get a stack collision.
[04:37:27] <Malinuss> darsie, http://arduino.cc/playground/Code/AvailableMemory
[04:37:32] <darsie> thx
[04:37:39] <Malinuss> inb4 I get kicked because arduino ;D
[04:38:16] <Malinuss> darsie, the last function is what you are looking for
[04:39:39] <karlp> alternatively, you can paint the stack with a known pattern, and then at various points examine all of ram and see how much the stack grew.
[04:40:15] <darsie> I also wouldn't mind analyzing some file manually a little.
[04:40:22] <Malinuss> karlp, urgh. Wouldn't that be very un-efficient?
[04:41:00] <karlp> inefficient as in it takes up time, yes, but very reliable in that it sees what you really did, sure.
[04:42:27] <Malinuss> I see
[04:43:37] <Malinuss> is it somehow possible to profile your avr-program, using some clever timers etc.?
[04:44:45] <karlp> probably, I just time certain sections manually
[04:47:01] <darsie> Malinuss: You could increment counters at certain points.
[04:48:02] <darsie> karlp: That's an interesting idea.
[04:51:02] <darsie> I also have ISRs.
[05:55:05] <OndraSter_> http://sphotos-a.ak.fbcdn.net/hphotos-ak-prn1/622247_10151191716494823_1413467842_o.jpg StarWars
[05:56:43] <Amadiro> OndraSter_, the girl on the left is "Charlotte Herbert", if you were wondering, I've seen her on the interwebs before
[05:56:47] <Amadiro> don't recognize the one on the right
[06:00:05] <OndraSter_> pornhub you say? :D
[06:05:11] * jadew bookmarks link: Bookmarks -> Misc -> Spankbank
[06:06:02] <Amadiro> OndraSter_, no clue if she's done any videos, I've only seen pictures of her on reddit, I believe
[06:06:35] <jadew> I don't remember them from porn
[06:14:37] <MrTrick> anyone know the c optimiser well? If I have; `void callback() { ..do stuff.. } .... void other_func( void (*f)() ) { ... if (condition) f(); ... } ....
[06:14:47] <MrTrick> and I call other_func( callback );
[06:15:02] <MrTrick> (in only one place in the project)
[06:15:21] <MrTrick> Is it going to optimise the f() call down to just a 'call' instruction?
[06:15:32] <jadew> no'
[06:15:34] <OndraSter_> MrTrick, it is stuck on customs, they want some papers from me or something
[06:15:38] <OndraSter_> she said she will email me the details
[06:15:42] <OndraSter_> no email received yet.
[06:15:54] <OndraSter_> digikey should start adding emails on the boxes
[06:15:57] <MrTrick> OndraSter_: Write "I AM NOT A TERRORIST" on a sheet of paper, and get your mother to sign it.
[06:15:58] <OndraSter_> not just phone
[06:16:03] <OndraSter_> ;)
[06:16:12] <OndraSter_> "I am not crazy. My mother had me tested!"
[06:17:16] <MrTrick> jadew; that's "no, you don't know it well" or "no, it won't work". ?
[06:17:30] <jadew> MrTrick, no it won't optimize it
[06:18:14] <Amadiro> MrTrick, I also reckon it won't (except maybe for some very simple cases?) but why not just try it out?
[06:18:34] <jadew> actually, I can vouch for that, but it wouldn't make sense to optimize it, unless for some reason it decides to make it inline and then go over it a second time and figure out that that pointer is only used once and with a fixed value
[06:18:44] <jadew> *I can't
[06:18:55] <jadew> "*I can't vouch for that"
[06:18:57] <MrTrick> Okay, any suggestions on getting a similar effect? Namely, having a library that can call functions back in project land?
[06:19:35] <jadew> #define WHATEVER_CALLBACK(x, y) blah(x, y)
[06:19:55] <MrTrick> Oh, duh.
[06:20:05] <MrTrick> That's just OBVIOUS enough to work! Bleh.
[06:20:14] <MrTrick> Thank you. :-)
[06:20:18] <jadew> np :)
[06:20:24] <Amadiro> jadew, yeah, that was what I thought of as well. Maybe it would do that for some very straightforward use-cases
[06:20:55] <MrTrick> PLUS I can wrap #ifdef around the library call, so if the project doesn't care about that event it won't go nowhere.
[06:22:43] <karlp> link time optimzation should do the right thing
[06:22:53] <karlp> and if it doesn't, you should probably justfile a bug on it.
[06:23:02] <karlp> if you have a gcc using LTO that is.
[06:24:18] <MrTrick> I think the define solution is semantically more correct; eg configuring the library to call certain project-land event handlers.
[06:25:02] <karlp> I prefer a library function that lets you register a callback. gets more help from the compiler, and to hell with the size overheards
[06:25:06] <Amadiro> karlp, looks like not even -O3 activates -flto
[06:25:18] <karlp> I'll let new chips and new compilers fix that stuff for me
[06:25:31] <karlp> yeah, lto is pretty bleeding still as I understand it
[06:25:35] <MrTrick> ooh, wait... I think that define trick won't work.
[06:26:09] <MrTrick> unless the config.h file the library includes also has the function prototypes.
[06:27:02] <jadew> MrTrick, yeah
[06:27:22] <jadew> you can do something else tho
[06:27:31] <jadew> #define CALLBACK_FUNCTION blah
[06:27:49] <jadew> #define TRUE_CALLBACK(x, y) CALLBACK_FUNCTION(x, y)
[06:28:03] <jadew> actually wait
[06:28:08] <jadew> no, it's ok
[06:28:22] <jadew> void CALLBACK_FUNCTION(int x, int y);
[06:28:24] <MrTrick> not sure why that.
[06:28:26] <jadew> in the same header
[06:28:46] <jadew> then you will have a declaration of the function in the header
[06:28:51] <MrTrick> My callbacks are pretty simple thankfully - no args.
[06:29:15] <jadew> personally, I'd just include the declaration from the config file, you don't get to be picky on AVRs :)
[06:30:29] <jadew> consider the function definition #include part of the config process
[06:31:59] <MrTrick> yeah, I will. And it's only the prototype, anyway.
[06:36:41] <MrTrick> Do you have an opinion on interrupt handlers? As in, should the library define the vectors itself, or should the ISR(...) call live in project land and call eg mylib_handle_...() ?
[06:38:01] <jadew> well, if you need anything from the user code, you have no other option
[06:38:30] <jadew> if the library needs the ISR and there's library related logic in there, you have to implement it in the library
[06:40:25] <MrTrick> yeah. The only spot where I'd have concern is if it's a shared interrupt like PCINT0... as in the lib might use one pin with the mask enabled, but user code might need to listen to another pin on PCINT0
[06:41:55] <jadew> tbh, I think this library idea is bad
[06:42:32] <jadew> you shouldn't have "libraries" but marely reusable code that you get to copy and modify to fit the purpose of the current application
[06:42:36] <MrTrick> yeah, I'm probably just contaminated from writing so much architectured code lately. (dozens and dozens of files, >50Kloc)
[06:43:15] <MrTrick> And it can definitely be taken too far...
[06:44:00] <Horologium> libraries are good if they are very very VERY well documented.
[06:44:11] <MrTrick> But no, I've got to disagree with you there. I think there's definitely a place for well-written libraries that can; 1. be configured at runtime, so no runtime overhead, 2. abstract away complexity
[06:44:27] <MrTrick> err... s/at runtime/at compile time/
[06:44:41] <jadew> Horologium, the documentation is not an issue here, but the fact that you have lots of limitations on the AVR and you need to work around them with the entire code
[06:44:48] <jadew> for example that PCINT thing
[06:45:05] <jadew> sure, maybe in some application you won't have user code that needs that interrupt
[06:45:29] <Horologium> that's part of the whole documentation thing
[06:46:06] <MrTrick> I think as a design decision, I'll take the approach that libraries don't use ISR(), just like libraries don't use main().
[06:46:26] <jadew> MrTrick, problem is, they do
[06:46:41] <jadew> like my soft usart implementation
[06:46:51] <jadew> it needs a timer interrupt, so it's defined in there
[06:46:52] <MrTrick> They can define 'void inline libname_handle_INTERRUPTTYPE();' and the user code has to call them.
[06:47:07] <Horologium> look at procyon avrlib...they use interrupts a LOT.
[06:48:13] <jadew> MrTrick, what happens if the library needs to start / stop some interrupts, or reconfigure them durring operation?
[06:48:59] <jadew> if that happens you'll have code controlling the interrupt in one side and the actual interrupt in some unrelated file
[06:50:50] <MrTrick> jadew: good point. I suppose the library should tolerate having its handler called when it's not expecting the interrupt to be enabled. For whether it can start/stop interrupts, there are often other things that can be modified to stop the interrupt in that case.
[06:51:04] <jadew> anyway, I guess whatever floats your boat is fine, on AVR whatever works best is the best option
[06:51:21] <MrTrick> eg disabling the specific pin in PCMSK2 instead of in PCICR.
[07:21:34] <Amadiro> http://s.zeptobars.ru/atmel-attiny13a-HD.jpg attiny13A
[07:23:40] <jadew> what's that?
[07:23:44] <jadew> the inside of an attiny?
[07:25:12] <jadew> I love the logo they put in there
[07:26:03] <Amadiro> jadew, yep
[07:27:05] <jadew> it looks great, sci-fi like
[07:27:51] <Malinuss> so are some of those suposed to be logical gates etc.?
[07:28:12] <Amadiro> the right side is dark because the epoxy is not properly removed there, though, from the looks
[07:28:19] <Amadiro> so you can't really see what's going on there very well
[07:28:37] <Malinuss> what about the left side?
[07:28:40] <Amadiro> http://s.zeptobars.ru/atmega8-HD.jpg atmega8
[07:29:37] <Amadiro> Malinuss, looks like the epoxy was removed there, but I don't know what that pattern there is
[07:29:40] <jadew> I can imagine an alien civilization finding a chip like that, putting it under the microscope and getting chills down their spine, while going like "HOLLY CRAP! ALIEN TECHNOLOGY!"
[07:29:56] <Malinuss> lol
[07:30:57] <jadew> must be a kick ass job to design chips
[07:31:14] <Amadiro> jadew, well, if they are advanced enough to visit us, they probably have x-ray laser eyes that can they can use to see inside all chips on earth simultaneously anyway
[07:31:52] <jadew> Amadiro, well, if they're advanced enough to visit us, they wouldn't be so surprised, I was thinking more in the terms of one of our probes crashing down on their planet
[07:32:22] <Amadiro> true
[07:32:23] <jadew> they would have to be advanced enough to have microscopes
[07:32:39] <Amadiro> or they'd eat it
[07:32:41] <Amadiro> there is nothing inbetween
[07:32:50] <Amadiro> either you put everything under a microscope, or you put it in your mouth
[07:33:53] <jadew> I watched a documentary a while ago, when the microscope was discovered, the microbes were discovered and soon after they discovered the sperm cells (really, "soon after")
[07:34:15] <jadew> they didn't have great resolution, so they figured tiny men are inside them :D
[07:35:57] <jadew> http://www.leica-microsystems.com/typo3temp/pics/17th_01_97de0c994b.jpg
[07:37:55] <jadew> totally unrelated, but extra funny :P
[07:40:04] <OndraSter__> HOLY CRAP
[07:40:11] <OndraSter__> FEDEX WANTS $80 FOR VAT AND ALL THEIR TAXES?!
[07:40:15] <OndraSter__> did they just SHIT THEIR PANTS
[07:40:18] <OndraSter__> $2.5 PER ITEM
[07:40:19] <OndraSter__> I HAVE GOT
[07:40:20] <OndraSter__> 29
[07:40:21] <OndraSter__> ITEMS
[07:40:22] <OndraSter__> ON MY LIST
[07:40:40] <jadew> that sucks
[07:40:49] <OndraSter__> it does
[07:40:56] <OndraSter__> I will try getting it through customs myself
[07:41:03] <OndraSter__> none of this $2.5 per item crap
[07:41:49] <jadew> tell them it's sand, it's worth nothing
[07:41:57] <OndraSter__> haha
[07:42:09] <OndraSter__> 29 times sand = still 29 times $2.5
[07:42:16] <OndraSter__> well, actually only 24x, first 5 are free.
[07:42:27] <jadew> oh, what a deal
[07:42:47] <jadew> slide a $10 to the vamal officer ;)
[07:43:29] <jadew> "how about we say they're just 5?"
[07:43:33] <OndraSter__> :D
[07:43:44] <OndraSter__> why would he do that if he can pass through 29 items and get bonus from that
[07:44:00] <jadew> ah, didn't consider bonuses
[07:44:18] <jadew> in here they get paid scrap so most of the time they don't even bother to open the box
[07:45:36] <jadew> "hmm... $150 in value. Yeah, it's under $100, take it and go"
[07:46:14] <jadew> (this happened when I got my keyboard)
[07:47:34] <jadew> OndraSter__, you could argue that it's just one big item
[07:47:47] <jadew> but it's DIY
[07:49:35] <OndraSter__> yeah well czech post does not bother at all either
[07:49:39] <OndraSter__> but fedex is paid a lot
[07:49:41] <OndraSter__> so they do
[07:49:41] <OndraSter__> .
[07:49:44] <OndraSter__> I could
[07:49:46] <OndraSter__> and I might
[07:49:55] <OndraSter__> I will go tax it myself
[07:49:57] <OndraSter__> tomorrow
[07:50:01] <OndraSter__> no $2.5/item fee
[07:50:07] <OndraSter__> 20 minutes by bus from my school
[08:06:39] <Tom_itx> OndraSter__ do they open the boxes?
[08:11:29] <OndraSter__> Tom_itx, no idea
[08:11:42] <OndraSter__> digikey should be adding the paper with the content on the outside somewhere
[08:12:14] <Tom_itx> they generally put the packing list inside the box
[08:13:58] <Tom_itx> how many resistors did you get?
[08:14:17] <Tom_itx> x $2.5
[08:29:22] <OndraSter__> Tom_itx, a lot :)
[08:29:25] <OndraSter__> 29 parts on the list
[08:29:30] <OndraSter__> I am going there tomorrow
[08:29:32] <OndraSter__> fuck fedex
[08:29:35] <OndraSter__> I will pay them $15
[08:29:38] <OndraSter__> and go through customs myself
[08:29:56] <OndraSter__> too bad digikey does not offer USPS Int'l
[08:30:19] <karlp> would be nice wouldn't it.
[08:30:37] <karlp> a proper reasonable decent company that doesn't partner with criminals and gangsters in other countries
[08:30:48] <karlp> oh, you thought you'd paid for shipping already?
[08:30:49] <karlp> hah!
[08:31:17] <OndraSter__> haha
[08:31:24] <OndraSter__> for shipping paid digikey
[08:31:30] <OndraSter__> I am paying for not being in mafia
[08:32:01] <karlp> here the fedex "agent" gets to charge whatever they like for working out and filing the customs/vat charges
[08:32:09] <karlp> so... they do charge whatever they like on top
[08:32:25] <karlp> and they won't explain to me how they calculate it.
[08:32:32] <OndraSter__> heh
[08:32:39] <OndraSter__> that's why I am going to the customs myself
[08:32:54] <karlp> if you can.
[08:33:04] <OndraSter__> aye
[08:33:07] <OndraSter__> 20 mins from school
[08:33:14] <karlp> my most recent import got a charge for "not being a registered customer"
[08:33:22] <OndraSter__> trololo
[08:33:38] <karlp> for almost double the customs and vat, and more than the product itself
[08:33:52] <OndraSter__> aye
[08:34:02] <OndraSter__> I am supposed to pay $80 or $90 for $200 order
[08:34:07] <OndraSter__> they really shat their pants
[08:34:25] <karlp> so what? did you refuse delivery?
[08:35:15] <OndraSter__> no, they first called me that they will send me email
[08:35:18] <OndraSter__> so I gave them my email
[08:35:29] <OndraSter__> and they sent me 9 papers to sig
[08:35:29] <OndraSter__> n
[08:35:35] <OndraSter__> and wanted me to scan my personal ID
[08:35:36] <OndraSter__> HELL NO
[08:38:08] <OndraSter__> so guys, what country in the US is the best one? :P
[08:38:29] <OndraSter__> I'd go either for something like Washington
[08:38:37] <OndraSter__> *-either
[08:38:55] <yunta> new hampshire was voted most libertarian-friendly at some point
[08:40:01] <OndraSter__> hmm 15000 CZK (~$750) for a ticket
[08:40:02] <OndraSter__> for a plane
[08:40:03] <Malinuss> guys I'm gonna try and drive the PCD8544 LCD-controller. but at the same time, read from the SD card at 8bytes/s, send a radio signal at 533khz, and moduate that signal with pwm, using the bytes from the SD card ;P. also display some informations on the display. You think the chip will be abel to handle it?
[08:40:05] <OndraSter__> to Washington
[08:40:21] <OndraSter__> Malinuss, make the math
[08:41:23] <Malinuss> OndraSter__, like, write all the instructions now and calculate the number of cycles it takes? haha
[08:41:35] <OndraSter__> or guess...
[08:42:02] <Malinuss> well I already guessed, I would like someone else to guess too ;D
[08:42:14] <Malinuss> maybe someone with a bit more insight
[08:42:17] <Malinuss> then me
[08:42:28] <OndraSter__> than* ... How much data is transmitted to the LCD?
[08:43:17] <karlp> Malinuss: did you say what chip you were even planning on using?
[08:43:51] <Malinuss> karlp, the ATMEGA32U4 (8 bit/ 16 MHz)
[08:44:19] <karlp> do you need to constantly refresh the lcd?
[08:44:46] <karlp> depending on how much work it is to do the radio stuff, I'd say that would be not a problem at all.
[08:45:19] <karlp> the sd card reading will take up code space, but not any particularly problemeatic amount of time
[08:47:32] <Malinuss> karlp, okay I see. so running the SPI for reading 8000bytes/s isn't that taxing? the lcd will only be refreshed at a slow rate, if the controller allows that (haven't read that much into the datasheet yet)
[08:48:22] <OndraSter__> 8bytes/s
[08:48:26] <OndraSter__> 8000bytes/s
[08:48:29] <OndraSter__> make up your mind alraedy :P
[08:48:30] <OndraSter__> already
[08:49:02] <Malinuss> its 8000bytes/s... sorry ;P
[08:49:19] <Malinuss> (if you haven't guess its for streaming .wav songs :) )
[08:51:39] <karlp> that's quite a difference :)
[08:52:11] <karlp> are you trying to do what, software defined am radio?
[08:54:16] <Malinuss> karlp, well I'm trying to stream songs over AM radio. from a SD card.
[08:55:08] <Malinuss> karlp, I can easliy stream 3-4sec of .wav files over the AM now (since there is no more flash space). so I just want to use the SD card as a extra flash storage for having the songs on
[08:55:54] <OndraSter__> Tom_itx, which US state are you living in?
[09:07:27] <Malinuss> karlp, so you think its gonna be possible?
[09:10:01] <karlp> probablyu
[09:11:26] <Malinuss> ;P thanks
[09:26:09] * megal0maniac needs to hack into his router
[09:28:02] <rue_mohr> Malinuss, is the PCD8544 an HD447780 knockoff?
[09:28:40] <megal0maniac> Isn't PCD8544 for those old nokia displays?
[09:28:42] <Malinuss> rue_mohr, not at all. PCD8544 is a controller used for a 84x48 display
[09:28:48] <Malinuss> ^
[09:28:49] <rue_mohr> ah
[09:28:49] * megal0maniac wins
[09:29:05] <rue_mohr> and it dosn't take care of refresh eh?
[09:29:22] <Amadiro> http://micro.magnet.fsu.edu/creatures/index.html
[09:29:48] <rue_mohr> I drove a 64x128 b&w display with an avr once, at full speed it was everything it could do just to keep up with the pixel rate
[09:29:52] <Amadiro> if you scroll down below the image, there is some cool silicon art
[09:31:41] <Malinuss> rue_mohr, oh. So the controller requires constant update? even if I don't change the display?
[09:33:13] <rue_mohr> I might be wrong
[09:36:49] <Malinuss> rue_mohr, I thought that you could actually "hold" the display. Like - do noething, at it will just keep displaying the same shit :)
[09:39:39] <Amadiro> It would be a pretty shit controller if you can't do that
[09:40:08] <Malinuss> Amadiro, thats pretty cool btw.
[09:40:24] <Malinuss> rue_mohr, well it sounds like it shouldn't be a problem then!
[09:40:31] <GuySoft> hey all, i am trying to translate code from an atmega8 to an atmega32u2 . The atmega 8 has a register to control the WDT called WDTCR , is there an equivalent for the atmega32u2? i can't find one in the datasheet
[09:41:34] <rue_mohr> Amadiro, sometimes, they are just shift registers/drivers
[09:43:14] <Amadiro> GuySoft, you can just #include <avr/wdt.h>
[09:44:07] <GuySoft> Amadiro, ok, and how do i use it? i am pretty new to this..
[09:44:35] <Achill> hi
[09:44:55] <Achill> i want password for codevisionAvr
[09:45:09] <Amadiro> GuySoft, well, you can either just look into it to figure out what the register is called, or use the function in there like wdt_en/disable(), etc
[09:47:39] <GuySoft> Amadiro, the code i am translating has this in the main:
[09:47:39] <GuySoft> WDTCR = (1<<WDCE) | (1<<WDE); // Kick doggie
[09:47:39] <GuySoft> WDTCR = 0x00;
[09:48:29] <Amadiro> GuySoft, so that's probably equivalent to wdt_disable() then
[09:48:39] <Amadiro> but have a look at what those registers mean exactly on the atmega8
[09:49:47] <GuySoft> Amadiro, there is a code example on page 45 of the atmega8 , but I can't see one on the atnega32u2
[09:50:48] <Amadiro> GuySoft, code example of what?
[09:51:33] <GuySoft> Amadiro, of using the watchdog times, if there was an equivalent code example in the atmega32u2 i could have known what to change it to
[09:52:07] <Amadiro> GuySoft, if you know that that code snippet does indeed disable the wdt, you can just call wdt_disable() and all should be well.
[09:52:40] <GuySoft> Amadiro, ok, thanks :)
[09:53:01] <GuySoft> Amadiro, about 10 more registers to go, then i can actually see if this works
[10:11:48] <megal0maniac> Achill: You need to pay 150 Euros. If you don't want to pay, then you can't have it.
[10:13:55] <megal0maniac> Personally, I don't see how someone charging that much could actually sell anything when there are extremely good free alternatives
[10:14:32] <OndraSter__> welcome to the world, megal0maniac
[10:14:49] <megal0maniac> The only people I know who code for AVR professionally (get paid to do it) either use AS or oldschool vim or emacs
[10:15:21] <karlp> I use netbeans, and I get paid to do it.
[10:15:30] <OndraSter__> NO EXCEPTIONS!
[10:16:00] <megal0maniac> karlp: And do you like netbeans? And how much did you pay for it? :P
[10:16:05] <megal0maniac> My point still stands
[10:16:22] <megal0maniac> The only people I know who code for AVR professionally (get paid to do it) either use AS or netbeans or oldschool vim or emacs
[10:16:26] <karlp> I was only talking to your "only people you know use AS or vim/emacs", that's all.
[10:16:36] <megal0maniac> karlp: I know :0
[10:16:38] <megal0maniac> :)
[10:17:09] <karlp> as for liking netbeans, I liked it more when it supported python as well.
[10:17:53] <megal0maniac> You can use netbeans for AVR..?
[10:18:15] <karlp> you can use netbeans for c/c++, the target architecture is largely irrelevant
[10:18:21] <megal0maniac> Ah.
[10:18:32] <OndraSter__> gcc is still gcc
[10:18:47] <OndraSter__> so
[10:18:49] <OndraSter__> next digikey order
[10:18:55] <OndraSter__> $20k
[10:18:58] <OndraSter__> I am taking a flight to the US
[10:19:00] <megal0maniac> ...
[10:19:02] <OndraSter__> TAKING ORDERS NOW
[10:19:07] <karlp> and remote gdb is still just whatever gdbserver you arrange it to see, so it even works with the dragon
[10:24:57] <megal0maniac> karlp: What is your day job, if you don't mind me asking?
[10:25:38] <karlp> http://www.remakeelectric.com/
[10:28:32] <megal0maniac> Nice :) Good industry to be in
[10:28:51] <karlp> love it. really happy.
[10:30:52] <OndraSter__> I like what to was one of my tabs shortened in Opera: "Inline Assembly" => Inline Ass...
[10:31:18] <megal0maniac> At the local shop, you can buy "Ass. Muffins"
[10:31:30] <darsie> OndraSter__: What kind of orders? will you bring digikey stuff to Europe?
[10:31:33] <megal0maniac> It's weak, but I still laugh inside
[10:31:47] <OndraSter__> darsie, I will be grabbing 40kg suitcase with me :D
[10:31:55] <OndraSter__> to grab worth of $20k parts
[10:31:58] <darsie> cool
[10:31:59] <OndraSter__> because I FUCKING HATE CUSTOMS
[10:32:27] <OndraSter__> "what's that in the suitcase?"
[10:32:28] <darsie> So we pay just digikey list price?
[10:32:31] <OndraSter__> "just some electronic kits.."
[10:32:32] <OndraSter__> haha
[10:32:34] <OndraSter__> you wish
[10:32:43] <OndraSter__> and $1k is my flight ticket (both ways together)
[10:32:47] <OndraSter__> and it is about a year from now
[10:32:52] <OndraSter__> or after I finish my school
[10:32:55] <darsie> oh
[10:32:59] <OndraSter__> although I would probably stay in the US
[10:33:07] <darsie> How would I get my stuff?
[10:33:12] <OndraSter__> I would reship them
[10:33:49] <darsie> Maybe I'll have it sent to my USAnian cousin to reship it to me as a christmas gift.
[10:35:40] <megal0maniac> Don't they still check packages like that?
[10:36:54] <darsie> dunno
[10:37:03] <darsie> probably not all of them.
[10:37:25] <megal0maniac> Definitely not, but US can be quite.. neurotic like that
[10:37:45] <darsie> US? It's from US to Europe.
[10:38:39] <megal0maniac> Yeah, but they'd still check outgoing parcels I'd imagine
[10:38:54] <darsie> What for?
[10:42:18] <crazy_imp> huh?
[10:42:28] <crazy_imp> i never had to pay customs on my digikey stuff
[10:42:55] <crazy_imp> (besides the 19% you have to pay if you order as privat person from .de)
[10:42:56] <darsie> How much value?
[10:43:16] <crazy_imp> last time? about 750€
[10:43:52] <darsie> Yeah, VAT is usually the major "customs" fee.
[10:44:28] <crazy_imp> (and digikey asked me what company / organization i am working with - answered student groupbuy and they were happy again)
[10:46:30] <darsie> Although, Austrian post has a 12 EUR fee for handling customs/VAT and this may even exceed customs/VAT.
[10:49:48] <karlp> that that fee is a killer
[10:50:04] <karlp> I despise such arbitrary fees with no minimum
[10:52:54] <OndraSter__> anyway
[10:52:57] <OndraSter__> I am moving to the US
[10:53:00] <OndraSter__> to start the business
[10:53:16] <OndraSter__> I will just keep programming software for it as abstract as possible so I can possibly later move to different architecture
[10:53:23] <OndraSter__> if something comes in the upcoming 5 years :D
[10:54:11] <OndraSter__> Question for all US residents: Are there redheads in Washington?
[10:54:14] <OndraSter__> Near Seattle
[11:05:18] <tld> OndraSter__: Where do you live now?
[11:05:35] <OndraSter__> Prague
[11:05:48] <tld> Hmm. Personally, I'd rather stay in Europe, than move to the US.
[11:05:50] <tld> I think.
[11:08:41] <tld> Oh, and you've forgotten to remind me to buy an xboard coco… Got any in stock?
[11:12:28] * tld will bbiab
[11:14:41] <OndraSter__> tld, nope
[11:14:47] <OndraSter__> but after I pass the customs I might make 3 more
[11:14:53] <OndraSter__> oh and after Mouser order comes
[11:15:53] <megal0maniac> Do you have more 256a3u?
[11:16:42] <OndraSter__> only less
[11:16:44] <OndraSter__> 128a4u
[11:19:38] <megal0maniac> So no parts for coco?
[11:20:49] <OndraSter__> all of them once mouser arrives
[11:21:03] <megal0maniac> Oh, nice :) Thought you were only making mini for now
[11:21:15] <OndraSter__> I have got last 3 xmegas for coco
[11:21:19] <OndraSter__> and then 25 xmegas for Mini :D
[11:21:31] <OndraSter__> I will do those 25 Minis and probably lay it off till I find better european source for parts
[11:21:45] <megal0maniac> 25 is plenty for now
[11:21:58] <OndraSter__> and actually start it as legal business :D
[11:22:16] <megal0maniac> When do you think mini will be ready
[11:22:26] <OndraSter__> once boards arrive
[11:22:33] <OndraSter__> I hope the SMPS will work :)
[11:32:02] <megal0maniac> RikusW: "Zille has been having a too big mouth on things that doesn't understand"
[11:33:06] <megal0maniac> Bheki Cele has made my day :)
[11:34:43] <megal0maniac> Steffanx: "Ik ga weg" == "I go away?"
[11:34:47] <OndraSter__> megal0maniac, I have today while going to school realized one thing
[11:34:53] <OndraSter__> YOUR STEERING WHEEL IS ON THE WRONG SIDE!
[11:35:10] <megal0maniac> Yes, it's very confusing
[11:35:20] <megal0maniac> Because you're on the left like Americans :)
[11:35:23] <Steffanx> Yes, megal0ma
[11:35:28] <megal0maniac> We drive on the right
[11:35:35] <OndraSter__> huh?
[11:35:41] <OndraSter__> but keep the steering wheel on the right too?
[11:35:42] <megal0maniac> I mean left
[11:35:51] <OndraSter__> ah
[11:35:57] <OndraSter__> so only you, Brits, Irish, NZ and Ozies
[11:35:58] <OndraSter__> and Japan
[11:36:16] <megal0maniac> My uncle has a Chevrolet with left hand drive. Very strange to drive
[11:36:34] <OndraSter__> haha
[11:36:40] <OndraSter__> I haven't tried right hand drive
[11:36:45] <OndraSter__> I can't imagine shifting gears with my left hand
[11:36:56] <OndraSter__> or drinking anything with my left hand
[11:37:01] <OndraSter__> (because the cup holder is on the middle)
[11:37:50] <megal0maniac> The Chevrolet is automatic, like most American cars :P
[11:37:54] <megal0maniac> So I haven't tried either
[11:38:38] <OndraSter__> duh
[11:38:39] <OndraSter__> automatic
[11:39:39] <megal0maniac> I like gears. My bike has 6! And all of them go forward :D
[11:43:26] <RikusW> megal0maniac: what did she say ?
[11:44:51] <megal0maniac> The former police commisioner. Nothing new, but a local DJ has made a track using sound bytes from one of his speeches and it's hilarious. A little embarrassing, but still funny
[11:45:20] <megal0maniac> For anyone who cares: http://www.youtube.com/watch?v=qX2caZRbiP0
[11:45:45] <specing> we have similar stuff here
[11:46:09] <megal0maniac> specing: People in high places failing horribly at 2nd language English?
[11:46:27] <specing> No, djs remixing their speeches
[11:47:16] <megal0maniac> Listen to 1:30 on that video
[11:47:28] <OndraSter__> Euphonik sounds familiar
[11:47:29] <megal0maniac> He's just making noise.
[11:47:44] <megal0maniac> OndraSter__: There's another Euphonik in the UK
[11:47:47] <OndraSter__> ah
[11:47:49] <OndraSter__> :D
[11:48:08] <OndraSter__> SHUT UP SHUTUP SHUT UP :D
[11:49:23] <megal0maniac> *They must go and shuddup
[11:49:36] <OndraSter__> I didn't understand that much :D
[12:21:49] <megal0maniac> So xboard mini
[12:22:07] <megal0maniac> 128a4u with uSD slot and SMPS, right?
[12:22:17] <megal0maniac> Arduino Uno form factor, with two LEDs
[12:22:40] <megal0maniac> And support for the ethernet shield which you'll make shortly afterwards
[12:23:11] <megal0maniac> @OndraSter__
[12:26:16] <OndraSter__> yes
[12:26:23] <OndraSter__> Arduino Leonardo form factor
[12:26:44] <OndraSter__> shield will be done with it pretty much
[12:26:57] <OndraSter__> driver for it will not :)
[12:27:16] <OndraSter__> I could grab ENC28J60 driver from arduino and modify it
[12:27:20] <OndraSter__> the chips should not be that different
[12:27:29] <OndraSter__> just 100Mbit, three times as much SRAM
[12:27:52] * specing sings "I've got the power,..."
[12:28:01] <OndraSter__> mm
[12:28:14] <OndraSter__> warm up song at my PE :D
[12:49:08] <tld> OndraSter__: Any chance you could set aside one of the coco's for me, if you get them built?
[12:49:42] <tld> OndraSter__: (If you'd like, I can pay now, so you feel coerced into living up to your side of the deal… )
[12:53:39] <megal0maniac> tld: Are you from South Africa?
[12:53:51] <OndraSter__> tld, I will have them very soon
[12:54:03] <OndraSter__> the order from mouser should come on tuesday or next wednesday
[12:54:04] <tld> megal0maniac: Not unless my mom lied to me.
[12:54:15] <tld> OndraSter__: :)
[12:54:16] <megal0maniac> THEN YOU CAN'T HAVE ONE!
[12:54:16] * megal0maniac growls
[12:54:23] <tld> megal0maniac: ey!
[12:54:27] <tld> OndraSter__: Can I pay now?
[12:54:44] <OndraSter__> I prefer when people pay me right before shipping
[12:54:47] <OndraSter__> otherwise I could forget :)
[12:54:53] <megal0maniac> OndraSter__: When do you suspect you'll have the boards?
[12:55:06] <OndraSter__> after mouser order arrives :)
[12:55:10] <OndraSter__> = next week
[12:55:19] <OndraSter__> and after the boards arrive of course
[12:55:22] <OndraSter__> although i will just build the SMPS on one first
[12:55:26] <megal0maniac> That's what I meant :P
[12:55:26] <OndraSter__> to test out it first
[12:55:36] <OndraSter__> then build my reflow oven
[12:55:37] <megal0maniac> The PCBs
[12:55:40] <OndraSter__> and then build all 10 at once
[12:55:41] <OndraSter__> hehe
[12:55:54] <tld> OndraSter__: I really want one of the coco-things, and best way to have me not start a competing business is to sell one to me. ;)
[12:55:54] <megal0maniac> tld: You can have a coco. They're rev B so it's fine :)
[12:56:02] <tld> OndraSter__: (I'm just kidding, I've never made a proper PCB in my life)
[12:56:07] <OndraSter__> they are not revB
[12:56:14] <OndraSter__> I don't have revB cocos
[12:56:23] <OndraSter__> revA Minis already contain revB coco fixes though
[12:56:33] <megal0maniac> LDO fix
[12:56:41] <tld> I don't really care too much about which rev I think, I just need "something" with a decent xmega and lots of uarts.
[12:56:42] <OndraSter__> no fix, but bodge :D
[12:58:20] <OndraSter__> duh, how did youghurt got into my beard?!
[12:58:50] <OndraSter__> my 1cm long beard
[12:58:53] <OndraSter__> I shaved like 3 weeks ago
[12:59:15] <tld> I need a trim.
[12:59:39] <OndraSter__> megal0maniac, revB boards have got more changes... but I am not sure I will be pushing xboard before I move to the US
[13:00:06] <megal0maniac> When would that be?
[13:00:18] <OndraSter__> after I finish the school
[13:00:24] <OndraSter__> or get some usable work in the US
[13:00:28] <OndraSter__> I already tweeted Microsoft :D
[13:01:19] <yunta> bleah
[13:02:19] <tld> Microsoft. :(
[13:02:29] <OndraSter__> hardware division
[13:02:30] <OndraSter__> R&D
[13:06:50] <tld> So… you'd like to spend your time designing things that'll flop?
[13:07:03] <OndraSter__> that will what?
[13:07:09] <tld> flop?
[13:07:13] <OndraSter__> what?
[13:07:16] <tld> not fly, be forgotten, not sell.
[13:07:19] <megal0maniac> Only every second attempt :)
[13:07:24] <tld> "be a flop" == fail in the market.
[13:07:24] <OndraSter__> oh
[13:07:35] <OndraSter__> I like desining things
[13:07:45] <tld> Microsoft has had some limited hardwaresuccess, but with stuff it's bought in from outside, not with stuff it's designed.
[13:07:52] <OndraSter__> I would actually enjoy doing a mechanic work rather programming
[13:08:02] <OndraSter__> tld, Surface?
[13:08:26] <tld> According to Oprah, Surface is great. Or at least, that's what she tweeted from her iPad.
[13:08:33] <yunta> I've heard ms makes acceptable hw. But the shame of working there.....
[13:08:33] <OndraSter__> :D
[13:08:38] <OndraSter__> what shame?
[13:08:47] <yunta> OndraSter__: that's community-dependent
[13:08:51] <tld> Microsoft is generally loathed.
[13:09:09] <tld> Actually, to be honest, from what I've heard, neither Microsoft, nor apple, really is the kind of place you'd like to work.
[13:09:18] <megal0maniac> Apple? Really?
[13:09:22] <tld> Might be handy to have a couple of years there at your resume, but…
[13:09:25] <tld> yes, Apple.
[13:09:30] <tld> Jobs was generally known to be a psycho.
[13:09:43] <megal0maniac> He mellowed out
[13:09:44] <tld> Both the first and last time he was involved with Apple.
[13:09:48] <tld> could be
[13:09:55] <tld> I haven't studied it all that much.
[13:10:05] <megal0maniac> Over the last 6 months or so :P
[13:10:18] <tld> yeah, that sounds about right.
[13:11:13] <jadew> wish I was there, when the PC business took off
[13:11:28] <yunta> ms and apple are both quite closed. it would be sad for me to leave all my stuff behind (closed) after changing jobs...
[13:11:30] <jadew> being a programmer in those days would pretty much guarantee you a job
[13:11:57] <tld> jadew: It still does.
[13:12:00] <jadew> yunta, well, coding for the community doesn't earn you a living
[13:12:16] <jadew> tld, it's harder now
[13:12:22] <yunta> unless you work for Jolla :D
[13:12:33] <tld> It's less trivial now.
[13:12:40] <jadew> location means nothing nowdays and companies stopped caring about quality 10 years ago
[13:12:57] <yunta> jadew: I get paid for writing opensource
[13:13:01] <jadew> so they're highering teams of programmers from poor countries
[13:13:11] <jadew> *hireing
[13:13:50] <jadew> yunta, I can only see that happening if you work for a company that needs some server software and you get to work on it
[13:14:45] <jadew> (which is the reason linux doesn't completely suck, companies pump money into a few cool apps, everything else is junk)
[13:14:52] <yunta> jadew: phone os actually. but I do server stuff for them too.
[16:15:35] <Malinuss> okay guys. Is it true that if I have a external crystal on a breadboard, the high frequency will get somehow distorted or something like that. becaue its on a breadboard?
[16:17:15] <jadew> how high?
[16:17:34] <OndraSter__> it will get distorted a bit because the breadboard has awful capacitances
[16:17:37] <OndraSter__> all around the place
[16:17:38] <Malinuss> 16Mhz
[16:17:42] <Malinuss> or 20Mhz
[16:17:44] <jadew> you'll be fine
[16:18:04] <Malinuss> okay. thanks.
[16:18:14] <OndraSter__> it will be ranging +-200ppm usually
[16:18:16] <OndraSter__> depends on the caps
[16:18:20] <OndraSter__> and how long leads you use etc
[16:18:44] <OndraSter__> I tried simple oscillator with NOT gate, xtal, two caps and 1M feedback resistor
[16:18:49] <OndraSter__> on breadboard
[16:18:53] <OndraSter__> it was flying around 16MHz
[16:20:26] <Malinuss> I just want it as a external crystal for my chip. so it have to be *very* precise, so everything can work
[16:21:14] <jadew> it'll work fine
[16:21:29] <jadew> and you'll rarely get exactly the specified freq
[16:21:35] <OndraSter__> aye
[16:21:42] <OndraSter__> xtals are how much... 50ppm?
[16:21:49] <jadew> something like that
[16:22:20] <Malinuss> but If I *really* want the exactly specific freq. I would be better of soldering it directly to the right pins, right?
[16:22:36] <OndraSter__> you could also use rubidium freq gen :)
[16:22:42] <OndraSter__> if you want it to be *really* perfect
[16:23:11] <Malinuss> well I want is as precise as it was on my pre-made dev board.
[16:23:40] <tmpvar> Malinuss, have you tried it?
[16:24:19] <jadew> Malinuss, it will be just as precise as it will be on the pre-made board, maybe just a bit off
[16:24:32] <jadew> if you want extreme precision you go with the temperature controlled ones
[16:24:36] <Malinuss> tmpvar, no I don't even have the parts yet. it's just something I heard from a guy, I googled it, but couldn't find any info on crystal+creadboard. So I asked your guys for guidence
[16:25:11] <Malinuss> jadew, okay thats what I wanted to hear. if its very close to a premade board, then I'm glad
[16:26:09] <jadew> well, crystals are pretty accurate, if they're oscillating, you can't do too much to mess them up into unusability
[16:26:26] <eric_j> malinuss: you can tweak the frequency, whether on the breadboard or not, by adjusting the values of the load capacitors
[16:27:54] <karlp> the capacitance between the strips on a breadboard can make it take longer to startup though
[16:28:06] <karlp> but yeah, when its on, it should be fine.
[16:28:15] <Malinuss> okay. thanks
[19:37:21] <GuySoft> um, newbie question: F_CPU sets the compiler clock calculation or it i change it will it underclock my controller? because I have a 16Mhz controller i want to run as 8Mhz
[19:42:03] <r00t|home> you set the clock using the fuses and the connected clock source, the compiler can't change it for you
[19:43:15] <r00t|home> there is no such thing as a "16Mhz controller" anyway... maybe you mean a devboard with a 16mhz crystal on it?
[19:47:16] <r00t|home> "The ATmega48PA/88PA/168PA/328P has a system clock prescaler, and the system clock can
[19:47:16] <r00t|home> be divided by setting the "CLKPR ­ Clock Prescale Register" on page 377. This feature can be
[19:47:16] <r00t|home> used to decrease the system clock frequency and the power consumption when the requirement
[19:47:16] <r00t|home> for processing power is low. This can be used with all clock source options, and it will affect the
[19:47:16] <r00t|home> clock frequency of the CPU and all synchronous peripherals. clkI/O, clkADC, clkCPU, and clkFLASH
[19:47:17] <r00t|home> are divided by a factor as shown in Table 28-3 on page 318." -- http://www.atmel.com/Images/doc8161.pdf
[19:49:14] <r00t|home> so be careful, this will also "underclock" your timers, uarts, etc...
[19:49:49] <r00t|home> so you should _additionally_ set F_CPU accordingly
[19:50:57] <Tom_itx> F_CPU is for software timing events to know what the clock rate is
[19:51:02] <Tom_itx> ie, delay()
[19:51:13] <Tom_itx> F_CPU should be set to your crystal frequency
[19:54:38] <r00t|home> Tom_itx: system clock, not crystal frequency ;)
[19:55:05] <Tom_itx> same idea
[19:55:29] <r00t|home> i mean, i just explained how to change the system clock without changing the crystal, so...
[19:56:35] <Tom_itx> you still set the F_CPU to the crystal
[19:57:31] <Tom_itx> the prescalar affects the hardware timers
[19:57:52] <Tom_itx> the code still runs at the clock frequency
[20:59:22] <froggyman> any here ever use a pocket AVR from sparkfun?
[22:02:08] <r00t|home> Tom_itx: NO, there is also a SYSTEM CLOCK prescaler, in addition to the timer prescalers...
[22:02:35] <Tom_itx> yeah i figure that out once my head cleared :)
[22:02:38] <r00t|home> Tom_itx: i posted the section from the datasheet...