#avr | Logs for 2013-11-05

Back
[03:03:41] <megal0maniac> Shit, sorry for the channel spam. Just got home, seems my internet is having an off day :/
[03:06:52] <Valen> its ok, we'll just be passive aggressive about it
[03:08:14] <Valen> its ok, we'll just be passive aggressive about it
[03:08:48] <megal0maniac> zlog
[08:14:58] <ambro718> has anyone written a cycle count calculator for avr assembly (for simple code without loops)?
[08:30:57] <BusError> Heres my mini coroutine implementation in a few lines, with demo code: http://pastebin.com/G0EyyDYq
[08:47:34] <ambro718> BusError: Cool!
[08:48:03] <ambro718> I wasn't even sure if avr-gcc implements setjmp/longjmp
[08:51:37] <BusError> yeah it works. it's not rocket science really. takes 23 bytes, so it's not that much on a mega. It's pretty nice to have stack friendly coroutines too
[08:52:35] <ambro718> though technically such use is incorrect, C standard basically says the jump point created by setjmp is invalidated once you leave the scope in which it appears (which is what happens in your yield)
[08:52:56] <BusError> could save 4 more bytes of stack if I managed to tell gcc not to save r28/29 on entry, and by replacing the 'call' to longjmp by a jmp
[08:53:27] <ambro718> would it not be possible to do all the switching manually without abusing setjmp?
[08:53:29] <BusError> theorically yes because the stack get clobbered, but in my case, I knwo the stack is discrete
[08:54:08] <BusError> basically you'd end up reimplementing them.. it's just a context save/restore really in this case...
[08:55:12] <BusError> I use setjmp/longjmp on many other arch (in a more fluffy implementation of this) and it works fine. Linux also has a wayt o save restore the context, but the apis is not available with all the libc implementations
[08:55:49] <BusError> on cortex-m4 I have my own implementation, but simply because I want to save the FPU registers as well...
[08:56:08] <ambro718> you mean setcontext and friends?
[08:56:16] <BusError> yeah
[08:56:24] <ambro718> yes that looks what you'd need to implement it "portably"
[08:56:40] <BusError> not available in uclibc, and not on mips64, etc. a bit too limiting
[09:04:05] <ambro718> Suppose I enable some interrupt but set a global variable before that (something like x=5; TCCR1=1<<TCIE1;). Do I need to be careful with the compiler reordering the x=5 write - can it happen the interrupt executes before x=5?
[09:04:56] <ambro718> but there's no cli/sei (which contain a memory clobber), interrupts are already enabled
[09:06:53] <BusError> no these are proper defined behaviour, they won't be reordered. There is just a one stage pipeline on AVR, and no way/reason to reorder the assignments
[09:07:52] <ambro718> I'm not worried about the CPU but about the compiler
[09:08:34] <BusError> compiler won't either; these are not "undefined behaviour" expressions, these are proper statements
[09:09:55] <ambro718> yeah I guess I'll leave it for now
[09:10:20] <BusError> mind you, if that variable is read from another context, it's a good idea to make it volatile; despite the recommendation on more complex system not to use volatile and use a memory barrier
[09:10:27] <beaky> hello
[09:10:41] <beaky> what is the most interesting avr
[09:10:47] <BusError> MINE!
[09:10:59] <beaky> what model?
[09:11:17] <megal0maniac> No, mine!
[09:11:23] <BusError> ^J
[09:11:26] <beaky> whats your models
[09:11:26] <BusError> hehe
[09:11:27] <megal0maniac> BusError: Yours is silly. Mine is most interesting
[09:11:27] <beaky> a
[09:11:41] <beaky> what makes yours most interesting
[09:11:54] <megal0maniac> beaky: It's more interesting than BusError's
[09:12:16] <BusError> mine's cutter. it has a nice opaque black top with a pretty logo and unreadable text on it. Awesome
[09:12:34] <megal0maniac> But mine has more pins
[09:12:55] <megal0maniac> And built-in GPS
[09:13:00] <BusError> but mine has LESS pins. surely less is more!
[09:13:11] <megal0maniac> Not when there's GPS!
[09:13:16] <beaky> wow what avr has builtin gps
[09:13:19] <megal0maniac> Mine!
[09:13:23] <beaky> what model?
[09:13:30] <megal0maniac> It's a secret
[09:13:34] <megal0maniac> BusError knows
[09:13:54] <BusError> can't tell. I promised
[09:14:30] <beaky> but i want to learn about interesting avrs so i know what to use in future
[09:14:37] <beaky> e.g. there is an avr with builtin usb
[09:14:43] <beaky> or one with spi builtin
[09:14:47] <megal0maniac> There is???
[09:14:50] <megal0maniac> Tell me!
[09:14:58] <megal0maniac> I neeeeeeed dis
[09:15:19] <beaky> most avrs have spi
[09:15:25] <megal0maniac> Oh. Cool
[09:15:33] <beaky> and i think one of the AT90USB series have usb
[09:15:52] <megal0maniac> BusError: Does YOURS have USB?
[09:16:35] <beaky> btw why use at90usb over ftdi
[09:16:40] <BusError> no, but it's on USB anyway, MINE has better Kung Fu
[09:17:16] <megal0maniac> Oh yeah. The Kung Fu factor is pretty crucial
[09:17:26] <BusError> (it's true actually ;-)) https://plus.google.com/111387094029238541867/posts/gW6ackz6N5c
[09:21:33] <megal0maniac> Snazzy. I made the same thing, except with PDIP instead of SOIC.
[09:22:08] <megal0maniac> I do have a SOIC attiny though, just arrived too late for that project :)
[09:22:50] <megal0maniac> BusError: Where is the PCB from?
[09:23:00] <BusError> I like the tiny85's. wish they were making them in narrow SOIC too, not fat bugs
[09:23:11] <BusError> ordered from oshpark. new favourite board house
[09:23:18] <megal0maniac> I was pretty disappointed with my fat bug
[09:23:40] <BusError> I use 3M clamps to program them, pretty handy
[09:23:47] <megal0maniac> But I got a tiny10 in sot23-6 to make up for it :D
[09:24:31] <BusError> I got a few samples of tiny10, but never used them. at the time I got them there was no tools. Also, you couldn't program then in C (can you these days?)
[09:25:43] <BusError> it was quite disapointing to realize they werent 'true' avr8's
[09:27:13] <ambro718> what's different about them?
[09:27:50] <megal0maniac> Yip, it has full avr-gcc (avr-libc?) support :)
[09:28:06] <BusError> they are a sort of cut down version. I think atmel wanted to compete with the small 6 pins PIC
[09:28:08] <BusError> oh cool
[09:28:45] <beaky> how does avr compare to pic? i never used pic but my store is full of them
[09:28:45] <megal0maniac> ambro718: Limited instruction set, less general registers, 8bit ADC instead of 10bit (where applicable), no debugging etc
[09:29:04] <megal0maniac> beaky: AVR is obviously better
[09:29:30] <BusError> ambro718, yeah for example 16 registers, not 32
[09:29:43] <ambro718> is it true some tinys don't even have ram?
[09:29:53] <megal0maniac> ambro718: Don't think so
[09:30:19] <megal0maniac> I /think/ the attiny10 has about 32bytes, which is almost nothing :)
[09:30:32] <BusError> wouldnt be able to run, on AVR the registers ARE sram...
[09:31:05] <BusError> yeah tiny10 32 bytes of sram. help :-)
[09:31:26] <beaky> 32 bytes ought to be enough for anybody
[09:31:44] <beaky> 32 + all those 20 general purpose registers
[09:31:47] <ambro718> but you can add external ram and write an interpreter for full avr instruction set!
[09:32:00] <megal0maniac> ambro718: But 6 pins!
[09:32:08] <megal0maniac> And 2 of them are vcc and ground!
[09:32:43] <BusError> not sure I can port simavr into 32 bytes of ram :>
[09:33:14] <megal0maniac> They also have hardly any fuse bits, e.g. clock source is selected in software, defaults to inter osc.
[09:33:22] <megal0maniac> *internal
[09:33:31] <ambro718> well at least you can implement brainfuck ;)
[09:34:26] <megal0maniac> With no hardware serial?
[09:37:57] <Casper> ambro718: some have like... 32 BYTES of ram...
[09:38:12] <Casper> at that point, you can say that there is no ram :D
[09:38:17] <megal0maniac> Casper: Yeah, the attiny4/5/9/10
[09:38:34] <ambro718> so what are these used for in the real world?
[09:38:44] <megal0maniac> Well they have PWM
[09:38:46] <megal0maniac> And ADC
[09:39:04] <BusError> they can be quit ehandy to do small logic level things
[09:39:11] <megal0maniac> And the usual interrupt stuff
[09:39:35] <BusError> did a pro project recently that was using 16 bytes.. with the stack usage, I expect I might have fit in 32 possibly.
[09:44:18] <BusError> anyway, what new avr has been released in recent times? apart form the xmegas I don't give a damn about :-)
[09:45:16] <megal0maniac> Well...
[09:45:18] <megal0maniac> Nothing
[09:45:27] <megal0maniac> xmega or SAM D20
[09:45:36] <BusError> bleh
[09:45:46] <megal0maniac> Why not xmega? xmega is great
[09:45:58] <megal0maniac> peripherals everywhere!
[09:46:17] <BusError> if I want powa, I use a stm32. FPU FTW
[09:46:57] <megal0maniac> I was considering one of those AllWinner A10 boards
[09:46:59] <BusError> i droll everytime I read the datasheet of these monsters
[09:47:57] <BusError> different toys really... AVR8 is fantastic for a lot of stuff, cortex-M3/4 are also great for the "next step up", arm9 is the next step up, then comes the more modern cortex-AXs
[09:48:03] <megal0maniac> Hahahahaha!!! http://www.hotmcu.com/hystm32f1xxcore144-coredev-board-p-2.html?cPath=1_20
[09:48:16] <megal0maniac> "it can be used with standard solderless breadboards"
[09:48:28] <megal0maniac> Do you see the problem here?
[09:49:25] <BusError> if you want a play with nice linux toys, try the imx233 olinuxino. /these/ are breadboadables
[09:50:05] <megal0maniac> BusError: Yeah, I guess. Xmega is pretty damn powerful for much the same stuff as regular AVRs
[09:50:16] <BusError> if you want stm32, just get a dirt cheap stm32discovery
[09:50:23] <megal0maniac> That board will blow up if you breadboard it
[09:51:05] <megal0maniac> I need some work first. Also, I have two launchpads to play with... :)
[09:51:39] <megal0maniac> What is the price on those again? I've checked before but you need a login
[09:52:34] <BusError> 10 GBP. dunno, 13 euros? scary money for the board
[09:53:01] <BusError> they have release a new one too, with a TFT and touch screen for like 15 GBP, and /even bigger/ MCU, exernal ram etc
[09:55:38] <megal0maniac> Wow..
[09:58:37] <megal0maniac> I would like a Xilinx platform JTAG cable which doesn't require an FPGA to make
[09:58:48] <BusError> http://uk.farnell.com/jsp/search/productdetail.jsp?SKU=2355377 check that monster
[09:59:11] <BusError> you can use any FTDI/jtag cable to program xilinx
[09:59:48] <megal0maniac> BusError: Not with ISE
[10:00:06] <megal0maniac> That is amazing for that price
[10:00:22] <BusError> I used to do it, last time I played with them. there's a hack in linux that replaced the DLL for impact
[10:00:45] <BusError> I used an Amontec JTAGkey for a while, then a fancier usb2 one
[10:00:46] <bss36504> How does one connect the DMAC on an xmega to the actual memory? Is the physical interface arbitrary or is it defined somewhere. I just skimmed the DMAC section of the xmegaC manual and didnt see anything on how to connect to an external memory.
[10:01:14] <megal0maniac> Yeah I read about that. RikusW turned a 32u2 into an Altera blaster. Would like to do the same for Xilinx ;)
[10:01:43] <BusError> installing the tools is just too much work. bloody bloatware
[10:05:33] <ambro718> why can't I run SPI slower than f/128?
[10:05:52] <bss36504> because that is the largest clock div they put in the chip
[10:06:08] <megal0maniac> Drop f_cpu :)
[10:06:10] <ambro718> yes but it's still pretty fast
[10:06:13] <bss36504> or bit bang it
[10:06:23] <megal0maniac> nop nop nop
[10:06:33] <bss36504> if you need slower than f/128, you wont care about bit banging it.
[10:07:03] <bss36504> usually you DONT bitbang because you WANT speed. But in your case, it would work well.
[10:07:28] <bss36504> megal0maniac: nop nop nop says the atmel dinosaur
[10:07:39] <megal0maniac> :)
[10:07:47] <ambro718> well I want it slower because I use SPI interrupt, and when I'm doing the transfer that means interrupt will interfere with other interrupts
[10:08:07] <bss36504> well what other interrupts?
[10:08:19] <ambro718> all sorts, timers, adc, usart
[10:08:36] <bss36504> right, so they'll be queued according to the interrupt vector number
[10:08:53] <bss36504> idk off hand where the spi falls on that list, but you might be ok.
[10:08:59] <megal0maniac> Pfft. Just emulate hyperthreading
[10:09:04] <bss36504> haha nice
[10:09:36] <ambro718> yeah that's the thing, spi has higher priority than rx interrupt, which makes losing rx bytes more likely
[10:10:48] <ambro718> AVR should really have adjustable interrupt priority, that would make all my problems go away...
[10:10:57] <bss36504> maybe I'm wrong, but I think it will service that interrupt as soon as it can, but youre right, you might not catch it in time.
[10:11:12] <bss36504> what controller are you using?
[10:11:17] <megal0maniac> overflow all the stacks!
[10:11:29] <ambro718> 2560 but I don't see how it matters
[10:11:39] <bss36504> Oh I was just curious if it was xmega....
[10:11:51] <bss36504> they have a different interrupt system
[10:11:54] <ambro718> does xmega have some kind of spi dma?
[10:12:06] <megal0maniac> ambro718: They have dma
[10:12:11] <megal0maniac> And they have spi
[10:12:22] <bss36504> well actually it has both a DMA and it can do SPI->DMA and vice versa
[10:12:42] <bss36504> very capable chips.
[10:12:56] <bss36504> Plus I think they have a round robin scheduler for the interrupts
[10:13:00] <BusError> just use the interrupt for the /minimum/ amount of time, for example, get the byte quick, put it in a FIFO, exit interrupt. then in main() poll the fifo to do the processing
[10:13:07] <ambro718> how about polling via spi, can the dma do that?
[10:13:12] <bss36504> with changable priority
[10:13:22] <bss36504> I have no idea
[10:13:37] <bss36504> I've never done it myself, all I have is some quick skim information from the datasheet.
[10:14:05] <bss36504> I've never needed or used an xmega, so I haven't taken the time to thoroughly read the documentation.
[10:14:36] <bss36504> sorry if that's unhelpful, but I know the info is there if you're willing to look. It might be what you need.
[10:15:12] <ambro718> yeah it probably is better but I'm developing for this chip
[10:15:17] <ambro718> just asking out of curiosity
[10:15:28] <bss36504> Chapter 11 of the XmegaC manual is "Interrupts and Programmable Multilevel Interrupt Controller"
[10:16:08] <bss36504> Short and predictable interrupt response time • Separate interrupt configuration and vector address for each interrupt • Programmable multilevel interrupt controller
[10:16:09] <bss36504> – Interrupt prioritizing according to level and vector address – Three selectable interrupt levels for all interrupts: low, medium and high – Selectable, round-robin priority scheme within low-level interrupts – Non-maskable interrupts for critical functions
[10:16:09] <bss36504> • Interrupt vectors optionally placed in the application section or the boot loader section
[10:16:27] <bss36504> sorry for that horrible looking copy/paste
[10:16:56] <ambro718> yes I know, I've peeked at the datasheet before
[10:16:57] <megal0maniac> Thanks bss36504. I just lost my lunch
[10:17:10] <bss36504> But you may have to optimize your code a bit to spend less time in an interrupt by caching any data somewhere else like BusError said
[10:17:27] <bss36504> megal0maniac: lets not be dramatic :P
[10:18:32] <megal0maniac> BusError: Do you see why I like these chips?
[10:20:08] <megal0maniac> mega has interrupt on/off. xmega has off/low/med/high and different ways of serving them. mega has pull-up on inputs. xmega has pull-up, pull-down, wired-and, wired-or, bus-keeper, inverted io, totem-pole. I could go on for days
[10:20:19] <BusError> well I suggest you don't look at a fancy arm interrupt controller, MMU, DMA controller or any of the other fancier bits. AVR is fisher price grade in comparison :-)
[10:20:55] <megal0maniac> BusError: Yeah, but as an atmega replacement
[10:32:08] <bss36504> Xmega is probably the top of the line 8-bit processor. It's easy to use (more or less) and has an incredible amount of power and flexibility. As soon as ARM comes into play, things get more complicated very quickly, at least in my experiance.
[11:18:43] <megal0maniac> How strange. When the compiler is set to build 32bit binaries, Avast pees itself everytime an .exe appears. But x64 executables are okay
[11:21:11] <OndraSter_> ambro718, yes, xmega can do DMA on SPI. But only if it is slave I think. If it is master, you have to use UART in SPI mode :)
[11:21:16] <OndraSter_> and then you can use DMA even there
[11:21:19] <OndraSter_> (or was it vice-versa?)
[11:21:21] <OndraSter_> can't remember anymore
[11:21:28] <OndraSter_> and yes, xmega has multilevel interrupts
[11:23:14] <ambro718> OndraSter_: do you know if it can do "spi polling", i.e. continuously do transactions until the received byte has some property, such as being different from 0xff ?
[11:23:28] <ambro718> sd cards need that for example
[11:24:57] <OndraSter_> ambro718, ohh... well you could try hooking it to the "extclk output" and the MISO pin to events..
[11:25:11] <OndraSter_> and if it goes to something other than HI then it will trigger some event (or interrupt)
[11:25:39] <megal0maniac> You could just use pin change interrupt for that
[11:25:43] <OndraSter_> yes
[11:25:51] <megal0maniac> On an attiny even
[11:25:53] <OndraSter_> but I am not sure if SCK and extclkout are on the same pins
[11:26:10] <OndraSter_> (with my luck they would not be)
[11:26:10] <N1njaneer> You still need to continuously send bytes out on the SPI in order to poll, which requires checking to see if the SPI write buffer is avaliable, which at that point why not just check the receive buffer at the same time?
[11:26:46] <ambro718> I implemented this as part of my SPI abstraction (on normal AVRs, using SPI interrupt). There's a command queue supporting four kinds of commands (read buffer, read until different, write buffer, write byte). https://github.com/ambrop72/aprinter/blob/master/aprinter/system/AvrSpi.h
[11:27:25] <N1njaneer> ambro718: Just be aware of the number of clock cycles that are chewed on the interrupt call :)
[11:27:26] <ambro718> already works well to initialize SD card, reading yet to be implemented
[11:27:49] <ambro718> yeah, spent some hours looking at resulting assembly and optimizing ;)
[11:27:59] <ambro718> it's about 150 cycles I think
[11:30:10] <N1njaneer> What clock speed are you running the micro at?
[11:30:15] <ambro718> 16MHz
[11:30:25] <OndraSter_> btw ambro718 I overclocked xmega
[11:30:31] <OndraSter_> at 80MHz the GPIOs were still working :D
[11:30:35] <ambro718> lol
[11:30:46] <OndraSter_> 84 not anymore
[11:31:57] <N1njaneer> ambro718: As long as you aren't expecting more than 50-75K/sec from the SDCard that should work fine, then. 16M / 150 = ~106K bytes exchanged if there is zero processing time spent anywhere else not servicing the interrupt.
[11:34:45] <N1njaneer> And then there's overhead when doing sector jumps, etc as you seek through the filesystem. It will be cluster size / 512 (whatever the card was formatted to), so if you have 8K clusters, you'll do 16 x 512byte reads, then will have to do a FAT sector seek and a few more 512 byte reads to find the next place to continue to read the data from.
[11:35:35] <N1njaneer> Which is to say, if you need the most speed, format the SDCard as FAT32 with the largest cluster-size you can, which lesses the seek overhead. :)
[11:35:40] <N1njaneer> Anyhow, just some random thoughts on the subject.
[11:35:57] <ambro718> I'm running SPI at fcpu/128 so it can't be faster than 16M/128/8 = 15.6 kB/s
[11:36:23] <N1njaneer> Then the interrupt method should work perfect for you :)
[11:38:20] <ambro718> when I actually implement FAT32, I'll do the filesystem logic in the main loop so it won't make the interrupt longer
[11:38:53] <ambro718> asynchronously, queuing commands and polling when they've been executed
[11:43:16] <N1njaneer> I had to stream SDCard data at a data rate of ~24K/sec of actual data (not counting seek overhead) on an 8Mhz while servicing and OLED via SPI, two UARTs (one of which was streaming the SDCard data back out) and doing a bunch of timer operations. It just barely all fit, which in retrospect I should have gone to 16Mhz :)
[11:43:27] <N1njaneer> +an
[11:44:15] <ambro718> nice
[11:44:17] <N1njaneer> Only interrupts that were used were a single timer, and one RX interrupt on one of the UARTs I believe.
[11:44:31] <megal0maniac> I hate Microsoft's error messages. It's like a waitress coming up to you, saying "you're not getting waffles" and walking away instead of saying "sorry, sir, but the waffle iron is broken" and letting you use that information to either go elsewhere or order pancakes instead of being left sitting, confused, at your table
[11:44:46] <OndraSter_> :D
[11:45:02] <megal0maniac> "Invalid license data. Reinstall required"
[11:45:08] <OndraSter_> wat
[11:45:10] <N1njaneer> Mmmm waffles
[11:45:10] <OndraSter_> what app?
[11:45:29] <megal0maniac> WTF? Is every .exe encrypted with the license key?
[11:45:34] <megal0maniac> VS2010
[11:46:13] <megal0maniac> Repair license data? No, no. That would be too convenient
[11:46:29] * megal0maniac goes off to get food
[11:46:34] <megal0maniac> (not waffles)
[11:46:55] <ambro718> lol my 3d printer software uses *lots* of interrupts. One timer overflow, 11 timer output compares, usart rx, usart udre, spi, and adc
[11:47:45] <ambro718> gotta look at the datasheet, maybe I can add more :D
[11:48:50] <N1njaneer> "waffle.exe has stopped responding, please find another breakfast item."
[11:49:56] <N1njaneer> ambro718: Oh don't get me wrong, interrupts are highly useful. It's just that at some point you have to consider the potential benefits and tradeoffs to doing polling or partial-polling vs interrupts. All application-specific.
[11:51:04] <ambro718> I know, but I have to do some long floating point calculations in the main loop so if it's even a little time sensitive it goes to interrupt, heh
[11:58:12] <OndraSter_> megal0maniac_afk, we have got one wtf with VS2012 - we have redirected user profiles to \\remoteshare and (not sure if it is because of this), if you launch it *only for the first time* without network attached, it screws up. But if you first launch it with cable, then any further launch will work just fine. No idea lol
[12:12:58] <megal0maniac_afk> OndraSter_: I moved home drives to \\remoteshare (mapped as Z:) but way too many programs fell over because it didn't like My Documents being somewhere else. It shouldn't bloody matter :/
[12:13:25] <megal0maniac_afk> If its local but somewhere else, then that's fine. But not on the network
[12:57:20] <megal0maniac_afk> Today is a special day
[12:57:26] <megal0maniac_afk> I can't make an IF statement work
[12:57:41] <bss36504> haha what's up?
[12:57:44] <Tom_itx> happy day!!
[12:57:52] <megal0maniac_afk> \o/
[12:58:50] <ambro718> C is case sensitive you fool!
[12:59:32] <megal0maniac_afk> HA!
[12:59:39] <megal0maniac_afk> PASUE
[12:59:46] <megal0maniac_afk> That isn't a word
[13:07:28] <OndraSter_> lies
[13:15:24] <megal0maniac_afk> Holy hell http://www.kickstarter.com/projects/920064946/oscilloscope-watch
[13:16:11] <megal0maniac_afk> OndraSter_: ATXMEGA256A3U :)
[13:17:05] <beaky> i lvoe atxmega
[13:17:20] <beaky> it is probably the worlds most advanced 8-bit microcontroller
[13:19:13] <N1njaneer> beaky: I thought you loved ATTINY
[13:19:24] <ambro718> how come there aren't so many 16-bit uCs?
[13:20:00] <megal0maniac_afk> ambro718: Because 16 is the awkard inbetweener
[13:20:06] <OndraSter_> MSP430!
[13:20:07] <ambro718> basically you got 8-bit stuff like AVR and PIC, and it goes straight to 32-bit with ARM, AVR32 and lots more
[13:20:42] <OndraSter_> no idea
[13:20:45] <bss36504> beaky: What DON'T you love?
[13:20:46] <beaky> i love 8 bits
[13:20:49] <N1njaneer> OndraSter_: msp430 is 16-bit, and each bit will shave at least 2 months off your life in the frustration of trying to develop for it :)
[13:20:57] <bss36504> I love 12 bits.
[13:21:02] <bss36504> I love n-bits.
[13:21:06] <bss36504> I love bits of bits
[13:21:12] <bss36504> bits for days.
[13:21:14] <megal0maniac_afk> How cool is that, though? Scope, signal gen, logic analyzer on your wrist
[13:21:30] <megal0maniac_afk> Fast enough to actually be useful, and it even tells the time
[13:21:39] <bss36504> That is actually super cool
[13:21:55] <beaky> it is the geekiest watch ever
[13:22:08] <megal0maniac_afk> I don't even care. I want it
[13:22:15] <beaky> all it needs next is a avr programer
[13:22:21] <Joggl> i can't believe how much people spend money in such kickstarter-shit
[13:22:33] <megal0maniac_afk> beaky: It could do that too
[13:22:43] <megal0maniac_afk> Just isn't in the firmware
[13:22:47] <Joggl> i think i should put my projects on kickstarter too instead of financing them by myself :(
[13:23:09] <megal0maniac_afk> beaky: Love this http://mdiy.pl/uprog-maly-szybki-przenosny-programator-avr-z-sd/?lang=en
[13:30:31] <OndraSter_> N1njaneer, no idea, I have not opened the package with MSP430 yet :D
[13:31:48] <N1njaneer> OndraSter_: For several reasons (with some insider knowledge) I would suggest not ever bothering. If you need to move up, step up straight to some of the newer ARM Cortex stuff that Atmel (or TI, etc) are releasing.
[13:32:06] <megal0maniac_afk> SAM D20!
[13:32:17] <N1njaneer> XMEGA/AVR32 was a stop-gap for Atmel, but their emphasis is now squarely on AVR and ARM.
[13:32:28] <N1njaneer> Yep, SAM D20 is ARM Cortex stuff.
[13:32:33] <N1njaneer> Oops, gotta scoot
[13:37:45] <beaky> so if i were to learn arm, i should start with at90samd20?
[13:37:48] <beaky> at91*
[13:38:25] <OndraSter_> N1njAway, I know, I got it when it was $2 or whatever
[13:38:25] <OndraSter_> I have got two Stellarises
[13:38:26] <OndraSter_> unopened as well :D
[13:38:52] <beaky> how much does at91samd20 cost compared to the cheapest atmega
[13:38:53] * megal0maniac_afk smacks beaky
[13:38:58] <beaky> ow :(
[13:39:18] <megal0maniac_afk> SAM D20 is not at90
[13:39:22] <beaky> oh right
[13:39:26] <megal0maniac_afk> It's just SAM D20
[13:39:46] <OndraSter_> aren't at91* marked only arm9/arm7 devices?
[13:39:46] <OndraSter_> sam d20 is only sam d20
[13:40:01] <beaky> yeah at91 is those fancy arm ax
[13:40:07] <beaky> http://www.at91.com/
[13:40:36] <beaky> but tehy have a little ad saying "Atmel SAM D20: Think Beyond the Core"
[13:40:46] <OndraSter_> beaky, it is not about pricing
[13:40:46] <OndraSter_> it is about availability
[13:40:46] <OndraSter_> I can get you tons of megas and zero d20s
[13:40:46] <OndraSter_> even xmegas
[13:41:05] <beaky> oh so the Atmel SAM D20 doesn't exist yet
[13:41:19] <beaky> bummer i want to use one on my design
[13:41:27] <beaky> it might save cost
[13:41:56] <beaky> I love low-cost design
[13:42:47] <OndraSter_> for SMPS?
[13:43:21] <beaky> yes
[13:44:00] <megal0maniac_afk> I love structs
[13:44:44] <beaky> yes structs are a powerful tool for data abstraction
[14:06:57] * megal0maniac_afk is getting confused passing strings to functions in C
[14:07:08] <tzanger> how come?
[14:07:24] <tzanger> they're just pointers... don't expect the function to have a different block of data
[14:08:41] <megal0maniac> I think I'm getting the address back, but if I dereference then it crashes
[14:08:57] <timemage> megal0maniac, ideone.com. show some code.
[14:09:24] <megal0maniac> function(char something[]) { printf("%s",something); }
[14:09:27] <megal0maniac> That's all it is
[14:10:02] <timemage> megal0maniac, if i take some liberty with that, yeah, it's fine. what are you passing?
[14:10:35] <megal0maniac> char something[] = "mystring";
[14:10:38] <tzanger> megal0maniac: can you try char *msg instead? it should all be pointers but perhaps the compiler is tripping up on your use of an array
[14:10:44] <megal0maniac> I'm missing a size...
[14:10:56] <tzanger> C strings are zero-terminated so there's no size
[14:11:14] <timemage> megal0maniac, so far, fine. your problem is elsewhere. it's easier to see with real code.
[14:11:34] <megal0maniac> timemage: Trust me, not this code ;)
[14:11:36] <megal0maniac> One sec
[14:11:54] <timemage> megal0maniac, well, in that case cut it down into a test case.
[14:12:17] <bss36504> try making function take in const char *
[14:13:22] <ambro718> const in C isn't much more than a compile-time warning system
[14:13:46] <megal0maniac> Oh, well, um. My computer just 'sploded so never mind :)
[14:14:22] <bss36504> be that as it may, its not a bad idea to use const char *
[14:14:47] <ambro718> heretic, the right way is char const * !
[14:15:09] <megal0maniac> (I might have forgotten to pass the variables when I called the function >.<)
[14:15:20] <ambro718> (const char * is kind of a special case in the grammar)
[14:15:56] <bss36504> well its saying to the compiler, "I'm passing a pointer to char, and I'm not going to modify it"
[14:16:11] <ambro718> that's the thing, you're not saying that
[14:16:15] <bss36504> by 'it' I mean the thing that it points to
[14:16:19] <bss36504> what am I saying then?
[14:17:13] <ambro718> you're saying you're not going to modify it through this exact pointer. It is acceptable by the standard to cast it to non-const and modify the pointed-to value, as long as the pointed-to value is not read-only.
[14:17:36] <bss36504> ok
[14:18:01] <bss36504> either way, is it not bad to use const char * or is there some sort of convention against it that i've never seen?
[14:18:19] <ambro718> void evil (char const *ptr) { *(char *)ptr = 0; } char x = 1; evil(&x);
[14:18:52] <ambro718> sure you should use it, but it doesn't have *much* meaning as far as the standard is concerned
[14:18:53] <bss36504> right, you modified x by casting it to char * first
[14:19:20] <ambro718> it doesn't help the compiler optimize because you aren't providing any guarantee which can't be inferred from the code anyway
[14:19:22] <bss36504> yeah, but some things are just nice because they remind the programmer what they need to do. Such is the way with lower level languages.
[14:20:11] <bss36504> (before you lynch me, I know C is a high level language, just lower than some)
[14:20:23] <ambro718> sure it is :D
[14:20:28] <megal0maniac> Lower than Java. Java was easy :/
[14:20:45] <bss36504> Java is really great for computers. Not great at all for embedded systems.
[14:21:29] <bss36504> I like that I can just make a cross platform GUI with pretty decent machine dependent functionality in a few hours using nifty IDEs that speed development
[14:21:43] <bss36504> but with that you accept the overhead of the JVM.
[14:21:46] <megal0maniac> No... Not at all. Although was very popular with phones before they got smart. Granted, it was J2ME, but same principle. Platform agnostic executables
[14:22:13] <megal0maniac> If beaky was here, he'd say he loves Java right about now
[14:22:24] <bss36504> I hardly consider phones to be what we in this forum would call "embedded"
[14:22:34] <bss36504> but that's neither here nor there
[14:23:04] <megal0maniac> Not quite to this extent, but it still counts
[14:23:13] <megal0maniac> 80mhz cpu isn't far off
[14:23:28] <megal0maniac> I have two AVRs that can clock at 80 :P
[14:23:36] <bss36504> However, compiled java is not that bad, especially with some processors now supporting native java bytecode
[14:23:51] <bss36504> which AVRs?
[14:24:14] <bss36504> I had read about some xmega overclocking to up to 100Mhz, but that was a bit unstable
[14:24:52] <megal0maniac> xmega356a3u (OndraSter_ overclocked it to 80mhz with GPIO still working) and at32uc3a1128 (66mhz max, sure it could be pushed to 80)
[14:25:10] <megal0maniac> And my Sony Ericsson W810i is my reference phone
[14:25:48] <bss36504> thats really fast for 8 bits haha
[14:26:11] <megal0maniac> Well the at32 isn't 8bits, but it's an avr, so... :)
[14:26:35] <bss36504> oh derp. Only read half way then answered in my mind, finished reading, wrote it anyway
[14:26:36] <bss36504> haha
[14:27:03] * megal0maniac closes IDE
[14:27:33] <megal0maniac> I'm making increasingly stupid mistakes. Time to give it a rest and go to bed :)
[14:27:45] <bss36504> bedtime where you are?
[14:27:48] <specing> < bss36504> thats really fast for 8 bits haha
[14:27:49] <megal0maniac> Goodnight all. I'll be back tomorrow with more silly problems :P
[14:27:57] <megal0maniac> South Africa
[14:27:58] <bss36504> goodnight
[14:28:04] <bss36504> ah, that makes sense
[14:28:12] <megal0maniac> 10pm and exam tomorrow
[14:28:13] <specing> if 64-bits can go to 5 Ghz, then 8 bits should do atleast 8 GHz
[14:28:29] <megal0maniac> specing: Sound logic
[14:28:36] <bss36504> specing: good point
[14:28:39] <bss36504> lol
[14:28:39] <megal0maniac> Needs less volts
[14:28:58] <specing> No, there are per-bit delays executing ALU operations
[14:29:04] <specing> eg. add
[14:29:29] <specing> first add lower two bits -> then add second lowest bits + result of the lower bits addition
[14:29:42] <specing> so the next add is delayed for a short amount of time
[14:29:45] <bss36504> except, Atmel wont be selling their 8bit processors for $50
[14:30:24] <bss36504> and what are you saying now about bit delays?
[14:31:13] <specing> I'd buy one just for the bragging rights :D
[14:31:51] <bss36504> haha maybe they'll make a limited release 50 year anniversary 8 bit 8Ghz microcontroller
[15:08:22] <megal0maniac_afk> OndraSter_: I think i'll make this out of the xboard in the holidays :) http://www.gabotronics.com/oscilloscopes/xprotolab-plain.htm
[15:08:50] <prpplague> megal0maniac_afk: those are pretty handy
[15:09:38] <megal0maniac_afk> Just need to change the firmware for int osc, ill make it a plug-in board.
[15:09:57] <megal0maniac_afk> prpplague: They sure are
[15:10:34] <OndraSter_> :)
[15:11:11] <megal0maniac_afk> And dirt cheap if you already have the uC on a breakout with all supporting circuitry. Even a skew vreg :P
[15:12:15] <OndraSter_> How do I prove that log(n) ^a = O(n)?
[15:12:15] <OndraSter_> (log has the base of e)
[15:17:12] <megal0maniac_afk> Well loge(n)^a = a*loge(n)
[15:18:32] <megal0maniac_afk> then id change it to e^something = n. but that doesnt work because its an expression
[15:18:44] <megal0maniac_afk> so id get 0 :D
[15:24:28] <OndraSter_> :D
[15:24:29] <OndraSter_> no, log(n^a) = a*log(n)
[15:24:29] <OndraSter_> F.ck this crap
[15:28:58] <Tom_itx> .
[15:29:22] <Tom_itx> OndraSter_ care to buy a vowel?
[15:30:42] <OndraSter_> :)
[15:30:42] <OndraSter_> I did not want to be a rude boy
[15:33:00] <Tom_itx> http://www.electronicproducts.com/Interconnections/Wire_and_Cable/Americans_pay_more_for_broadband_receive_slower_speeds_compared_to_rest_of_the_world.aspx
[15:33:07] <Tom_itx> once again we're getting screwed
[15:33:48] <OndraSter_> math makes my head hurt
[15:33:48] <OndraSter_> a lot
[15:33:49] <OndraSter_> (and makes me sleepy)
[15:34:06] <Tom_itx> so do some literature for a while
[15:36:36] <OndraSter_> how will that help, when it is a homework D:
[15:36:43] <specing> math is good
[15:37:10] <OndraSter_> which needs to be done
[15:41:39] <OndraSter_> (ln n)^a = c*n.. but how will that help :D
[15:41:39] <OndraSter_> err, >=
[15:41:39] <OndraSter_> <= **
[15:49:54] <mdorenka> is there an easy way to get the minimum of three numbers?
[15:50:00] <mdorenka> numbers == ints
[15:51:49] <specing> min (min(x1, x2), x3)
[15:52:05] <mdorenka> is min() builtin? or where is it defined?
[15:54:46] <specing> <math.h>?
[16:00:51] <OndraSter_> or you know - just simple #define min(x, y) x < y ? x : y
[17:32:57] * jadew wonders if he should get a cheap ass gordak 936 station or a possibly fake hakko fx888 from china. The hakko being like $100 while the gordak is more like $40
[17:33:12] <jadew> I already have an original fx 888, but I need a second station
[17:33:38] <jadew> this smd stuff is freaking painful to desolder with a single iron
[17:33:45] <N1njAway> See if you can find any used Pace stuff on eBay. I have units here that are 10+ years old and still cranking away great.
[17:34:02] <jadew> N1njAway, thanks, will take a look
[17:34:54] <esmIII> jadew: why do you want a second station?
[17:35:14] <jadew> esmIII, so I don't pay $400 for hot tweezers :P
[17:35:17] <esmIII> http://www.amazon.com/gp/product/B004ZB9D4O/ref=oh_details_o08_s00_i00?ie=UTF8&psc=1
[17:35:56] <jadew> esmIII, yeah, I know it, it's a hakko knock off, gordak makes one too and it was my first stop, but it's a bit too big
[17:36:11] <jadew> I could use the hot air tho...
[17:36:16] <jadew> still way too big
[17:36:39] <esmIII> hot air works great for removing smd too
[17:37:05] <jadew> yeah, but that's a bit problematic if the space is tight
[17:37:31] <jadew> you may end up desoldering the other parts or damaging them (like electrolithic caps)
[17:38:25] <jadew> with two irons you can just go in there and pick up the part
[17:38:53] <jadew> damn it... now I'm not sure I don't want the hot air + soldering iron combo
[17:39:34] <esmIII> you know you do I, I just leave that station on my bench now
[17:39:46] <esmIII> the soldering iron is good enough for most things
[17:40:38] <jadew> I'm sure the whole thing would be good enough for most stuff, but I feel like my desk is getting too crowded
[17:41:25] <Tom_itx> jadew, what about qfp?
[17:41:38] <jadew> I do have some space on the desk where it would fit perfectly, but I was saving that for something else, don't know yet
[17:41:42] <jadew> Tom_itx, I know...
[17:41:47] <jadew> damn it
[17:41:49] <Tom_itx> will the tweezers work on that?
[17:41:49] <Tom_itx> i'd go with a combo if it were me
[17:41:57] <jadew> I'll get the one with the hot air gun :/
[17:42:05] <Tom_itx> back when i was considering one, i made the toaster oven instead
[17:44:40] <Tom_itx> i wonder if flyback is still around somewhere... he got one and that was the same one i was considering
[17:44:50] <Tom_itx> you could order replacement parts for it
[17:44:59] <jadew> which one?
[17:45:09] <Tom_itx> you'd have to track him down and ask
[17:45:14] <Tom_itx> i forget now
[17:45:26] <jadew> maybe he got electrocuted because the station was badly wired
[17:45:46] <jadew> I've heard that happens with stations from china
[17:46:13] <jadew> I guess the rule of thumb is to do a teardown first
[17:46:16] <Tom_itx> more likely klined
[17:47:41] <Tom_itx> shame huh?
[17:51:24] <jadew> I think I'll end up getting this: http://i00.i.aliimg.com/img/pb/226/621/447/447621226_927.JPG
[17:52:06] <jadew> hopefully it'll arrive before the components that I have to replace
[17:52:11] <N1njAway> jadew: A cheap $20 heat-gun carefully applied works honestly just as well as our $20K Pace TF2000 rework station if all you are doing is removing parts of (carefully!) reflowing QFNs, etc. Because at the end of the day, that's all the TF2000 is with more precise heating and split-vision optics and alignment stuff :)
[17:52:23] <N1njAway> parts +or
[17:52:46] <jadew> N1njAway, yeah, I know
[17:52:55] <OndraSter_> I have got similar, but without the digital readouts
[17:53:31] <jadew> OndraSter_, do you feel you'd benefit from the digital readouts? the one with out them is a bit cheapper
[17:53:44] <N1njAway> Hot air is really the way to go with rework, though, for a lot of passives. They are easy to damage with an iron, along with the risk of potentially thermal-shocking them, getting a hairline crack in the past, and have it open later on in the field.
[17:54:21] <jadew> N1njAway, I'll take a picture, you'll see why hot air is not a solution here
[17:54:25] <N1njAway> I can take or leave digital readouts. My Pace WJS100 (OMG awesome iron) has them, but all of the MBT201 bases are oldschool analog and it works fine :)
[17:54:31] <N1njAway> I like pictures!
[17:54:49] <N1njAway> WJS100 is awesome since it's cold to ready in 12 seconds on power-up :)
[17:55:10] <Tom_itx> jadew, that actually looks like the one he got
[17:55:15] <Tom_itx> or very similar
[17:55:33] <N1njAway> The tips are hot-swap and constitute the tip, heater, and digital thermometer. When you change the tip, you change that whole assembly. Tips cost like $10
[17:55:43] <N1njAway> Vs $5 each for hunk-of-metal tips
[18:00:23] <jadew> http://ecx.images-amazon.com/images/I/410bGfsQsVL.jpg very weird looking iron
[18:00:36] <jadew> doesn't it get hot?
[18:00:47] <jadew> Tom_itx, did he say it was any good?
[18:01:12] <Tom_itx> he liked it
[18:02:53] <jadew> oh well, I guess it's settled then
[18:03:52] <Tom_itx> after you push the 'order' button i'll advise different :D
[18:04:09] <jadew> hehe
[18:04:17] <jadew> well, I've been considering it for a while
[18:04:22] <jadew> I was just not sure what to go for
[18:04:43] <jadew> by the time I opened the discussion in here I was settled on a simple secondary station, with out a hot gun
[18:04:45] <Tom_itx> that's probably what i would have gotten
[18:04:47] <jadew> http://dumb.ro/files/smd_close.png
[18:05:00] <jadew> I need to replace those transistors
[18:05:10] <jadew> getting in there with a hot gun might damage the caps, no?
[18:05:40] <Tom_itx> cover em with foil
[18:05:43] <jadew> Tom_itx, the simple station, with out the hot gun? or the station with both hot gun and iron?
[18:06:02] <jadew> Tom_itx, I'm sure I can do it either way, ultimately I can just remove the caps first
[18:06:09] <jadew> but I want a solution for the future :P
[18:06:22] <Tom_itx> i have a good iron so i would have gotten just the hot air station for my purpose
[18:06:26] <Tom_itx> i suppose it never hurts to have a spare iron though
[18:06:49] <Tom_itx> you could put foil around the caps ya know
[18:06:51] <jadew> yeah, you can at least have a different tip on the secondary one
[18:07:27] <jadew> Tom_itx, yeah, but again, I want it to be as painless as possible so next time I confront this situation I already have the right tools :)
[18:07:50] <Tom_itx> those don't look that hard to desolder anyway you go
[18:08:26] <jadew> well, yeah... but being close to the caps it's a little uncomfortable
[18:08:47] <jadew> like if I had a second iron now, I'd use that
[18:09:03] <jadew> well, I do, I have several, but I don't like them :P
[18:09:28] <Tom_itx> local guy had a pair of used tweezers i almost got a while back
[18:09:40] <N1njAway> jadew: Your link is exactly what I have sitting on the production floor.
[18:09:41] <Tom_itx> as well as a manual pick n place suction cup
[18:09:50] <N1njAway> It's gold due to being a 50th Anniversary edition.
[18:10:28] <N1njAway> jadew: You just need to swap the caps?
[18:10:31] <N1njAway> E
[18:10:32] <N1njAway> Er
[18:10:33] <jadew> Tom_itx, should have gotten the hot tweezers
[18:10:35] <N1njAway> Transistors?
[18:10:39] <jadew> N1njAway, yeah
[18:11:03] <N1njAway> That's simple and can be done a few ways. Ideally hot-air reflow tip will just heat the part and you lift it off.
[18:11:24] <jadew> N1njAway, so it won't damage the caps?
[18:11:47] <jadew> which one is the reflow tip?
[18:11:58] <N1njAway> Other option is to get a large blob of solder on your tip, apply it over the transistor, and use the increased thermal mass to keep the transistor's pads liquid for longer, and just lift it off with tweezers.
[18:12:22] <jadew> N1njAway, I know, that's how I usually do it, but I don't like it
[18:12:40] <jadew> sometimes the solder gets cold then my tweezers slips, it's frustrating
[18:12:55] <N1njAway> Barring that, you want to always have a pair of super-fine needle-point snippers on hand. In that case you can just clip the leads of the transistors and lift them off, then clean up the pads and put new ones down.
[18:13:04] <N1njAway> No, won't damage the caps unless you're out of control :)
[18:13:41] <N1njaneer> I should jump on the uStream at some point here soon and do Q&A and rework tutorials under the microscope for you guys :)
[18:13:52] <jadew> that'd be cool
[18:14:20] <jadew> I need a microscope too :D
[18:14:41] <N1njaneer> The super-point snippers are also very, very handy for doing things like replacing SOIC's if you don't have the special tip or hot-air reflow, as you can simply cut ever lead, lift the chip off, clean the pads, and solder a new one on.
[18:14:52] <N1njaneer> +every
[18:14:56] <N1njaneer> jadew: Are you in the US?
[18:15:06] <jadew> N1njaneer, nope, romania, eu
[18:15:36] <N1njaneer> Actually, these guys ship international or they might have someone in EU -- http://www.amscope.com
[18:15:50] <jadew> what does the the reflow tip look like?
[18:15:52] <OndraSter_> funny thing - shipping from USA to EU usually costs more than china copy :D
[18:16:01] <OndraSter_> with free shipping
[18:16:06] <N1njaneer> The rework scopes are pretty good and very affordable. Not as high quality as a ScienceScope, but generally half the cost.
[18:16:07] <jadew> hehe
[18:16:46] <N1njaneer> So I usually use my ScienceScope, but I have a simulview AmScope that pulls the USB camera off a beamsplitter with the left eyepiece and works well.
[18:16:54] <jadew> N1njaneer, those scopes are actually not expensive at all
[18:16:58] <N1njaneer> Which reflow tip are you speaking of?
[18:17:21] <jadew> N1njaneer, the one that I'd have to use for those transistors so I wouldn't damage the caps
[18:17:32] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/scope/scope2.jpg
[18:17:36] <Tom_itx> i wouldn't part with it
[18:17:55] <jadew> http://www.amscope.com/sm-3bz.html
[18:18:01] <jadew> was just looking at the exact scope!
[18:18:10] <jadew> and was thinking "wow, this looks great"
[18:18:21] <Tom_itx> 7 x 45 zoom iirc
[18:18:27] <N1njaneer> jadew: Two things you want in a stereoscope -- absolutely get one that is on a boom NOT a dissection scope, else you will be fighting the support of the scope with the board. Second, spend the extra money and get a zoomable one - the cheaper ones are just a set of diopters for magnification. Most times you'll be working under very low mag, but it's super-useful to be able to zoom in on joints and
[18:18:27] <N1njaneer> view obliquely. (the latter is another reason for boom-arm)
[18:18:32] <Tom_itx> make sure you get zoom
[18:18:48] <N1njaneer> Tom: That looks like the AmScope I have here
[18:19:04] <Tom_itx> probably, it's good for soldering stuff :)
[18:19:12] <N1njaneer> Tom: Question for you -- have you had problems with the optics getting flux reside BETWEEN the prism assemblies?
[18:19:25] <Tom_itx> i put a clear filter on the bottom of mine
[18:19:31] <jadew> can't you mount a protection filter?
[18:19:32] <Tom_itx> so, no
[18:19:39] <Tom_itx> jadew, i did
[18:19:42] <N1njaneer> In 10+ years I have never had that problem with my ScienceScope, but I had it with the AmScope in only a couple months.
[18:19:43] <Tom_itx> it's an odd size though
[18:20:05] <Tom_itx> all i gotta do is clean the filter every so often
[18:20:15] <N1njaneer> Oh I clean the bottom optics regularly no problem, but this is actually flux residue up in the prism assemblies that are in the eyepiece optics.
[18:20:55] <Tom_itx> none gets in mine since it's covered with a filter
[18:21:02] <N1njaneer> I disassembled everything, flushed out the optics with 99% IPA (which is hard when you're fighting capillary action) and then I applied RTA silicon along all of the optics edges.
[18:21:16] <N1njaneer> A bottom filter won't help where stuff is getting in to mine, though.
[18:21:28] <Tom_itx> i haven't noticed any issues
[18:22:14] <N1njaneer> jadew: http://www.paceworldwide.com/products/spare-parts/tip-solder-sot23
[18:22:31] <N1njaneer> better pic: http://www.neobits.com/images/e4e5eb1b2b250/11/112-167.jpg
[18:22:55] <jadew> N1njaneer, neat!
[18:24:08] <N1njaneer> It's good stuffs :)
[18:24:39] <N1njaneer> The USB camera is cool for streaming stuff from the scope, but I still get better pictures with my cheap point and shoot held up to the eyepieces
[18:25:07] <Tom_itx> jadew, you can get those for less
[18:25:14] <Tom_itx> around 350 or so
[18:25:41] <jadew> Tom_itx, I'm looking around, maybe I'll find something similar closer to home
[18:25:54] <Tom_itx> they used to have free shipping
[18:26:36] <N1njaneer> jadew: I'd honestly just put a big blob of solder on your iron and literally just pick the SOT-23 right off the board.
[18:27:05] <Tom_itx> 7x45 seemed about right for zoom for me
[18:27:18] <jadew> Tom_itx, yeah, sounds good enough
[18:27:19] <N1njaneer> Yeah, and I find myself using the lowest zoom setting the most.
[18:27:44] <Tom_itx> 90 would be way too much imo
[18:28:03] <N1njaneer> In fact the first AmScope I had (which mistakenly was ordered without zoom) had TOO much magnification even when backed out completely.
[18:28:14] <N1njaneer> (on the lowest diopter)
[19:05:49] <Essobi> Herp.
[19:07:56] <theBear> Derp.
[19:08:23] <theBear> heh, i like our no-nonsense approach to this dialogue, shows that we're responsible adults and stuff :)
[19:10:24] <jadew> OndraSter_, you didn't say if you feel like the digital readouts would be useful
[19:11:07] <jadew> I know I don't need them for the iron, but I'm wondering about the hot air gun, if they're not useful I'll get the one with out too, it's about $40 cheapper
[19:16:34] <Tom_itx> unless you can judge the temp some other way
[19:16:37] <Tom_itx> i'd get it
[19:16:52] <jadew> that's what I thought
[19:17:04] <jadew> I suppose you could aim it at your hand from a distance and take a guess
[19:17:21] <Tom_itx> you could always test it with your finger
[19:17:21] <jadew> but that's kinda hard to do
[19:17:25] <jadew> hehe
[19:25:05] <jadew> http://dangerousprototypes.com/forum/viewtopic.php?f=2&t=3528
[19:25:07] <Valen> if the knob was somewhat calibrated it'd probably do
[19:27:21] <Tom_itx> you could find the melting point on a junk board and just mark the dial
[19:27:47] <jadew> Tom_itx, good idea
[19:28:30] <Tom_itx> the readout might let you know if the element is fluxuating
[19:28:32] <jadew> that kendal one looks really bad inside
[19:30:24] <N1njaneer> So here's the best way I think I can convey what Bad Code Implementations look like to me, in a metaphorical way to communicate it to non-coders -- http://www.smartplanet.com/photos/impressive-3d-printing-failures-photos/6430110?FTAG=ACQ3b87250&part=outbrain
[19:35:57] <jadew> http://www.youtube.com/watch?v=quGs3q9nsA8
[19:35:57] <jadew> YouTube: KADA 852D+ Dual Soldering Station Fabrication - DigitoolTV Full Review -
[19:36:15] <jadew> looks like this one is a lot nicer inside than the kendal one
[19:36:29] <jadew> this one looks actually well designed and safe
[19:37:41] <jadew> (interresting to see a real manufacturing line)
[20:35:38] <N1njaneer> jadew: I'm a sucker for a lot of US made stuff, like Pace and Cree and Quad :)
[20:38:56] <jadew> like everyone, I enjoy quality tools, but since I'm a hobbyist it's hard to justify spending so much on some of them
[20:39:33] <N1njaneer> Very much so.
[20:41:22] <jadew> I do need a hot air thingie tho, I'm tired of using my lighter or the 2000W hot air gun when I need to heatshrink something
[20:45:17] <N1njaneer> Just get an adjustable heatgun.
[20:45:21] <N1njaneer> Or a variac XD
[20:45:26] <jadew> heh
[20:45:39] <jadew> don't know, I'm completely undecided
[20:47:59] <N1njaneer> Laser solder, so you can go Pew Pew Pew
[20:52:13] <jadew> yeah
[20:52:21] <jadew> the big problem is the space on my desk
[20:52:25] <jadew> I need a new house
[20:52:46] <jadew> there, found the solution
[20:53:14] <jadew> new house => new rework station => change those 3 transistors
[20:53:35] <jadew> new desk too
[20:54:49] <N1njaneer> Use the SOT-23 removal hammer.
[20:55:55] <jadew> screw it, I'll just use one of my older solder irons until I make my mind
[20:58:12] <w|zzy> I would like a hakko 808.. looks a nice compact solution..
[20:58:31] <w|zzy> pity we get screwed over in au with pricing.
[20:58:43] <jadew> the desoldering gun? :)
[20:59:07] <jadew> looks nice indeed
[20:59:16] <w|zzy> Yep. am elegant compact one though
[20:59:38] <w|zzy> an.. I'm definitely not elegant or compact..
[21:00:05] <jadew> we get screwed in eu as well
[21:00:15] <jadew> I paid $200+ for my 888
[21:01:51] <Valen> here's a question, I'm trying to convert from a frequency to a period, can it be done with integer maths?
[21:02:10] <jadew> yeah
[21:02:42] <jadew> miltyply
[21:02:43] <Valen> how?, I'm stumped at the p = 1/f meaning that the result must be less than 1?
[21:02:45] <Valen> hmm
[21:02:56] <Valen> 100p = 100/100f
[21:03:03] <jadew> depends on how many decimals you need
[21:03:10] <jadew> so you could multiply it all by 1000
[21:03:14] <jadew> then do the math
[21:03:22] <Valen> duh, i'm an idiot, thanks ;->
[21:03:31] <jadew> np :)
[21:03:53] <Valen> it was * the 1 that just wasn't fitting into the brain
[21:04:13] <jadew> heh
[21:04:39] <Valen> hmm, now i worry it won't fit in an int lol
[21:04:53] <jadew> use an int32
[21:04:57] <jadew> well, uint32
[21:05:23] <w|zzy> what about negative frequencies! :O
[21:05:32] <jadew> :P
[21:05:52] <Valen> I am trying to convert a fequency input (say between 30 and 3000 pulses/sec) then convert that into a top value for a timer
[21:06:53] <Valen> I was using floats but when doing the final conversion to integer i was getting bad results
[21:07:04] <Valen> 0.06 was 4x the size of 0.061
[21:08:26] <jadew> depending on the chip, using floats will also bloat your code
[21:08:47] <Valen> yeah, i stuck a 32u4 in for plenty of room
[21:08:58] <Valen> code space is cheaper than coding time ;->
[21:09:40] <N1njaneer> fixed-point integers for the win, too
[21:10:38] <Valen> so i have 16000000*(1/(2000(inputfeq)
[21:10:57] <Valen> the 2000 multiplier is because its running a stepper motor with a 10x microstep on it
[21:11:21] <Valen> so that gives me how many clock cycles i need to wait before putting out the next pulse
[21:11:46] <Valen> so if i break the steps up some
[21:12:07] <Valen> (the 16000000 is the clock freq)
[21:13:19] <Valen> I'd need to go to 32bit int's to fit everything in if i * 1000
[21:13:25] <N1njaneer> Valen: Also, if you are concerned about speed, you can multiple by a reciprocal rather than dividing, since there is no hardware divider on AVR. Or at least try to divide by n^2
[21:13:49] <Valen> (i was using floats, speed is not really a concern ;->)
[21:14:01] <Valen> I need to do this calculation at ~200hz
[21:14:09] <N1njaneer> Fixed-point integers are another possible route, but you need to work the granularity of the problem to see if they are acceptable.
[21:14:21] <Valen> I'd rather keep it as simple as i can
[21:14:32] <N1njaneer> Then use floats :)
[21:14:51] <N1njaneer> Use floats until floats don't work for reasons or speed or size. Don't optimize unnecessarily.
[21:14:53] <Valen> ran into a problem converting from float to int as the last step
[21:15:01] <N1njaneer> Howso?
[21:15:24] <Valen> the end result of 0.06 was very diferent to 0.061 and 0.062 was back in line
[21:15:50] <Valen> went from 60,000 to 2000 to 61000 as the final integer
[21:16:10] <N1njaneer> Sounds like something odd in the conversion or the cast.
[21:16:17] <Valen> so I presume i was running out of precision
[21:16:37] <Valen> I was using 16 bit floats
[21:16:55] <N1njaneer> Well if it's an unsigned int, it would be 0-65535 range. Would your result presumable wind up in that range, then?
[21:17:03] <N1njaneer> Kind of like a decimal-point shift?
[21:17:48] <N1njaneer> At very least you should be able to multiply the float by 100,000 or so to get the decimal to the whole number, then cast the float to the unsigned int.
[21:17:51] <Valen> ICR3 = 16000000 / (fabs(inner_current_RPS) * 2000);
[21:18:15] <Valen> ICR3 being the timer
[21:18:31] <Valen> the result was in range when i ran it through excel
[21:18:38] <N1njaneer> Make sure you write the floating point numbers as 16000000.0f and 2000.0f
[21:18:54] <Valen> its working in general
[21:18:59] <N1njaneer> Else the compiler will infer them to be integers or long integers rather than floats.
[21:19:07] <N1njaneer> I've seen that happen a LOT
[21:19:09] <Valen> it just gets "lumpy" at the ends
[21:20:53] <N1njaneer> I would suggest trying to add the .0f notation and see if it helps.
[21:21:14] <Valen> just did that
[21:21:42] <Valen> 0.06 = 2750 , 0.061 = 75 going into icr3
[21:23:54] <Valen> sorry about that
[21:24:04] <Valen> X crashed, so reboot, then no window decorators
[21:24:11] <Valen> anyway
[21:24:21] <Valen> so i did the 0.0f and had that same issue
[21:24:27] <inflex> lo Valen
[21:24:34] <Valen> howdy
[21:39:26] <N1njaneer> Valen: You can also try some explicit casts in there, too. That's very odd about the math, though.
[21:40:41] <Valen> I'm thinking its just lumpyness in the floating point stuff
[21:49:59] <xrosnight> hello anyone knows what this is for ? http://www.seeedstudio.com/wiki/Grove_-_MOSFET thanks
[21:57:28] <jadew> it says right there
[21:58:03] <Casper> yup it say it all
[22:25:55] <jadew> I find it super funny when people use richard clyderman's song for electronics or technical videos in general