#avr | Logs for 2012-11-19

Back
[01:10:56] <OndraSter_> techisco
[01:10:58] <OndraSter_> he is gone
[01:11:14] <OndraSter_> yes, so many caps in case the user launches something hard on perfomance
[01:11:32] <OndraSter_> there are three 10uF - one on the input, one after the LDO and one for the "other" half of the chip
[01:11:43] <OndraSter_> because xmega == half amp sinking/sourcing
[01:11:56] <OndraSter_> (when he appears you are free to quote me :D)
[01:57:40] <tld> OndraSter_: xmega has DMA, doesn't it? Ever looked at what you can do in terms of sample-rate, with an external ADC? (and possibly external memory?)
[01:59:25] <tld> (looking to do a current-monitor, and for this, higher sample-rate is better, up to a point of about 1msps @ 16bits, which I'm guessing might be pushing it… so fast/closer to 1Mhz is better… )
[02:21:16] <Casper> tld: even a 1sps current monitor can work well, it all depend on the implementation and the time resolution neede
[02:21:16] <Casper> d
[02:21:30] <tld> Yes, I know.
[02:21:37] <tld> Which is why I'd like a high-speed one. ;)
[02:22:12] <tld> (I'd like to see how much various bits are drawing, and for how long, among other things to include that data into battery calculations and the like)
[02:22:36] <tld> (yeah, I know, I could do 1sps, change things around and calculate good estimates, but it's more fun the other way around. ;) )
[02:24:13] <tld> 1sps, sampling 1us each 1s, would be a problem, but sampling for 1s every 1s could be decent at least.
[02:31:00] <OndraVPS> tld: Xmega does have DMA
[02:35:29] <OndraVPS> tld: each ADC can sample at 2MSPS
[02:35:46] <tld> 2msps is damned nice actually.
[02:35:56] <OndraVPS> a3 and a1 series has got two adcs
[02:35:58] <tld> but looking to do with an external 16bit, if possible.
[02:36:00] <OndraVPS> and you can select the same source
[02:36:20] <tld> maybe 12bit would be enough.
[02:36:24] <OndraVPS> aye
[02:36:31] <OndraVPS> that is 4096 steps
[02:36:35] <OndraVPS> which is A LOT
[02:36:50] <tld> or maybe I should go for fast 12bit, and slower 16bit external, if I need.
[02:37:16] <tld> 4096 would be enough, if my input was logaritmic, but since it'l linear, it'll be hard to get resolution for lower ranges.
[02:37:50] <tld> optional detour through an op-amp would fix that, but would probably be an issue if I mix higher and lower
[02:53:13] <OndraVPS> tld: I am not sure how good is the ADC at low voltages
[02:54:03] <OndraVPS> I thought it was just as good as at higher voltages
[02:54:10] <tld> Can boost, not usually a problem.
[02:54:19] <tld> Where'd you put samples at that rate btw? (2msps)
[02:54:31] <OndraVPS> memory/shove them to USB/..? :)
[02:54:53] <tld> Ooh, yeah, I almost forgot that it does USB.
[02:55:04] <OndraVPS> :P
[02:56:56] <OndraVPS> or you can grab A1U chip
[02:57:01] <OndraVPS> and shove it into 16MB SDRAM :D
[03:17:36] <OndraVPS> so quiet!
[03:31:27] <tld> OndraVPS: thanks for the input. :)
[03:32:22] <OndraVPS> I prefer output :)
[03:32:27] <OndraVPS> np
[03:32:40] <OndraVPS> I will be making arduino mega2560-like boards with xmega128a1u
[03:33:04] <OndraVPS> after I sell my Leonardo-sized Mini with xm128a4u :)
[03:33:47] <tld> think it'd be possible to shove 16bits, at 1mps, from an external ADC to SDRAM? Running at 32Mhz, that'd be about 1 bit for every other clock? Probably a bit too optimistic?
[03:34:18] <OndraVPS> you are doing 8bit writes
[03:34:19] <tld> very nice. :)
[03:34:26] <tld> Ahh, parallel?
[03:34:35] <OndraVPS> not sure - EBI is not directly addressable beyond 64kB
[03:34:39] <tld> hmm
[03:34:40] <OndraVPS> gcc cannot work with RAMPX register..
[03:34:43] <OndraVPS> yet
[03:34:52] <OndraVPS> you would have to drop to asm and do it manually probably
[03:34:53] <tld> I'll have to wait and see then.
[03:34:59] <tld> And I need to remember to start buying your stuffs.
[03:35:03] <OndraVPS> :D
[03:35:12] <OndraVPS> I will be doing 100Mbit ethernet too
[03:35:23] <OndraVPS> with DMA support of course
[03:35:29] <tld> if gcc doesn't support it, I suppose there's a chance the assembler doesn't support the instruction yet either? (probably easier to hack though… )
[03:35:33] <OndraVPS> you tell it "sendpacket" and it DMA transfers it
[03:35:34] <tld> nice! :)
[03:35:40] <OndraVPS> what instruction?
[03:35:40] <tld> *very* nice.
[03:35:44] <tld> err
[03:35:46] <OndraVPS> RAMPX is just another register
[03:35:50] <tld> not instruction, meant register
[03:35:58] <OndraVPS> it works something like segment register on x86
[03:36:06] <tld> hmm
[03:36:09] <tld> should be workable
[03:36:11] <OndraVPS> it is regular memory mapped IO
[03:36:14] <OndraVPS> it works in asm
[03:36:22] <tld> if I do try to do that, it'd probably be best to write the inner-loop type stuffs in asm anyway
[03:36:31] <OndraVPS> aye
[03:36:35] <tld> again, thanks for the input. :)
[03:36:45] <OndraVPS> I drove 3072 LEDs with one poor atmega128a
[03:36:52] <OndraVPS> with 25 shift registers :)
[03:36:57] <tld> cute. :)
[03:37:02] <OndraVPS> shoving over 220kB/s on SPI
[03:37:12] <OndraVPS> in bursts
[03:37:13] <tld> pretty nice! :)
[03:37:20] <OndraVPS> about 38% CPU load just for refreshing :D
[03:37:48] <OndraVPS> images were saved in external RAM (128a has external memory interface with SRAM support), loading from PC via UART and FT232RL
[03:38:08] <tld> I'd need 2048kB/s, both in and out though… hmm.
[03:38:25] <OndraVPS> USB on xmega can do about 8Mbit
[03:38:29] <tld> Thinking I should probably settle for 100ksps, rather than 1msps, and be happy with that, until I look at cortex or some such.
[03:38:32] <tld> damn!
[03:38:35] <tld> nice!
[03:38:36] <OndraVPS> 12Mbit-some protocol overhead = 8Mbit or so
[03:38:58] <tld> I suppose there's nothing wrong with just giving it a spin, and see how fast it'll go.
[03:39:01] <OndraVPS> USB can not push more on Full Speed
[03:39:02] <OndraVPS> aye
[03:46:58] <OndraVPS> anyway, I am off to the bank and then home
[03:46:58] <OndraVPS> bb
[05:00:07] <OndraVPS> so quiet without me talking... :D
[06:50:40] <iSaleK> Can someone please take a look at my initialisation function and tell me what am I doing wrong?
[06:50:41] <iSaleK> http://pastebin.com/keV7p434
[06:51:11] <MrTrick> So, I've got some long-lived processes (several seconds) that will occasionally need to be cancelled... The processes are basically switch pin on, delay_ms(300), switch pin off, delay_ms(500), switch pin on, etc etc for up to 10 or so cycles.
[06:51:45] <iSaleK> I want my timer to work in CTC mode and to generate timer0 interrupt whenever timer reaches some value
[06:52:00] <iSaleK> and I'm using ISR(TIMER0_COMPA_vect) {} for interrupt handling
[06:52:10] <MrTrick> This will all run in the regular space. If I get an external event that occurs, though, it needs to drop everything and go do that, never having to return to that long process. (unless restarting, later). Any suggestions on how to approach that?
[06:52:33] <MrTrick> Directly modifying the stack?
[06:52:48] <iSaleK> MrTrick: Maybe in while make a simple function that will check if variable1 is set. If not then proceed
[06:53:08] <iSaleK> And you can in interrupt set variable1 to some value and after that interrupt while loop will get false and will not execute
[06:53:28] <MrTrick> iSaleK: Ordinarilly, true. However, delay_ms() is a nifty function that doesn't support that.
[06:53:44] <Tom_itx> iSaleK, no time to look this AM but read part4 of this: http://tom-itx.dyndns.org:81/~webpage/abcminiuser/articles/avr_timers_index.php
[06:54:15] <iSaleK> Tom_itx: Ok thanks, I'll look into that article :)
[06:54:16] <iSaleK> Thank you
[06:54:37] <iSaleK> MrTrick: _delay_ms() doesn't support what exactly?
[06:54:40] <Tom_itx> he also has one on interrupts
[06:54:44] <Tom_itx> it's on the menu
[06:55:01] <MrTrick> iSaleK: being cancelled.
[06:55:11] <MrTrick> The cancelling may need to be immediate.
[06:55:41] <iSaleK> MrTrick: How immediate? ms, us or even shorter?
[06:56:19] <MrTrick> and the process will probably span multiple functions, so doing if(cancelled) return; might end up having to be in quite a lot of places, a bit messy.
[06:56:33] <MrTrick> half-second, maybe even a second long at the most.
[06:56:38] <iSaleK> Because you can do while(i=0; i<=50; i++) { if(!something) { delay_ms(1); } }
[06:57:09] <iSaleK> Just an idea but you can do it in a many ways... just not sure what you're trying to do :)
[06:57:17] <MrTrick> I know some architectures you can deliberately cause a stack overflow, and carry on without a care (as long as you never try to return under the stack)
[06:59:07] <iSaleK> MrTrick: I've looked into the delay_ms function and it seems like it doesn't have disable interrupt in it so why shouldn't interrupt work? :)
[07:00:45] <MrTrick> yes, but I don't want the delay to complete, I don't want the rest of the process to complete, in fact when the condition occurs (which is in an interrupt) I'd be happy for the next line executed after the interrupt to be the beginning of the main loop.
[07:03:16] <iSaleK> Well if decreasing the delay doesn't work for you then I'm out of ideas or maybe create your own delay function with simple asm('NOP');
[07:03:27] <MrTrick> yeah, I suppose so.
[07:03:50] <iSaleK> there you can manipulate delay function with if loops and etc...
[07:04:03] <iSaleK> Maybe it would be few us + - but it will do the job :)
[07:04:26] <iSaleK> If setup isn't that much sensitive it should do the job
[07:05:15] <MrTrick> even with a custom delay function, I'd still like to be able to do `if (cancel) main_loop();
[07:05:50] <iSaleK> well your function has return so it will return to where you want it :)
[07:06:24] <MrTrick> rassafrassin good practices... where's my goto?
[07:07:52] <yunta> Mr_Sheesh: use c++ and throw exception maybe?
[07:07:59] <yunta> ups, wrong completion
[07:08:09] <yunta> was meant for MrTrick
[07:08:51] <MrTrick> yunta: interesting idea. How much overhead will that introduce, though?
[07:10:32] <yunta> hm, if you don't use other c++ features than exceptions, then it's just stack unwinding code I guess
[07:11:14] <yunta> I did use c++ on avr like 5 years ago, but didn't check overhead
[07:12:02] <yunta> specifically, you'll want to avoid dynamic allocation and virtual functions (or any other operations involving dynamic type identification, that needs RTTL)
[07:12:17] * MrTrick tries reading the util/delay.h code, eyes go crosseyed.
[07:12:37] <MrTrick> I really hate trying to read production C code... so many preproc statements!
[07:12:43] <yunta> delay sucks, use timer if you can
[07:14:22] <MrTrick> heh, I'm using timers elsewhere. This really is a lowest-priority thing. I suppose it could be done with a timer, though would make some of the logic a bit obtuse.
[07:16:32] <yunta> so, you want to restart main ?
[07:16:47] <yunta> what about causing reset straight from interrupt handler?
[07:19:41] <MrTrick> heh, here have a big red button.
[07:55:28] <iSaleK> I'm looking into how to configure timer0 to work in CTC mode
[07:55:38] <iSaleK> TCCR0A is for timer0 and TCCR0B is for timer1, right?
[07:55:49] <MrTrick> I've just been trawling through the docs
[07:55:58] <MrTrick> TCCR0A and 0B are timer0,
[07:56:07] <MrTrick> 1A and 1B are timer1, 2A and 2B are timer2, etc.
[07:56:24] <iSaleK> What's the diference between 0A and 0B ?
[07:56:27] <MrTrick> But don't let that lull you into a false sense of security.
[07:56:37] <MrTrick> There are more than 8 bits of stuff to configure.
[07:57:26] <MrTrick> Honestly, your best bet to understanding it is to read through the documentation carefully, and take notes.
[07:57:54] <iSaleK> I'm doing it right now but I can't seem to figure out why timer is not working in ctc mode...
[07:58:33] <iSaleK> Based on data that I've read from the datasheet I've made a code that looks something like this http://pastebin.com/rh2Y4dA7
[07:58:41] <iSaleK> But timer still doesn't work in CTC mode
[07:58:47] <MrTrick> Don't take this the wrong way, but perhaps not knowing what TCCR0A and TCCR0B do would be one of the issues?
[07:59:06] <iSaleK> Well, that's true :)
[07:59:19] <MrTrick> Here are the notes I took when trying to figure out my own timer issues; https://gist.github.com/4110724
[07:59:58] <MrTrick> It's for RTC, not CTC ^_^ But might help you find keywords to check
[08:00:07] * MrTrick looks at the pastebin
[08:02:01] <MrTrick> err, something's wrong with your tccr0a and b, certainly. Which device are you using?
[08:03:18] <iSaleK> ATtiny2313
[08:04:06] <MrTrick> So, you're reading through http://www.atmel.com/Images/doc2543.pdf ?
[08:04:36] <eric_j> WGM01 is only in TCCRxA
[08:05:09] <iSaleK> MrTrick: Yes, that's the datasheet I'm looking at
[08:05:23] <iSaleK> eric_j: I didn't understand that one?
[08:05:53] <iSaleK> I don't need WGM01 in TCCR0B ?
[08:06:00] <MrTrick> start reading at p62.
[08:06:02] <eric_j> TCCR0B |= (1 << WGM01); is wrong; there is no WGM01 in TCCR0B
[08:06:25] <MrTrick> or 73 for the meat of it.
[08:06:56] <iSaleK> eric_j: Ok, I've removed it. It has only WGM02 so, thanks :)
[08:07:06] * iSaleK reading...
[08:08:29] <MrTrick> so TCCR0A = (0<<COM0A1)|(0<<COM0A0)|(0<<COM0B1)|(0<<COM0B0)|(1<<WGM01)|(0<<WGM00);
[08:09:10] <MrTrick> (or TCCR0A |= WGM01; as short form, because the others are all default)
[08:09:58] <iSaleK> OK, I allready have that part in my code
[08:10:23] <eric_j> TCCR0A = (1<<WGM01)
[08:10:27] <MrTrick> and TCCR0B (p76) you only need to use if you plan to use a prescaler to make it count differently to the clock.
[08:10:44] <MrTrick> eric_j: yes sorry. Bad fingers.
[08:11:05] <MrTrick> oh wait, what am I saying.
[08:11:25] <MrTrick> You need to set CS02:0 to something other than 000, or the timer is stopped.
[08:11:41] <MrTrick> (table 43 on p77)
[08:11:45] <MrTrick> 41.
[08:13:38] <iSaleK> I've done that. I've set CS02 to 1 so it has 256 prescale
[08:15:20] <MrTrick> so fingers crossed it should work.
[08:15:55] <MrTrick> iSaleK: and enable the interrupt
[08:16:11] <iSaleK> TIFR |= (1<<OCIE0B);
[08:16:14] <OndraSter_> last chance - anybody anything from digikey?
[08:16:24] <OndraSter_> they managed to sell out microUSB connectors - luckily they are actually cheaper on mouser :D
[08:16:27] <OndraSter_> I need to order NOW
[08:16:45] <MrTrick> no, TIMSK |= (1<<TOIE0);
[08:17:01] <MrTrick> OndraSter_: got mine?
[08:17:03] * yunta hates soldering microusb :(
[08:17:04] <OndraSter_> yes
[08:17:09] <MrTrick> :-)
[08:17:11] <OndraSter_> yunta, reflow :)
[08:17:22] <yunta> no hot air or anything here
[08:17:31] <OndraSter_> I used my soldering iron only too
[08:17:42] <OndraSter_> I am switching to through hole mounted ones
[08:17:45] <OndraSter_> with front and back pegs
[08:17:51] <OndraSter_> (the pins themselves are still SMD)
[08:18:03] <yunta> sounds nice
[08:18:35] <OndraSter_> so nobody nothing else
[08:18:36] <OndraSter_> okay
[08:18:39] <OndraSter_> ORDERING
[08:19:05] <OndraSter_> $206.77
[08:19:11] <OndraSter_> but.. USPS or FedEx? :D
[08:19:13] <OndraSter_> err
[08:19:13] <OndraSter_> UPS
[08:21:57] <iSaleK> MrTrick: Why TOIE0 and not OCIE0B?
[08:22:43] <OndraSter_> meh fedex
[08:36:00] <MrTrick> iSaleK: err, not sure now.
[08:36:04] <MrTrick> One or the other.
[08:45:00] <OndraSter_> MrTrick, ordered
[08:52:17] <MrTrick> Excellent.</mrburns>
[09:02:23] <iSaleK> How can I calculate how often will my interrupts occure based on the presaler, crystal frequency and etc... :)
[09:02:38] <iSaleK> Is there some online tool for that or do I have to do it by hand?
[09:32:19] <OndraSter_> iSaleK, it is not hard.
[09:33:46] <iSaleK> Well I can't seem to figure out how to set OCR0A and TCNT0A to get 2ms from 8MHz
[09:34:00] <OndraSter_> PWM mode or CTC mode?
[09:34:15] <iSaleK> CPU prescale is 1, Internal /8 prescaler is disabled with fuses and timer is prescaling with 256
[09:34:16] <iSaleK> CTC
[09:34:35] <OndraSter_> so you want it to fire up 500 times per second?
[09:34:50] <iSaleK> KAVR gives me values like OCR0A=0xF9 and TCNT0A = 0x06
[09:35:27] <jadew> iSaleK: http://pastebin.com/d1ekUdky
[09:35:28] <OndraSter_> the TCNT value should be 62.5
[09:35:45] <OndraSter_> so go for /128 and use 126
[09:35:49] <OndraSter_> for OC0A
[09:35:53] <OndraSter_> OCR0A
[09:36:01] <jadew> with a 128 prescaller you need 125 for CTC
[09:36:08] <OndraSter_> yes, 125
[09:36:12] <OndraSter_> bad math, bad
[09:36:13] <iSaleK> Attiny2313 has 64 and 256
[09:36:15] <iSaleK> not 128 :)
[09:36:22] <OndraSter_> then use 64 and 250
[09:36:24] <jadew> for 64 use 250
[09:36:26] <jadew> as per the table
[09:37:39] <OndraSter_> btw 62 or 63 with /256 does not matter either - you are in <1% error and the internal RC oscillator is above 1% :)
[09:38:47] <iSaleK> I'm using external crystal with 8MHz and unfortunately I'm trying to count seconds as precisely as possible...
[09:38:57] <OndraSter_> ah
[09:39:00] <jadew> http://dumb.ro/tb/download/prescaler.zip
[09:40:59] <iSaleK> But the thing that pisses me off is that I don't have a clue why it doesn't work now and it was working 10min ago... counted little over 1s but when I tried to fix it i blew it up and now it doesn't work :\
[09:41:41] <OndraSter_> blew it up?
[09:41:44] <OndraSter_> did you let 12V into it? :)
[09:42:41] <jadew> have you guys tried out r-2r dacs with high resolution? are they reliable?
[09:43:01] <iSaleK> No no, not really blew it up.. I mean the code is not working now :\
[09:43:05] <iSaleK> Don't know why anymore
[09:43:19] <iSaleK> Can I get a new pair of eyes on this code if anyone has time to check it out ? http://pastebin.com/HpPPRyP2
[09:43:43] <OndraSter_> jadew, well
[09:43:49] <OndraSter_> you need a lot of resistors to get 12+ DACs
[09:43:55] <OndraSter_> and even 14bit SPI DACs are fairly cheap
[09:44:01] <jadew> they're not cheap
[09:44:06] <jadew> they're a rip off
[09:44:09] <OndraSter_> compared to resistors - no
[09:44:15] <OndraSter_> but they require less space
[09:44:22] <OndraSter_> and you need just SPI rather 12 pins
[09:44:43] <jadew> I'm sure you can use a t2313 + 28 smd resistors around it just fine, for 14 bit accuracy
[09:44:55] <jadew> but are they accurate enough at that resolution?
[09:45:04] <OndraSter_> if you get 0.1% resistors..
[09:45:42] <OndraSter_> is tiny2313+resistors cheaper than SPI DAC?
[09:45:51] <jadew> deffinitely
[09:46:03] <jadew> you pay like $1 per 100 resistors
[09:46:17] <OndraSter_> less :)
[09:46:20] <jadew> $1 or so for the t2313
[09:46:23] <OndraSter_> I am paying $1.7 for 500 resistors
[09:46:28] <jadew> where from?
[09:46:28] <OndraSter_> at what volumes?
[09:46:30] <OndraSter_> digikey
[09:46:39] <jadew> ah, how's the shipping?
[09:46:43] <OndraSter_> just ordered
[09:46:46] <OndraSter_> >$200 = free
[09:46:48] <OndraSter_> otherwise $60
[09:46:49] <jadew> ah
[09:46:51] <jadew> nice
[09:46:53] <jadew> damn it
[09:47:03] <OndraSter_> I kept asking if anybody wants something for the past 48 hours or so
[09:47:04] <jadew> wish I knew about that before I placed my order
[09:47:19] <jadew> I forgot to buy 2k resistors :(
[09:47:28] <jadew> now I have to place another order just for that
[09:47:36] * jadew bangs head against the desk
[09:47:38] <OndraSter_> where from?
[09:47:43] <jadew> tme
[09:47:49] <OndraSter_> ah
[09:49:08] <jadew> if you ever stumble upon some cheap 14bit dac, let me know
[09:49:49] <jadew> I need 14bit resolution for my next power source, want to be able to go from 0 to 16V in 1mV increments
[09:50:44] <OndraSter_> regular DACs have got like... 5 numbers error or so
[09:50:54] <jadew> oh really?
[09:51:17] <OndraSter_> yeah
[09:51:28] <jadew> I need to set up an experiment to test the accuracy of an r-2r 14bit dac
[09:51:29] <OndraSter_> not sure
[09:51:31] <OndraSter_> 2 - 3
[09:51:35] <OndraSter_> xmega has got special calibration bits
[09:51:40] <OndraSter_> and you can further calibrate it via ADC
[09:51:42] <jadew> (wish I bought that agilent meter now)
[09:51:48] <iSaleK> Does anyone have the time to take a look at my code and see why it's not working? :)
[09:51:55] <OndraSter_> maybe
[09:51:58] <OndraSter_> if I pause The Walking Dead..
[09:52:19] <jadew> iSaleK, I have to get back to work, sorry
[09:52:24] <jadew> see ya guys later
[09:52:30] <OndraSter_> bb
[09:52:30] <iSaleK> Bye
[09:52:34] <iSaleK> OndraSter_: http://pastebin.com/HpPPRyP2
[09:52:51] <iSaleK> Timer0 is no longer doing any interrupt
[09:53:31] <iSaleK> I've tried 1, 10, 50, 100, 500 values for if(timerCounter >= xx) but darn LED won't light up
[09:54:05] <OndraSter_> run it in simulator
[09:55:45] <iSaleK> Simulator in Atmel Studio?
[09:55:49] <OndraSter_> yes
[09:55:57] <iSaleK> It really doesn't tell me much when it comes to interrupts :)
[09:56:17] <OndraSter_> it does
[09:56:19] <OndraSter_> you can set breakpoints
[09:56:25] <OndraSter_> and check registers
[09:59:23] <iSaleK> It doesn't get into the interrupt :)
[09:59:32] <iSaleK> I mean into the interrupt routine
[09:59:45] <OndraSter_> then check after sei(); the timer0 whether it is set correctly
[10:00:48] <iSaleK> Where do I check that?
[10:01:01] <iSaleK> I only have registers, stack pointer etc....
[10:01:17] <OndraSter_> IO view
[10:02:25] <iSaleK> Where do I enable it because it's disabled or hidden right now?
[10:03:03] <OndraSter_> somewhere in Debug => windows? or some other submenu of Debug
[10:03:12] <OndraSter_> I think
[10:10:58] <iSaleK> I've found it but I can't seem to find why my code isn't working :\
[10:11:02] <iSaleK> Can you take a look at it?
[10:12:05] <OndraSter_> 10 mins
[10:13:07] <iSaleK> ok
[10:16:38] <iSaleK> I've figured it out...for now at least :)
[10:16:46] <iSaleK> Thank you for the debugging thing... didn't know about that :D
[10:16:54] <iSaleK> (that extra window)
[10:17:44] <OndraSter_> oh hey there megal0maniac
[10:17:50] <OndraSter_> how's it hanging
[10:18:11] <megal0maniac> Meh
[10:18:15] <megal0maniac> Have to learn C
[10:18:23] <OndraSter_> heh
[10:18:25] <megal0maniac> But I'm procrastinating too much
[10:18:37] <OndraSter_> did you hear that I am switching from xmega32a4u to 128a4u on the smallest baords?
[10:18:38] <OndraSter_> boards*
[10:18:42] <OndraSter_> same size, same pinout, more flash and more RAM
[10:18:44] * megal0maniac nods
[10:18:48] <OndraSter_> k
[10:19:54] <megal0maniac> The coco is getting dusty though :P
[10:19:59] <OndraSter_> :F
[10:20:00] <OndraSter_> :D
[10:20:20] <OndraSter_> you should make sinewave generator :)
[10:21:39] <OndraSter_> iSaleK, I am now ready
[10:21:42] <OndraSter_> (fnished TWD episode)
[10:22:06] <iSaleK> OndraSter_: Thank you, I've fixed the timer0
[10:22:15] <OndraSter_> ah
[10:22:15] <OndraSter_> k
[10:22:18] <iSaleK> Now I have a question about spliting int into two numbers
[10:22:29] <iSaleK> for example if I have 25 i want to get 2 and 5
[10:22:40] <OndraSter_> itoa
[10:22:44] <iSaleK> Should I use % 10 and then substract that amount from original number?
[10:22:45] <OndraSter_> and treat it as string?
[10:22:46] <OndraSter_> or that
[10:22:59] <iSaleK> It should work?
[10:24:26] <OndraSter_> if you programm it corectly..
[11:00:47] * megal0maniac prints out main.c
[11:00:56] * megal0maniac rubs paper on AVR
[11:01:01] <OndraSter_> RUN DMANIT!
[11:01:02] <OndraSter_> DAMNIT*
[11:01:20] <megal0maniac> I'm in the mood to troll
[11:01:51] <megal0maniac> Maybe if I push the pins through the paper...
[11:03:53] <megal0maniac> Actually left all electronic stuff at home to force myself to do actual work
[11:04:01] <megal0maniac> And here I am, on IRC. Procrastinating
[11:05:13] <OndraSter_> yeah
[11:05:16] <OndraSter_> procrastination ftw
[11:05:19] <megal0maniac> I bought a set of nrf24l01+ boards for my friend. He has an atmega328 and attiny85. Would it be mean to make him use USI or should I donate another 328?
[11:05:25] * OndraSter_ still hasn't opened XIDE project for the past 4 days)
[11:05:34] <OndraSter_> meh USI
[11:05:41] <megal0maniac> Challenge though
[11:05:51] <megal0maniac> Although SPI would be a challenge in itself...
[11:06:05] <megal0maniac> What's the actual difference? Why is it so terrible to use USI?
[11:06:29] <megal0maniac> Or rather, what advantage do dedicated UARTS give you?
[11:06:47] <OndraSter_> you don't have to CLOCK it YOURSELF :D
[11:07:21] <megal0maniac> How is USI better than bit-bashing?
[11:07:44] <OndraSter_> you don't have to shift data and clock
[11:07:46] <OndraSter_> you just clock
[11:08:44] <megal0maniac> And with a UART you just watch it work all by itself?
[11:09:17] <OndraSter_> with UART you just put the data into DATA register and off it goes
[11:09:23] <OndraSter_> you don't have do to anything
[11:09:25] <OndraSter_> to do*
[11:09:31] <OndraSter_> same with SPI
[11:09:51] <OndraSter_> I suggest using USART in SPI master mode on xmega btw - it can go twice as fast (16Mbps) and can do DMA :)
[11:10:25] <megal0maniac> So you set registers to control baud / SPI freq and then just throw data at it?
[11:12:56] <OndraSter_> pretty much
[11:14:57] <megal0maniac> Okay. Then that's my next exercise. Remote blinking LED. One AVR tells another one to blink the LED :)
[11:16:03] <OndraSter_> hehe
[11:16:07] <OndraSter_> wirelessly
[11:16:34] <megal0maniac> Once I've got it working with serial, SPI and I2C
[11:16:45] <megal0maniac> Then I'll do it with nrf24l01+
[11:17:10] <megal0maniac> That should keep me busy for a while
[11:17:36] <OndraSter_> :D
[11:17:39] <OndraSter_> PROCRASTINATION!
[11:18:41] <megal0maniac> Hmmm
[11:18:49] <megal0maniac> I need to type out my resignation letter
[11:19:25] <megal0maniac> Even though I've already met the guy who's replacing me. He's been offered the job, accepted, and signed the contract, and I haven't even officially resigned :P
[11:21:01] <OndraSter_> wut
[11:21:04] <OndraSter_> Hi Ondra,
[11:21:06] <OndraSter_> Thank you for placing an order with Digi-Key. To continue processing your order I will need the folowihg information -
[11:21:08] <OndraSter_> 1. The name and address of your company. The quantities on this order are too large for personal use. You have also indicated this order is for company use.
[11:21:11] <OndraSter_> 2. The specific application - I will need you to provide specific information on the application for the parts on this order. What will you be using the development boards for?
[11:21:13] <OndraSter_> FUCK US
[11:21:28] <megal0maniac> Hi Digi-Key
[11:21:43] <OndraSter_> ;)
[11:21:55] <megal0maniac> I'm messing around with remote detonation devices. But no WMD or nuclear stuff, so it's fine, right?
[11:22:09] <OndraSter_> ;D
[11:22:10] <megal0maniac> And then things
[11:22:16] <megal0maniac> I'm too tired to get creative
[11:22:29] <OndraSter_> trolling ftw
[11:22:41] <megal0maniac> Am in the mood to troll, though
[11:23:15] <OndraSter_> I figured
[11:23:17] <OndraSter_> and read that
[11:23:54] <megal0maniac> Wise Ondra
[11:26:03] <megal0maniac> Was thinking about getting one of those OBD thingies. Basically just CAN to serial. And then writing a program for an AVR to read the serial data and put it on a 20x4 display, with a menu system.
[11:26:28] * megal0maniac wonders how well-documented the protocol is...
[11:41:14] <OndraSter_> I hate lying to the US export customs
[11:41:15] <OndraSter_> no wait
[11:41:16] <OndraSter_> I DO NOT
[11:42:54] <theBear> http://www.geekmyride.org/wiki/index.php/Open_Source_OBD_software i gonna go with pretty well documented
[11:45:45] <megal0maniac> theBear: I think I'll agree
[11:46:11] <megal0maniac> Just an idea :)
[11:51:38] <megal0maniac> theBear: Remeber that alarm I was talking about ages ago
[11:51:40] <megal0maniac> ?
[11:52:04] <theBear> erm, not so much
[11:52:21] <megal0maniac> I think you were drunk :P Anyways, it's based on an Intel P8032AH
[11:52:51] <megal0maniac> Which is not so dissimilar to the 8051
[11:53:58] <theBear> i was drunk for over 15 years until a few weeks ago
[11:54:16] <theBear> oh, modificating not building ?
[11:54:47] <megal0maniac> Yes :)
[11:56:57] <megal0maniac> It has no program memory. How the hell does it work, then?
[11:57:16] <theBear> erm, external eeprom ?
[11:57:29] <theBear> that's traditionally how things worked before pic and avr
[11:57:31] <OndraSter_> aye
[12:00:08] <megal0maniac> Ooh.
[12:00:11] <megal0maniac> Cool
[12:00:24] <megal0maniac> Seems to be the only difference between this and the 8051
[12:00:57] <OndraSter_> I have got here few 8051/31/32/52 or w/e were all those numbers
[12:00:59] <OndraSter_> just as Z80s
[12:01:38] <OndraSter_> with Z80 PIO/DMA/UART :)
[12:01:43] <OndraSter_> some
[12:01:50] <OndraSter_> some 32kB SRAM chips..
[12:02:13] <theBear> err, 8051 didnt have onboard prom did it ?
[12:02:20] <OndraSter_> no idea
[12:05:58] <megal0maniac> http://i.imgur.com/Z38so.png
[12:07:13] <theBear> heh, something new every day
[12:07:31] <theBear> heh, ram was smaller back then
[12:07:57] <megal0maniac> Found it. 1K serial eeprom right next to the mcu :)
[12:08:40] <theBear> nice
[12:13:22] <impulse> theBear: you quitting drinking?
[12:16:31] <theBear> i doubt it, just saw what it did to other people and got thinking a bit about why i chose to drink heavily and constantly in the first place... now i've seen the world sober, and i still don't like it, and well, if anything i'm better natured when drunk at ANY level, so err, i think it's for me
[12:16:53] <theBear> and i sure as hell ain't going back to pharmaceutical anti depressant/attitude adjusters
[12:21:38] <OndraSter_> huh if I were to move to the US I wouldn't be able to sell my xboard!
[12:21:43] <OndraSter_> what a beautiful thought
[12:23:05] <theBear> huh ?
[12:23:14] <OndraSter_> DES/AES
[12:23:25] <theBear> that stuff is STILL banned there ? damn
[12:23:31] <OndraSter_> exporting it - yes
[12:24:12] <theBear> ahh
[12:24:39] <megal0maniac> South Africa currently contains 100% of your market, so it's chilled
[12:24:56] <OndraSter_> ;D
[12:26:29] <megal0maniac> http://i.imgur.com/IML0D.png
[12:27:21] <megal0maniac> I guess I should be compiling something in order for it to be relevant :P
[12:27:26] <megal0maniac> Oh well. Too late
[12:27:43] <OndraSter_> wtflinux
[12:27:44] <megal0maniac> Crap, I'm finishing in 45 minutes and I haven't done any of what I needed to do
[12:27:45] <theBear> heh, lik ethe cartoon
[12:27:57] <megal0maniac> OndraSter_: On my phone. VNC from my computer :)
[12:28:00] <OndraSter_> :D
[12:28:03] <theBear> whats the fancy looking top ?
[12:28:09] <megal0maniac> top?
[12:28:20] <theBear> process monitor
[12:29:19] <megal0maniac> Oh. Well, I'm running Android. chrooted into Debian, running X with a VNC backend. SO, I'm piggybacking the Android kernel and thus see all of the phone activity from within Debian
[12:30:22] <theBear> yeah, but what is running inside the lxterminal in that picture ?
[12:30:29] <megal0maniac> Doh!
[12:30:37] <theBear> and that's kinda a good idea
[12:30:41] <megal0maniac> Sorry, just realised I misinterpreted the question :)
[12:30:43] <megal0maniac> htop
[12:31:51] <theBear> ahh, cool, might give it a go, looks nice.. i been looking at the same top for almost 20 years now :)
[12:32:26] <theBear> heh, already got it on here... had a feeling i'd looked around for a fancier top in the past
[12:32:35] <theBear> i like it
[12:32:45] <theBear> the gwbasic style button bar is handy too
[12:35:47] <megal0maniac> It is.
[12:36:12] <megal0maniac> The initial idea was to have an environment where I could write code, compile and upload from my phone
[12:36:22] <megal0maniac> But the Android kernel doesn't support CDC serial
[12:36:28] <megal0maniac> Or the avrisp mkii
[12:37:00] <megal0maniac> And I'm not clever enough to figure out compiling and loading kernel modules, so that was that :)
[12:43:23] <megal0maniac> Also I can't find the kernel sources
[12:49:37] <impulse> android doesn't seem very developer friendly
[12:53:45] <megal0maniac> impulse: The open developer community is important to us at Sony, and we have therefore made it possible to unlock the boot loader for certain releases of Xperia™ smartphones from 2011 and onwards.
[12:53:57] <megal0maniac> Maybe I should mail them and ask for sources :P
[12:54:06] <megal0maniac> Wouldn't know what to do with them, but it would still be cool
[12:54:19] <impulse> source for the bootloader?
[12:54:28] <jacekowski> impulse: if you think android is developer hostile, you should have seen other platforms
[12:54:44] <impulse> jacekowski: i'm comparing to linux on the desktop
[12:54:47] <impulse> that's my standard
[12:55:03] <impulse> i won't settle for less
[12:55:34] <megal0maniac> Ooh
[12:55:39] <megal0maniac> I've found this: http://developer.sonymobile.com/downloads/xperia-open-source-archives/open-source-archive-for-build-4-1-b-0-587/
[12:57:35] <impulse> i'll buy a smartphone when they have open-source baseband software
[12:58:23] <jacekowski> not going to happen
[12:58:25] <megal0maniac> Android is as close as it gets, afaik. Don't know anything about maemo
[12:58:33] <megal0maniac> Or whatever its called
[12:58:39] <jacekowski> maemo is dead
[12:58:43] <OndraSter_> meego
[12:58:45] <OndraSter_> .
[12:58:47] <OndraSter_> is dead too
[13:05:08] <megal0maniac> Yeah, but thought it might be more open
[13:06:34] <megal0maniac> Oh cool, kernel sources are in here
[13:06:41] <megal0maniac> wtf? In the makefile:
[13:06:43] <megal0maniac> NAME = Man-Eating Seals of Antiquity
[13:07:18] <OndraSter_> Jelly Bean
[13:07:19] <OndraSter_> .. :D
[13:08:34] <megal0maniac> Woah. qemu sources are here too
[13:09:39] <OndraSter_> because android emulator is not slow enough? :D
[13:09:45] <OndraSter_> emulating diff architecture sucks
[13:11:13] <megal0maniac> Home time. 'Night all :)
[13:11:25] <OndraSter_> nn
[13:35:29] <tld> Yay, finally remembered to pick up isopropyl alchohol
[13:43:59] <r00t|home> tld: as a beverage?
[13:44:12] <tld> flux-cleaning.
[14:22:44] <OndraSter_> oh awesome
[14:22:51] <OndraSter_> now email that it refused my credit card
[14:24:57] <OndraSter_> oh I think I know why
[14:25:02] <OndraSter_> now it needs SMS confirmation code
[14:25:20] <specing> lol
[14:26:00] <OndraSter_> awesome
[14:26:04] <OndraSter_> how am I supposed to get around that
[14:27:59] <OndraSter_> wtf
[14:28:04] <OndraSter_> my bank has changed all the settings for internet payments
[14:28:07] <OndraSter_> it enabled SMS confirmation
[14:28:15] <OndraSter_> lowered the limit to 1500 CZK (around $100)
[14:28:31] <OndraSter_> and actually disabled the internet payments alltogether (I found that out a month ago)
[14:28:35] <yunta> use wire transfer
[14:28:40] <OndraSter_> sirdancealot, Prague, you, me, beer?
[14:28:44] <OndraSter_> yunta, with digikey? How?
[14:29:04] <yunta> hm, I did it via normal transfer. I remember target bank was some german bank
[14:29:19] <yunta> I don't even own a credit card
[14:29:36] <yunta> don't remember how the ui looks like though
[14:30:29] <OndraSter_> AND THE WEB BANKING DOES NOT WORK HALF OF THE DAY
[14:30:31] <OndraSter_> are they shitting me
[14:30:35] <OndraSter_> I will end this soon probably
[14:30:51] <yunta> sounds like it's time to change your bank :)
[14:30:58] <OndraSter_> aye
[14:31:32] <OndraSter_> I am going there tomorrow
[14:31:51] <OndraSter_> although I should probably call, the poor lady at the desk can not do anything about that
[14:32:23] <yunta> same for call service....
[14:32:27] <yunta> just change it
[14:38:49] <Tom_itx> OndraSter_ why did they do that?
[14:39:16] <Tom_itx> why is she at the desk then?
[14:40:54] <yunta> Tom_itx: are you from us or what? the more social country the less they care about customer....
[14:41:58] <Tom_itx> i am
[14:43:01] <yunta> if it's not in the manual, it's impossible
[14:43:35] <yunta> I'll try it on zen-robotics :)
[14:44:14] <Tom_itx> ?
[14:44:31] <yunta> oops wrong channel :)
[14:44:57] <yunta> been writing to coworkers about troubles with voting at http://www.tosielamandiili.fi/
[14:45:09] <yunta> wanted to vote for jolla
[14:45:23] <yunta> idiotic page.....
[14:48:35] <inkjetunito> piensoutuvene :o
[14:50:48] <OndraSter_> <Tom_itx> why is she at the desk then?
[14:50:53] <OndraSter_> so you can put your money on your bank account!
[14:50:57] <OndraSter_> and start a new account!
[14:51:56] <yunta> and that only if you have a valid passport (in finland). having european personal ID is NOT enough
[14:51:58] <Tom_itx> why is your credit limit $100?
[14:52:30] <OndraSter_> beats me
[14:52:32] <OndraSter_> it was $1000
[14:52:42] <OndraSter_> it is $1000 still, but they added for online payments
[14:52:51] <Tom_itx> $1000??
[14:53:20] <Tom_itx> seems you could use that up pretty quick
[14:53:33] <OndraSter_> per week
[14:53:39] <OndraSter_> I can always change that
[14:53:52] <inkjetunito> yunta: huh? i wonder how their register description is
[14:55:28] <yunta> Tom_itx: it's czech republic, $1000 is a lot of money... unless OndraSter_ is rich :)
[14:55:47] <OndraSter_> :D
[14:55:48] <OndraSter_> aye
[14:55:55] <OndraSter_> it is actually $750 or thereabouts
[14:56:01] <OndraSter_> I keep forgetting that 20 CZK = $1 now
[14:56:04] <OndraSter_> instead 15CZK
[14:56:18] <Tom_itx> so we are recovering?
[14:56:25] <yunta> inkjetunito: nevermind, I think I voted already, that's why it doesn't work now
[14:56:26] <Tom_itx> or you are receeding
[14:56:31] <OndraSter_> both probably
[14:56:33] <OndraSter_> more like the 2nd
[14:56:41] <OndraSter_> we are getting into much more debts and crap
[14:56:46] <OndraSter_> yet the solution is very simple
[14:56:48] <Tom_itx> doesn't feel like a recovery on this end
[14:56:50] <OndraSter_> GET A NEW POLITICIANS
[14:56:53] <OndraSter_> but people are fucking stupid here
[14:56:57] <OndraSter_> and vote for the same idiots
[14:57:11] <yunta> people are stupid everywhere
[14:57:15] <OndraSter_> they have re-voted somebody who hasn't been in politics since 2004... after he left due to some confirmed stealing
[14:57:16] <Tom_itx> shoot all the politicians and vote in some statesmen
[14:57:18] <yunta> at least the average...
[15:04:34] <yunta> Tom_itx: example customer service in finland: I'm coming to company-only biggest mechanical shop in country: me: "hi, what are the rules of participation?" seller:"fill this paper", me:"any other rules?", him:"I don't know", me:"Like a minimum purchase per month?", him:"yeah, I guess 2ke/year, I don't know", me:"any other rules? how can I get that info", him: "online", me:"can you show me?", 5 minutes of searching and then: "can't find it, sorry"
[15:56:27] <OndraSter_> YESSSSSSSS
[15:56:31] <OndraSter_> I HAVE BEEN BILLED $206.17
[15:56:36] <OndraSter_> MrTrick, yipee
[15:58:05] <OndraSter_> "FedEx Int'l 1day"
[15:58:10] <OndraSter_> if it tomorrow leaves it will be here on wedesday
[15:58:19] <OndraSter_> or thursday if it stops at customs for more than 2 hours
[15:58:33] <OndraSter_> http://www.explosm.net/comics/2663/
[15:58:34] <OndraSter_> :D
[16:05:24] <OndraSter_> Tom_itx, btw I bought 500 resistors..
[16:05:28] <OndraSter_> instead of 50 or 100 :D
[16:05:32] <OndraSter_> and 40 LEDs
[16:05:36] <OndraSter_> because 50 is too mainstrea
[16:05:38] <OndraSter_> m
[16:20:23] <jacekowski> OndraSter_: 200 for shipping of what?
[16:20:37] <OndraSter_> a LOT of things
[16:20:55] <OndraSter_> 4k or 5k resistors in total
[16:20:59] <OndraSter_> 2k or so caps
[16:21:01] <OndraSter_> 25 xmegas
[16:21:06] <OndraSter_> 10 enc424j600
[16:21:10] <OndraSter_> some headers
[16:21:11] <OndraSter_> some LEDs
[16:21:18] <OndraSter_> some SMPS controllers
[16:21:22] <OndraSter_> :)
[16:21:50] <LoRez> and an overactive enter key
[16:22:00] <OndraSter_> ;)
[16:22:01] <OndraSter_> that is me
[16:22:05] <OndraSter_> not digikey
[16:27:29] <jadew> has anyone tried to build a dmm?
[16:30:26] <jadew> I think one can achieve 50 000 counts easily with an xmaga, not sure yet if going for the internal adc is a good idea or not
[16:33:39] <OndraSter_> I would not use internal ADC for that
[16:33:57] <OndraSter_> too much noise going on
[16:34:08] <OndraSter_> although xmega can go to deep power downs... but still
[16:34:13] <jadew> noise is your friend when you're oversampling that much
[16:34:25] <OndraSter_> meh oversampling.. get 24bit ADC :)
[16:34:32] <OndraSter_> either free sample from TI or buy them, 12.5€/pcs
[16:34:38] <OndraSter_> also the input circuitry is serious thing
[16:34:44] <OndraSter_> much more interesting than the ADC itself
[16:35:06] <jadew> for 12 euro I can get 12 mcus :P
[16:35:26] <OndraSter_> :D
[16:35:33] <OndraSter_> but none of them will have 24bit ADC
[16:35:42] <jadew> I want it to be as cheap as possible
[16:35:45] <OndraSter_> you do not want SAR if you want to measure AC stuff
[16:35:50] <OndraSter_> then buy those $10 DMMs off ebay
[16:35:58] <OndraSter_> you want integrating ADC for AC stuff
[16:36:10] <jadew> I want to measure DC, don't care about AC
[16:36:11] <OndraSter_> I won't be explaining why, it is surely somewhere on the internet :)
[16:36:14] <OndraSter_> oh
[16:36:17] <jadew> tbh, I never measure AC
[16:36:24] <jadew> I'm not an electrician
[16:36:26] <OndraSter_> I like sticking stuff into the wall socket
[16:36:32] <OndraSter_> I sometimes do electrician stuff :D
[16:36:51] <jadew> still, you wouldn't measure AC with your bench dmm :)
[16:37:06] <jadew> tbh, I have fairly small requirements for this thing
[16:37:30] <yunta> jadew: if you just need dmm - just buy dmm. you'll want good dmm to calibrate your own dmm anyway :)
[16:37:30] <jadew> 25-30V max, with 1mV resolution
[16:37:33] <OndraSter_> I'd much rather use something like somebody already built - xmega a3/a4 series
[16:37:36] <OndraSter_> with two ADCs
[16:37:39] <OndraSter_> small 128x64 OLED
[16:37:41] <OndraSter_> (1")
[16:37:45] <OndraSter_> and small oscope app for it :)
[16:37:55] <OndraSter_> both ADCs on the same pin = 4MSPS in X-t mode
[16:38:01] <OndraSter_> or 2MSPS in X-Y mode
[16:38:06] <jadew> yunta, I want a dmm with good acuracy and more than 10k counts
[16:38:32] <yunta> so you'll either have to borrow or buy some good one to calibrate yours. is it worth your effort?
[16:38:55] <yunta> may be faster to earn on dmm than build one. unless it turns you on :)
[16:39:08] <yunta> s/earn on/earn for/
[16:39:25] <jadew> I have a decent one... but I'll only calibrate it at low voltage and hope for the best at higher ones, where my current dmm doesn't have that great resolution
[16:39:33] <OndraSter_> as I said on another channel, my friend built one with the 24bit ADC and MSP430
[16:39:38] <OndraSter_> and then IR the data to PC :)
[16:39:56] <jadew> nice, but again, a 24bit ADC is kinda expensive
[16:40:10] <jadew> and TI refuses to send samples to me so screw that
[16:40:15] <OndraSter_> eh
[16:40:44] <jadew> yunta, btw, I noticed that you don't need much callibration if you have a good voltage reference
[16:40:57] <yunta> hm, true
[16:41:01] <jadew> even the adc result from an avr is spot on
[16:41:26] <yunta> do you have 5 count precise voltage reference?
[16:41:53] <Malinuss> I can actually kinda play .waw files now, and send it over AM. All using avr + two transistors. Just feel like bragging about it ;P
[16:41:54] <jadew> no, only 3
[16:42:16] <jadew> actually I don't know, my dmm doesn't do 5 counts :D
[16:42:20] <jadew> well, 4
[16:42:46] <Malinuss> With 8000byte/s there can't be much music though ;D
[16:45:10] <yunta> Malinuss: awesome :)
[16:46:37] <Malinuss> yunta, I hope I will have enough cpu/registers/interrupts to be abel to read them from a SD card. Then I could actually have my own home-avr-AM-station
[16:48:09] <yunta> how did you do am? dac? binary? binary+caps?
[16:49:23] <yunta> maybe you'd like to try FM with external frequency generator (ne555?) and avr based keying ?
[16:50:06] <Malinuss> yunta, nono. just a CTC timer that toggles a pin on compare match. Thats all ;D. at least for generating the wawe. for the wave carrier/wave modulation, I have a other PWM pin
[16:50:20] <Malinuss> and those two are "connected" via a transistor.
[16:50:56] <Malinuss> and the emmiter of the transistor sits in anohter transistor that opamp's the signal
[16:51:11] <Malinuss> so very simple. Haven't heard/read anyone doing it that way before though
[16:54:00] <jadew> OndraSter_, you know what's the deal with most high bit count ADCs?
[16:54:14] <jadew> they're not true hardware ADCs
[16:54:19] <jadew> yet they're freaking expensive
[16:54:31] <jadew> you can tell they're not true hardware ADCs because they have shitty sample rates
[16:55:11] <OndraSter_> duh?
[16:55:15] <OndraSter_> do you know how integration ADCs work?
[16:55:22] <OndraSter_> those sample at few kSPS
[16:55:30] <OndraSter_> you don't need blazingly fast sampling rate at DMM
[16:55:36] <OndraSter_> you are fine with few samples per second ;)
[16:55:49] <jadew> that's not my point
[16:55:58] <jadew> and you do need lots of samples per second on a DMM
[16:56:07] <jadew> especially if you want to go cheap
[16:56:19] <jadew> so you can increase the resolution by oversampling
[16:56:35] <OndraSter_> oversampling = meh. More actual bits = much better
[16:56:47] <jadew> now, when you see an adc that does 24bits let's say and it gives 10sps you know it's a scam
[16:56:55] <OndraSter_> DUH?
[16:56:56] <OndraSter_> http://en.wikipedia.org/wiki/Integrating_ADC
[16:56:57] <OndraSter_> look at this
[16:56:59] <jadew> it's just a lower resolution adc which does the same thing
[16:57:23] <OndraSter_> high resolution DMM ADCs are integration ADC
[16:57:23] <OndraSter_> s
[16:57:36] <OndraSter_> the longer they sample the more precise the value is
[16:57:45] <jadew> I went a bit earlier over the ADC types
[16:58:15] <jadew> yeah... well, I'd rather have one based on comparators
[16:58:26] <jadew> I mean, why pay extra for something that takes longer
[16:58:34] <jadew> which means it's something that you can do yourself
[16:58:44] <jadew> with a lower bit count adc and by oversampling
[16:58:48] <jadew> it's the same crap
[16:59:02] <jadew> just 50 times more expensive
[16:59:58] <OndraSter_> so
[17:00:11] <OndraSter_> if you have got 50Hz junk being inducted into your circuit
[17:00:12] <jadew> take this one for example: ADS1110A0IDBVT A/D converter; Channels:1; 16bit; 240sps; SOT23-6
[17:00:17] <OndraSter_> and you use flash or SAR ADC
[17:00:22] <OndraSter_> what will happen with the shown value?
[17:00:47] <jadew> when you oversample the junk allows you to get higher resolution
[17:00:58] <jadew> because the junk is junk around your true value
[17:01:25] <jadew> so when you take 1000 readings and average, you get that value
[17:01:34] <jadew> however if you divide by 100, instead of 1000
[17:01:39] <jadew> you get higher resolution
[17:02:32] <OndraSter_> resolution maybe
[17:02:35] <OndraSter_> but what about precision?
[17:02:53] <jadew> well, since you're oversampling, you get precision as well
[17:03:11] <jadew> you're not bound to display some random occurence as the true value
[17:05:08] <yunta> jadew: weren't you building dmm for power source measurement?
[17:05:24] <yunta> oversampling doesn't make much sense for linear input....
[17:05:27] <OndraSter_> okay, I will get true integrating 16bit ADC and you will use 12bit SAR ADC with oversampling and we will compare the results
[17:06:12] <jadew> yunta, why not?
[17:07:14] <yunta> no input frequency (0Hz) gives you stable result on stable adc of any bit-depth
[17:07:21] <yunta> collecting more samples doesn't change anything
[17:07:45] <jadew> yunta, there's a lot of noise everywhere, that noise allows you to get a better reading
[17:08:05] <jadew> like you can get down to the microvolt with sufficient samples
[17:08:43] <yunta> unless you build very good power supply :)
[17:09:02] <jadew> I have about 10mV of noise in my room on any wire :P
[17:09:41] <jadew> but yeah, if the ps would be supper awesome, you'd have to introduce noise yourself
[17:10:21] <yunta> why would you want to collect samples faster then? can't you just collect samples for 10s ?
[17:11:03] <jadew> yunta, well I want to be able to update the value on the screen faster than once every 10 seconds
[17:12:12] <jadew> currently I'm using an atmega8 to get a 25000 count reading with 17bit resolution
[17:12:33] <OndraSter_> 10bit oversampled to 17bit?
[17:12:35] <OndraSter_> duh
[17:12:36] <jadew> yeah
[17:12:39] <jadew> but it takes a while
[17:12:44] <jadew> about 1 second, if not more
[17:12:45] <OndraSter_> I would point out something but... no
[17:13:12] <jadew> well, I'm just preparing for the xmega
[17:13:31] <jadew> and I know you're doubting this, but it is working
[17:13:34] <yunta> at 1msps you'll get to 128bit ;)
[17:13:48] <jadew> yunta, nah
[17:14:18] <jadew> for x being the number of bits you need to improve the resolution by
[17:14:30] <jadew> you have to sample (x * 2) ^ 2 times
[17:15:14] <OndraSter_> btw you and your fast sampling with SAR - if there is some high pitched noise so small that it is missed many times
[17:15:24] <OndraSter_> your SAR will not detect it
[17:15:27] <OndraSter_> integrating ADC will
[17:15:57] <jadew> if it's so small it won't affect the voltage the resulting voltage that much for it to count
[17:15:58] <OndraSter_> also the analog frontend of the DMM is much, much more difficult and awesome to make
[17:16:12] <jadew> yeah, that's not the issue right now
[17:16:16] <jadew> it
[17:16:23] <jadew> and I don't think it's that difficult
[17:16:45] <jadew> when you detect an overload you just switch on a different voltage divider / amplifier
[17:18:34] <jadew> I'm not sure why expensive dmms are so expensive cuz I think there's not that much to them as they'd like us to think it is
[17:19:41] <yunta> thermal stability, lots of functions, very high z, good mechanics
[17:20:08] <OndraSter__> <OndraSter_> eh
[17:20:08] <OndraSter__> <OndraSter_> may I ask, how old are you?
[17:20:08] <OndraSter__> <yunta> thermal stability, lots of functions, very high z, good mechanics
[17:20:10] <OndraSter__> -- disconnected
[17:20:11] <jadew> you only need thermal stability for the voltage reference
[17:20:16] <OndraSter__> no
[17:20:21] <OndraSter__> you need thermal stability for every single part
[17:21:03] <OndraSter__> input divider and opamp
[17:21:07] <OndraSter__> for the ADC
[17:21:10] <jadew> OndraSter_, well, yeah the voltage dividers as well
[17:21:13] <jadew> the opams no
[17:21:17] <jadew> they will just follow voltage
[17:21:26] <OndraSter__> but they drift a bit
[17:21:49] <jadew> and yeah, naturally the ADC, but I don't think it's as important as the voltage source
[17:22:09] <jadew> so 0.1% resistors and a good voltage source + a fast ADC that's all it comes down to
[17:22:32] <OndraSter__> 0.1% resistors and you want 1uV precision?
[17:22:47] <jadew> OndraSter_, no
[17:22:52] <jadew> I want 1mV precission
[17:23:03] <OndraSter__> oh
[17:23:33] <jadew> but that's something your regular dmm can't do, isn't it?
[17:23:43] <jadew> only the ones they sell for $200+ can
[17:23:57] <jadew> and my atmega8
[17:23:59] <OndraSter__> what, 1uV?
[17:24:08] <jadew> 1mV at higher voltages
[17:24:13] <jadew> say 10V
[17:25:32] <yunta> hm, interesting
[17:25:44] <yunta> won't you end up dividing that before feeding to adc anyway?
[17:25:53] <jadew> yeah, you would
[17:26:11] <jadew> you basically say, ok I want to have this range 0..20V
[17:26:16] <jadew> I have a 5V reference
[17:26:35] <jadew> so I have to divide it so 20V becomes 5V
[17:27:02] <jadew> then you will need a resolution that can represent each mV
[17:27:07] <yunta> so you need 0.25mV precision on adc?
[17:27:08] <jadew> the higher the better
[17:27:14] <jadew> so you can drop off LSBs
[17:28:07] <jadew> well, theoretically you only need 1mV precision, but you want to do better than that
[17:28:19] <jadew> so it doesn't change between readings
[17:29:06] <jadew> like if your voltage is fluctuating between 5.0004V and 5.0006
[17:29:12] <jadew> you want it to read 5.000
[17:32:12] <OndraSter__> duh?
[17:32:21] <OndraSter__> you want it to read 5.0005
[17:32:28] <OndraSter__> which rounds up to 5.001
[17:32:29] <OndraSter__> err
[17:32:32] <OndraSter__> 5.01
[17:32:37] <OndraSter__> ERR
[17:32:39] <OndraSter__> 5.001
[17:32:56] <MrTrick> OndraSter__: Excellent. Let me send you money.
[17:33:04] <OndraSter__> MrTrick, it hasn't arrived yet :)
[17:33:14] <OndraSter__> if they ship it tonight it will arrive on wednesday morning
[17:33:44] <MrTrick> that's not bad.
[17:33:57] <OndraSter__> Estimated Delivery: Nov 22, 2012 by 12:00 PM
[17:34:03] <OndraSter__> I'd prefer after 12:00 PM
[17:34:09] <OndraSter__> because I am 0915 - 1045 at school
[17:34:14] <OndraSter__> add 1.25 hours for travel there and back
[17:34:32] <OndraSter__> 0.8kg
[17:34:33] <OndraSter__> only? :(
[17:35:37] <jadew`> [01:17] <jadew> you want it to read 5.000
[17:35:37] <jadew`> [01:20] <OndraSter__> duh?
[17:36:01] <jadew`> pc turned off
[17:36:11] <OndraSter__> <OndraSter__> you want it to read 5.0005
[17:36:11] <OndraSter__> <OndraSter__> which rounds up to 5.001
[17:36:39] <OndraSter__> anyway, I am getting up in 6 hours
[17:36:42] <OndraSter__> to school.
[17:36:42] <OndraSter__> gn
[17:36:47] <jadew> well, yeah you can round up, that's not the point
[17:36:48] <jadew> night
[17:40:06] <yunta> jadew: I think you approach makes sense down to 1mV. Below that you may need temp compensation even for opamps.
[17:40:43] <yunta> s/you/your/
[17:40:50] <jadew> yeah, it's possible, but I don't really need that at this range
[17:41:19] <Tom_itx> so OndraSter__
[17:41:24] <Tom_itx> how much was your order?
[17:41:34] <Tom_itx> you can't have too many resistors
[17:41:48] <yunta> <OndraSter_> I HAVE BEEN BILLED $206.17
[17:41:53] <yunta> he went to sleep
[17:42:26] <Tom_itx> that's not so bad
[17:42:35] <Tom_itx> why are you still awake?
[17:44:01] <yunta> didn't finish my work yet
[17:44:34] <Tom_itx> i should investigate the CTC timer mode i suppose. i've never used it but it's come up here several times as of late
[17:48:55] <Tom_itx> mmm, seems to be a more efficient timer mode
[18:02:27] <MrTrick> Tom_itx: what are you trying to time?
[18:02:38] <Tom_itx> tim
[18:02:38] <Tom_itx> e
[18:02:42] <Tom_itx> nothing
[18:02:50] <Tom_itx> sometimes i just learn stuff
[18:03:22] <MrTrick> Fair enough. :-)
[19:49:25] <slidercrank> Hi everyone. I'm a complete noob at electronics. Trying to make my first board on atmega8a-pu. The board is supposed to be powered with +3.3V. I find it difficult to decide what capacitors to choose 1) to connect Vcc and GND. 2) two capacitors for an external oscillator (the XTAL1 and XTAL2 pins).. What resistor to choose for RESET. Could anybody tell me the exact values or how to determine them?
[19:50:36] <slidercrank> it's going to be a 16MHz oscillator
[19:51:19] <Tom_itx> crystal?
[19:51:32] <Tom_itx> don't screw up the fuse bits or you won't be able to use the chip
[19:51:43] <Tom_itx> it's a very common noob mistake
[19:51:54] <Tom_itx> 22pf caps on the crystal
[19:52:02] <Tom_itx> 10k pullup on reset
[19:52:19] <slidercrank> how did you calculate them? Is there any doc?
[19:52:21] <slidercrank> thank you.
[19:52:36] <slidercrank> Tom_itx, how can I screw it? Is it a programming part? I think I'll handle it
[19:52:49] <Tom_itx> the caps are generally specified in the data sheet for the crystal
[19:52:56] <Horologium> fuses are settings on the chip that determine things like clock source.
[19:53:15] <Tom_itx> slidercrank, if you choose the wrong clock source the chip won't clock and you won't be able to recover it easily
[19:53:30] <Horologium> years back they were one shot settings, once set you couldn't change them...literally you put current through them and blew the fuse.
[19:53:31] <Tom_itx> so before you do it ask someone
[19:54:03] <slidercrank> Thank you for the information
[19:55:04] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[19:55:22] <slidercrank> and if I want to use a voltage regulator (to reduce voltage from +5 or +3.6V to +3.3, are these caps ok to use: 100mF (electrolytic) ad 22nf (ceramic)?
[19:55:38] <slidercrank> *and
[19:56:42] <Tom_itx> why do you need 3.3v?
[19:56:45] <slidercrank> oh. I wish I had a breadboard. Unfortunately I have to solder electronic parts (which is very inconvenient as I know I'll have to resolder it many times)
[19:57:12] <slidercrank> I want to attach an LCD display and a thermosensor (which I already have). They require +3.3V
[19:57:46] <Tom_itx> that's fine but there are ways around that
[19:57:47] <slidercrank> and atmega8a is known to work at 2.7..5.5V. So 3.3 is fine
[19:57:51] <Tom_itx> using voltage dividers etc
[19:59:26] <jadew> slidercrank, the caps to use for the voltage regulator are specified in the datasheet
[19:59:31] <jadew> their values are not set in stone tho
[19:59:51] <Tom_itx> they are set in carbon
[19:59:55] <jadew> for one, you can always go higher with no consequence on those ones
[20:00:35] <jadew> 100mF is a bit high tho
[20:01:11] <slidercrank> jadew, in the datasheet for the micronontroller? I tried to find it but failed. (maybe I was overwhelmed with information or it was not clear to me)
[20:01:24] <jadew> depending on what you're using to power the board, it might take a while to charge so the board will be left without current for a bit
[20:01:48] <jadew> the ones for the voltage regulator should be in the datasheet of the voltage regulator
[20:02:24] <jadew> for the microcontroller you need decoupling caps, 100nF ceramic (sometimes more of those)
[20:02:33] <jadew> they should be specified in the datasheet
[20:03:50] <jadew> the ones on the voltage regulator are for filtering
[20:03:52] <slidercrank> jadew, does this value depend on the voltage?
[20:04:19] <jadew> slidercrank, no, 3.3, 5, doesn't make much of a difference
[20:05:29] <slidercrank> thank you, guys. You're very helpful and it's hard to get started. I hope I'll do well:)
[20:06:07] <jadew> np, but take Tom_itx's advice and ask in here before setting the fuses
[20:06:29] <slidercrank> I will.
[20:07:19] <slidercrank> btw, where do you order electronics parts?
[20:07:34] <slidercrank> which site is best? (cheaper)
[20:07:46] <jadew> which continent?
[20:07:50] <slidercrank> Russia
[20:08:09] <jadew> I'm using tme.eu
[20:08:22] <jadew> farnell is usually expensive
[20:08:38] <jadew> you could also try rsdelivers.com
[20:08:53] <slidercrank> ty
[20:09:01] <jadew> http://ru.rsdelivers.com/