#avr | Logs for 2012-09-16

Back
[00:05:26] <Vutral> ool
[00:13:47] <iR0b0t1> lol
[00:13:49] <iR0b0t1> that'd be funny
[00:13:52] <iR0b0t1> infinite response lewp
[00:13:58] <iR0b0t1> markov chains but with questions!
[03:44:11] <Devilholk> The PDI-connector has a VCC. Do stuff (like the AVR-Dragon) output 3.3V or 5V here?
[03:45:22] <OndraSter> they do not output anything
[03:45:27] <OndraSter> it is Vtg
[03:45:30] <OndraSter> aka Vtarget
[03:45:41] <OndraSter> it is "input" which "powers" the output transistors on dragon
[03:45:45] <OndraSter> to adjust the target voltage
[03:46:23] <Devilholk> So I should hook it to Vcc on my board with the AVR on?
[03:46:35] <OndraSter> yes
[03:47:12] <Devilholk> Great. ANother thing while I'm here, I can have a pullup on !reset/pdi_clock and still be able to program it?
[03:47:46] <OndraSter> yes
[03:47:47] <theBear> yeah, just make sure the pullup is 'weak' enough for the programmer to pull against
[03:47:56] <OndraSter> 10k is recommended, I am using 4k7
[03:47:58] <Devilholk> theBear: 1Ω? =P
[03:48:05] <Devilholk> I'm using 10k on this one
[03:48:06] <OndraSter> 1R is strong :D
[03:48:39] <OndraSter> check atmel's website, under your chip's documents tab - there is usually checklist of what to do
[03:48:42] <Devilholk> I should actually put a jumper before VCC just in case the SMPS does not work. Don't want to fry the AVR first thing I do
[03:48:49] <theBear> it's true
[03:49:11] <Devilholk> OndraSter: Yeah, I have been lookin in both the data sheet for the device and the device family guide and the usb hardware design specs
[03:49:27] <OndraSter> what chip it is?
[03:49:29] <Devilholk> OndraSter: It would be nice though to find a "complete system example" to work from but that might be cheating ^^
[03:49:37] <Devilholk> ATXMEGA16A4U
[03:49:40] <OndraSter> hehe
[03:49:55] <OndraSter> http://myxboard.net/boards.html
[03:50:07] <OndraSter> check the Mini out
[03:50:42] <Devilholk> Nice
[03:50:55] <tmpvar> OndraSter, whats the deal with VID/PID?
[03:51:05] <OndraSter> every USB device needs some
[03:51:08] <tmpvar> and hi
[03:51:20] <tmpvar> of course they do, you sent a req to atmel?
[03:51:33] <jacekowski> no
[03:51:35] <jacekowski> to usb.org
[03:51:38] <OndraSter> lol
[03:51:41] <jacekowski> and pay for it
[03:51:43] <jacekowski> a lot
[03:51:43] <OndraSter> atmel.com: no, we do not
[03:51:49] <OndraSter> usb.org: $2k
[03:51:50] <Devilholk> jacekowski: No kidding. I checked out the prices once >.<
[03:52:22] <Devilholk> Are there any "free" VID's?
[03:52:36] <tmpvar> OndraSter, we talked about this 2 days ago :)
[03:52:38] <Devilholk> Like fore development or does one have to just use one anyway
[03:52:46] <tmpvar> so atmel said no eh? that's a shame
[03:52:51] <OndraSter> there is supposedly one free VID
[03:52:59] <Devilholk> But nobody knows it?
[03:52:59] <OndraSter> but you can not use it for "retail" products
[03:53:07] <Devilholk> Ah but that is ok
[03:53:09] <OndraSter> they said they will send it to me - no reply after that
[03:53:24] <OndraSter> tmpvar, they told me that I can use theirs but only under some conditions
[03:53:28] <OndraSter> that are written in the FAQ
[03:53:31] <tmpvar> ah
[03:54:55] <Devilholk> Haha "The USB organisation has threatened me with legal action, so I had to stop the sale of USB PIDs."
[03:55:05] * Devilholk found cheap ones
[03:55:18] <OndraSter> I should start a company
[03:55:19] <tmpvar> heh
[03:55:21] <OndraSter> and then give them out
[03:55:29] <OndraSter> for "donation" :P
[03:55:33] <OndraSter> rather for payment
[03:55:36] <tmpvar> haha
[03:55:49] <tmpvar> yeah, have people join the org and pay a fee for membership ;)
[03:56:23] <Devilholk> The open source world need open VID/PID's
[03:56:41] <OndraSter> linux gives out
[03:56:49] <OndraSter> but your project has to run linux or something :)
[03:57:03] * Devilholk will just use 0xCAFE 0xBABE
[03:57:40] <Devilholk> On that note, I should make more coffee
[03:59:25] <OndraSter> I am using 0x55 as VID
[03:59:37] <OndraSter> watch out - windows caches device info... not sure for how long :)
[04:01:12] <theBear> what usb ? forever last i used windows, stupid windows
[04:01:39] <theBear> changing port to avoid driver problems until you run out of ports and decide windows is the stupidest heap of shit ever made
[04:01:42] <jacekowski> OndraSter: forever
[04:02:01] <OndraSter> I just changed PID
[04:06:02] <Devilholk> theBear: Haha
[04:06:13] <Devilholk> theBear: Or you display the 12 hidden printers
[04:06:20] <Devilholk> And kill them all!
[04:06:25] <OndraSter> with fire
[04:06:36] <OndraSter> I don't have any disconnected printers anymore
[04:06:39] <OndraSter> I cleaned the list
[04:06:44] <OndraSter> by reinstall :D
[04:08:12] <theBear> i cleaned the list by os change
[04:08:29] <theBear> and it stayed clear for 10+ years now
[04:08:32] <theBear> magical
[04:08:32] <OndraSter> well, I changed the OS during reinstall as well.
[04:09:28] <OndraSter> damnit, tomorrow starts my school again :(
[04:10:07] <theBear> meh work tomorrow... better than sitting round here being miserable
[04:10:31] <theBear> heh, new job is pretty good, but it's kinda messed up enjoying work more than not work... sigh, what a year it's been
[04:10:42] <OndraSter> Devilholk, I presume you are going to use ASF or LUFA? :)
[04:14:09] <OndraSter> anybody needs 99 thermocouple PCB connectors?
[04:14:09] <OndraSter> http://www.omega.com/ppt/pptsc.asp?ref=PCC-OST-SMP&ttID=PCC-OST-SMP&Nav=
[04:14:11] <OndraSter> I need just one :D
[04:15:11] <Devilholk> OndraSter: What are those?
[04:15:15] <OndraSter> huh one for $20
[04:15:18] <OndraSter> screw that
[04:15:27] <OndraSter> I will just put it into screw block or something
[04:15:33] <OndraSter> Devilholk, thermocouple connectors
[04:16:05] <Devilholk> OndraSter: I meant ASF and LUFA
[04:16:26] <OndraSter> oh
[04:16:39] <OndraSter> well
[04:16:50] <OndraSter> ASF contains a lot of stuff to help writing code with USB and other peripherals
[04:16:56] <OndraSter> LUFA is only USB stack
[04:17:00] <Devilholk> Ah ok
[04:17:07] <Devilholk> Well, I'm still on the hardware ^^
[04:17:15] <Devilholk> But I figure there will be examples availble
[04:17:29] <OndraSter> there is ASF example
[04:17:40] <OndraSter> LUFA is still not 100% supported on xmegas I think
[04:17:45] <OndraSter> I am writing my own USB stack :( :D
[04:20:22] <Devilholk> I tried that on PIC once but failed miserably
[04:20:29] <Devilholk> Well I got it trough half enumeration
[04:20:34] <OndraSter> I am enumerating
[04:20:42] <OndraSter> but I need now to write all the CDC code
[04:20:43] <Devilholk> But I wrote everything in ASM because I'm a nutcase
[04:20:54] <OndraSter> I wanted to switch to asm at one point
[04:20:59] <OndraSter> but first in C!
[04:21:22] <Devilholk> But I'm going to play with more AVR's now
[04:21:41] <Devilholk> Most of the others on the hackerspace likes AVR and my small experience of them are promising
[04:21:52] <OndraSter> AVR>PIC
[04:21:56] <Devilholk> =)
[04:21:57] <OndraSter> simple equation
[04:22:17] <Devilholk> Some pics are nice though. Like the extremely cheap but pretty "dumb" ones with a lot of pins
[04:22:27] <Devilholk> Good for IO expansion (for slower stuff)
[04:26:44] <Devilholk> Now I got to the terrible part. Board layout.
[04:27:06] <OndraSter> heh
[04:27:09] <OndraSter> it is not terrible
[04:27:40] <OndraSter> http://clip2net.com/s/2iWpp
[04:28:06] <Devilholk> I'm not used to kicad yet
[04:28:12] <Devilholk> So it will be terrible
[04:28:15] <OndraSter> I am using eagle since beginning
[04:28:24] <Devilholk> And I have to look up what packages to use
[04:28:31] <Devilholk> And probably draw some of my own >.<
[04:28:39] <OndraSter> tqfp44/qfn44
[04:29:08] <Devilholk> I got a VQFN-16 on this
[04:29:16] <Devilholk> With a big thermal pad
[04:29:22] <Devilholk> I'm SURE I need to draw that thing myself
[04:29:26] <OndraSter> enjoy
[04:29:40] <Devilholk> Now you are just being mean =P
[04:29:56] <OndraSter> nah
[04:30:11] <OndraSter> I'd say "I have kicad xmega parts but I won't give them to you"
[04:30:12] <OndraSter> if I were mean
[04:30:17] <Devilholk> Haha
[04:30:34] <Devilholk> Well, I already did pin assignment
[04:41:22] <Devilholk> Ofcourse kicad did not have that vqfn-thingie
[04:46:38] <OndraSter> unless you need small package, use TQFP
[04:47:14] <OndraSter> tqfp44 is about the same size as qfn64
[05:15:55] <Devilholk> Using tqfp44
[05:16:26] <Devilholk> Damn kicad. You can't have spaces in file names ^^
[06:09:27] <Amadiro> Devilholk, of course you can
[06:09:33] <Amadiro> Devilholk, that must be a limitation of your operating system
[06:09:37] <Amadiro> and/or filesystem
[06:09:53] <theBear> wtf stupid filesystem doesn't allow long names with spaces ?
[06:10:00] <theBear> c''mon, this is a new century !
[06:10:16] <Amadiro> Dunno, FAT I guess
[06:10:25] <OndraSter> who is fat?
[06:10:47] <theBear> what, old fashioned fat8 without translations ? pfft
[06:11:20] <OndraSter> I don't remember fat8, only fat12
[06:11:37] <theBear> hmm, i may be imagining things too.... my mind isn't what it used to be
[06:11:45] <OndraSter> 12, 16, 32
[06:11:55] <Amadiro> those are the ones I remember as well
[06:11:58] <theBear> recently i wonder how much of it will come back
[06:12:52] <OndraSter> theBear, of FAT or your mind?
[06:13:22] <theBear> heh, my mind, i hope old fat doesn't come back, that'd be horrible
[06:16:50] <OndraSter> that's why I wanted to be surel.
[06:16:52] <OndraSter> sure*
[06:37:46] <Devilholk> Amadiro: No, the OS is fine with it
[06:37:57] <Devilholk> Amadiro: It's kicad that won't find the stuff ^^
[06:38:36] <Devilholk> And now it crashed. Before I saved
[07:33:14] <Amadiro> Devilholk, strange, I edit files with spaces in the name all the time without problems.
[07:33:41] <Devilholk> Amadiro: This was a module file
[07:33:51] <Devilholk> Amadiro: The 3D viewer would say it wouldn't find the module
[07:34:00] <Devilholk> But it showed up in the list for assigning modules to components
[07:34:29] <Amadiro> strange
[07:34:34] <Devilholk> Maybe something got weird during my compile. I got like 10000000 compiler warnings
[12:55:19] <OndraSter> ooooh helo abcminiuser
[12:55:34] <OndraSter> I don't know how you could do all the work in LUFA - how many hair do you have left? :)
[12:56:39] <abcminiuser> OndraSter, on my head? A couple still...
[12:56:57] <OndraSter> you didn't rip it all?
[12:57:21] <OndraSter> I started writing my own USB stack from scratch - the device now successfuly enumerates. I haven't began the CDC part yet.
[12:57:26] <OndraSter> I require it to be really, REALLY slim
[12:58:05] <OndraSter> but... bloody USB-IF and their $2000 for one VID block!
[12:58:15] <abcminiuser> Is your app open source?
[12:58:38] <OndraSter> no
[12:58:41] <OndraSter> maybe in the future
[12:58:51] <OndraSter> is there open source VID giveaway?
[12:58:55] <abcminiuser> Ah, if you do open it you can get a free VID/PID here: http://wiki.openmoko.org/wiki/USB_Product_IDs
[12:59:03] <OndraSter> yes, I heard about that :)
[12:59:38] <abcminiuser> Otherwise try MCS Electronics
[12:59:43] <abcminiuser> Gray market, but it's unique
[12:59:45] <OndraSter> I had an idea though - we would start small company (all together) and buy one VID. Everybody would pay a bit and get few PIDs...
[13:00:17] <OndraSter> it is not selling those PIDs
[13:00:27] <OndraSter> we would all put together money BEFORE buying it... :D
[13:00:42] <OndraSter> it comes down to like 30 cents per PID
[13:00:55] <OndraSter> or was it 3 cents..
[13:01:54] <abcminiuser> Yeah, but the USB-IF would take the money, they go "nuh-uh" and revoke it
[13:01:57] <specing> good luck with getting 32768 people.
[13:02:12] <abcminiuser> Leaving you with nothing but an empty wallet, just like MCS
[13:02:22] <OndraSter> huh)
[13:02:34] <OndraSter> specing, even 100 people would be enough :
[13:02:36] <OndraSter> everybody $20
[13:02:40] <OndraSter> abcminiuser, how dare they!
[13:02:49] <OndraSter> those are my PIDs, I can do whatever I want with them :(
[13:03:15] <OndraSter> anyway, I am off to grab a beer, afk
[13:03:17] <OndraSter> thanks abcminiuser
[13:04:39] <abcminiuser> No prob
[13:04:53] <specing> OndraSter: who would want to pay 20$ for an arbitrary 16-bit number?
[13:05:00] <specing> d'oh
[13:05:14] <specing> also who would need 650 of these?
[13:05:24] <specing> not even companies need that many
[13:08:05] <abcminiuser> specing, I know, I know
[13:08:10] <abcminiuser> Goddam stupid of the USB-IF
[13:08:20] <specing> yes
[13:08:26] <abcminiuser> They should have either sold them individually, or sold them in blocks of ~32 or so
[13:08:36] <specing> you just take a random VID-PID and be done with it
[13:08:43] <specing> fuck them.
[13:09:57] <abcminiuser> specing, until that clashes with someone else's random ID
[13:10:38] <specing> for which the chance is 1:4294967296
[13:11:30] <timemage> specing, somewhat more likely than that.
[13:12:05] <specing> What, 1:4294000000 if you pick one from an unused pair?
[13:12:48] <timemage> specing, nah, i'm just thinking because they're on a bus and usually multiple devices. if you have a bunch of devices with randomly choosen ids, you're basically talking about the birthday paradox.
[13:13:26] <specing> timemage: these are not MAC addresses
[13:13:33] <specing> they are not meant to be unique
[13:17:23] <timemage> specing, i was pretty sure a ven:pid number pair wasn't a mac address. =) they are more or less unique to device model, or at least a chipset. that hasn't a lot to do with what i was mentioning though.
[13:17:55] <specing> timemage: you think there would have been a collision?
[13:19:02] <specing> and how exactly would it occur?
[13:19:21] <specing> it can't really occur, I tell you...
[13:31:08] <abcminiuser> timemage, that's a damned good point
[13:31:24] <abcminiuser> The probability isn't just 1 in N, where N is the number of available numbers
[13:31:41] <abcminiuser> It's much higher than that
[13:33:47] <timemage> abcminiuser, yeah. not sure what the actual numbers would be. all in all collisions would still be somewhat rare. i'm not advocating that hobbyists throw buckets of money at the usbif, in case there was any confusion on that part.
[13:34:02] <abcminiuser> Indeedy
[13:34:14] <abcminiuser> I proposed a few solutions, but they'd all need the OS vendors to jump on board
[13:34:21] <abcminiuser> Which will never ever happen
[13:34:31] <abcminiuser> Since one of the USB-IF members is Microsoft
[13:35:12] <timemage> abcminiuser, something like creating further namespace under a given vendor:pid ?
[13:35:21] <abcminiuser> Indeedy
[13:35:27] <abcminiuser> I had a blog post about it IIRC
[13:35:28] <timemage> abcminiuser, yeah. they'll never agree to that =)
[13:35:44] <abcminiuser> But in essence we use a VID/PID to indicate an "extended" ID, then use a string descriptor with a UUID for the product
[13:36:14] <abcminiuser> So the host sees the special VID/PID, requests string descriptor 0x42 or whatever and uses the UUID there
[13:37:07] <timemage> abcminiuser, yeah or do something like the locally administered range of mac addrs.
[13:37:43] <timemage> abcminiuser, so at least for products meant to be used within an organization you could assign addresses.
[13:39:21] <abcminiuser> Indeedy
[13:39:29] <abcminiuser> Anything is better than what we have :P
[13:39:42] * abcminiuser is switching Wifi points, if I don't come back assume I am dead
[13:39:51] <timemage> heh
[15:15:04] <megal0maniac> RIP, Arduino Nano...
[15:20:59] <specing> megal0maniac: rest in pieces?
[15:22:29] <megal0maniac> specing: I don't have that much of a temper :)
[15:22:36] <Tom_itx> is it becoming a not so good idea?
[15:22:55] <megal0maniac> I think I killed it by connecting HVPP while in circuit (didn't have much of a choice, really) after I botched fuses
[15:23:24] <Tom_itx> i bet that was a bad idea
[15:23:34] <megal0maniac> Probably
[15:23:43] <megal0maniac> It's TQFP, so...
[15:25:03] <megal0maniac> It was only DWEN, which Rikus' programmer is able to ignore when using ISP. But you need a 10K pullup on reset, and there's already a 1K pullup on the board which is too tiny to get off
[15:26:22] <megal0maniac> Eventually I managed to de-solder and lift the reset pin on the atmega, but it seems it was too late. ISP can't read a signature and HVPP gets 0xFFFFFF with xtal1 connected and 0xDFDFDF without
[15:26:59] <megal0maniac> (Which is the same result as when it was connected to the board with the 1K pullup)
[15:27:20] <megal0maniac> But I've tested. It's definitely floating
[15:27:43] <megal0maniac> So yeah. Don't think there's anything I can do really
[15:29:50] <megal0maniac> Does anyone know why or how I get 0xDFDFDF when xtal1 isn't connected?
[15:55:37] <skorket> I'm programming a device to communicate back to the host computer using V-USB. I see in V-USB three examples that are relevant, custom-class, hid-custom-rq and hid-data. Which would be appropriate to send small amounts of data back and forth to the device?
[16:40:22] <learningc> If I want to make a 4-layers PCB, what is the best configuration? signal-power-ground-signal? power-signal-signal-ground? power-signal-ground-signal?
[16:41:55] <Tom_itx> i think generally power is on the outside
[16:43:17] <karlp> or not... http://www.hottconsultants.com/techtips/pcb-stack-up-2.html
[16:43:32] <karlp> you can do anything, depends what you're routing and why
[16:56:17] <Jan-> hihi :D
[16:56:20] * Jan- waves
[16:57:48] <Jan-> So uh. attiny85s are expensive
[16:58:01] <Jan-> what's the difference between that an an attiny13A, which is advertised as "Pico Power"
[16:58:58] <karlp> a whole heap of flash and ram?
[16:59:19] <Jan-> I see
[16:59:37] <Jan-> are these picopower ones designed for battery packs or whatever
[17:01:10] <Jan-> ok, the 13A has 1K of program memory and 64 bytes each of eeprom and sram
[17:01:12] <Jan-> that's not much
[17:02:47] <OndraSter> picopower = can go down to nanoamps
[17:03:02] <OndraSter> and works off 1.8V power supply I think
[17:03:08] <Jan-> when you say RAM, you mean what they refer to as "Internal SRAM"
[17:03:24] <Jan-> yes 1.8 to 5.5v
[17:03:27] <specing> Jan-: I haven't went over 1K code yet
[17:03:39] <specing> ram is easy to consume once you do buffers
[17:03:42] <Jan-> well this is a very simple application
[17:03:47] <Jan-> I suspect it would be OK
[17:03:56] <Jan-> can I program this thing using one of Tom_itx's programmers?
[17:04:02] <Jan-> it says it has the usual SPI programming
[17:04:06] <LoRez> yep
[17:04:16] <Jan-> oh hm
[17:04:29] <Jan-> it says it needs more voltage as the speed grades go up, but the ones on ebay are 20mhz grade
[17:04:34] <specing> OndraSter: how much for the cheapest xmega?
[17:04:49] <Jan-> does that mean I can't run it at the lower speed for lower voltage requirements, or is that still an option
[17:05:04] <specing> Jan-: you can run them at 1Hz like a boss
[17:05:27] * Jan- has an "I AM BOSS" T-shirt
[17:05:36] <Jan-> er can you actually do that
[17:05:56] <specing> ... yes
[17:05:58] <Jan-> kickass
[17:06:04] <Jan-> so are these things made for batteries or what
[17:06:38] <specing> Jan-: more MHz = more power
[17:06:48] <OndraSter> specing, define cheapest xmega
[17:06:49] <Jan-> yesyesy
[17:06:55] <OndraSter> cheapest start at less than mega168
[17:06:59] <specing> OndraSter: the $ cheapest
[17:07:04] <OndraSter> there
[17:07:09] <OndraSter> they are atxmega16d3
[17:07:16] <OndraSter> but they don't have awesome ADC, no DAC, no DMA
[17:07:18] <specing> oh, the 1.6E
[17:07:24] <OndraSter> just 32MHz operation, 16kB flash, 2kB RAM
[17:07:31] <OndraSter> yep
[17:07:36] <specing> How about the ARMs?
[17:07:37] <OndraSter> I am going to use one in my project
[17:07:40] <OndraSter> well
[17:07:44] <OndraSter> there is TOO MUCH arms
[17:07:46] <OndraSter> to ask me that question
[17:08:07] <Jan-> all this thing is going to do is be a gated 40khz oscillator
[17:08:19] <Jan-> ooh, they actually have ADC.
[17:08:25] <Jan-> Maybe I can do the threshold level on it as well!
[17:08:37] * Jan- boggles
[17:08:46] <Jan-> how the hell can you make a tiny, cheap thing that does SO MUCH
[17:09:03] <LoRez> quantity
[17:09:14] <Tom_itx> wafer at a time
[17:09:29] <Jan-> is it likely that an attiny is actually an atmega that failed a lot of tests or something
[17:09:32] <Jan-> do they bin them
[17:10:31] <specing> unlikely
[17:10:44] <specing> people have done die-level pictures already
[17:10:56] <Jan-> I see
[17:11:08] <Jan-> how do they make them run on so little power
[17:11:13] <specing> at the 0.5 um the error level is small
[17:11:18] <specing> Jan-: they don't run much!
[17:11:55] <specing> 10k transistors or something like that
[17:12:00] <specing> max 20k
[17:12:04] <Jan-> teehee
[17:12:30] <specing> compared to your average beefed up intel with several billion...
[17:14:48] <Jan-> aren't intel going to get baseball-batted by arm
[17:14:56] <Jan-> when arm figure out how to make 256 core versions
[17:16:16] <Jan-> (yow, 64 bytes of RAM is really not much)
[17:17:15] <specing> Jan-: that isn't going to happen if ARM goes the intel route (which it is)
[17:17:30] <Jan-> what, more power per core?
[17:17:40] <specing> Jan-: if you want to see some 100-core chips, google tilera (vapourware though)
[17:17:51] <Jan-> I think I heard about that
[17:18:18] <Jan-> OK, so, if I clock the chip at 16mhz I need a pin to toggle every 400 clocks
[17:18:22] <Jan-> I guess I can't do that with the PWM
[17:18:34] <Jan-> which sort of sucks
[17:20:19] <specing> Why not?
[17:20:34] <Jan-> hang on
[17:20:37] <Jan-> thinking aloud
[17:20:41] <Jan-> set the prescaler on the timer to divide by two
[17:20:47] <Jan-> and set the compare register to 200?
[17:21:11] <specing> Do you need it to run at 16MHz?
[17:21:17] <OndraSter> so, why are there no fast & small ARM chips? Always fast ones are like... 300 pin BGAs
[17:21:21] <OndraSter> I don't need all that crap!
[17:21:26] <OndraSter> just one SDRAM interface and ethernet
[17:21:43] <specing> OndraSter: checkout TI sitara
[17:21:59] <specing> OndraSter: 500MHz arm9 @ tqfp2xx
[17:22:04] <specing> Or is it 178?
[17:22:06] <OndraSter> and price?
[17:22:12] <specing> 10E I think
[17:22:12] <Jan-> specing: I guess not.
[17:22:12] <OndraSter> I saw sitaras
[17:22:19] <OndraSter> am1705 is cheapest i think
[17:22:22] <OndraSter> 375/450MHz
[17:22:25] <OndraSter> tqfp something
[17:22:31] <OndraSter> still, 10€ is a lot :P
[17:22:34] <OndraSter> I don't need 178 pins
[17:22:38] <OndraSter> I NEED JUST ONE SDRAM INTERFACE
[17:22:41] <OndraSter> and maybe serial SPI flash
[17:22:46] <Jan-> although I need to trigger an event on an audio peak, so it'd be good to be able to sample the audio in the PWM reasonably fast.
[17:22:48] <specing> well
[17:22:56] <OndraSter> one can fit TFTP client into few kilobytes of flash
[17:23:02] <Jan-> I don't have to do that though, I can specify an external comparator
[17:23:09] * Jan- damns AVRs and their lack of comparator
[17:23:17] <OndraSter> they have comparator?
[17:23:19] <OndraSter> analog
[17:23:28] <specing> indeed they have
[17:23:42] <GuShH> most general purpose modern mcus do
[17:23:43] * specing prepares the cluebat
[17:23:59] * Tom_itx gives specing superpowers for the cluebat
[17:24:18] <GuShH> amee2woof: fixed a zx spectrum today
[17:24:21] * specing smacks Jan- 100km into the ground with his overpowered cluebat
[17:24:22] <OndraSter> specing, I thought... all those ARM servers with 1.5GHz dualcores are each MCU like 100€+
[17:24:29] <OndraSter> what about 10x 400MHz MCU?
[17:24:31] <OndraSter> for 100€
[17:24:34] <OndraSter> multitasking ftw
[17:25:02] <amee2woof> GuShH: cool! watch FPS on it \o/
[17:25:07] <specing> OndraSter: because those 400MHz are ARM9
[17:25:08] <GuShH> o.o
[17:25:13] <GuShH> amee2woof: all the games suck.
[17:25:19] <specing> False
[17:25:19] <OndraSter> hmm
[17:25:20] <GuShH> I ended up using a soundcard to stream the roms
[17:25:27] <OndraSter> I know that arm9 sucks
[17:25:30] <amee2woof> rtsp://streams.de.timduru.org:554/fps.sdp
[17:25:38] <Jan-> I was told they didn't have a comparator
[17:25:45] <Jan-> at least the ones I have don't
[17:25:45] <GuShH> amee2woof: at least it was fun for a while... good times.
[17:25:46] <OndraSter> Jan-, they lied
[17:25:53] <specing> Jan-: DATASHEET
[17:25:55] <amee2woof> hehe
[17:26:11] <GuShH> rf module took a beating so naturally the unit seemed dead.
[17:26:39] <Jan-> oh
[17:26:45] <Jan-> it's an ADC *or* analog comparator
[17:26:46] <GuShH> one inductor and one resistor were desoldered due to lack of mechanical decoupling on the RF connector...
[17:27:06] <amee2woof> that music video is hilarious. four dudes and a chick playing on the same guitar
[17:27:31] <GuShH> still, I need to make a proper video cable (component) instead of using RF
[17:28:00] <amee2woof> yeh, i watched TV for two years on a shit DVB-S receiver with RF modulator output
[17:28:07] <GuShH> amazing how all the caps are in good shape, the unit was stored in an attic for 20 years
[17:28:08] <specing> amee2woof: gotye?
[17:28:18] <amee2woof> because my video capture card only had an RF input
[17:28:23] <GuShH> only the psu had derated by 30% but it's still good enough.
[17:28:27] <GuShH> (the caps)
[17:28:28] <amee2woof> specing: gowat? oo.O
[17:28:39] <specing> the guitar thing
[17:28:45] <Jan-> yay analog comparator
[17:28:49] <Jan-> this kicks ass
[17:29:04] <amee2woof> specing: no idea what the name is. its an internet TV station :)
[17:29:20] <specing> " four dudes and a chick playing on the same guitar"
[17:29:20] <amee2woof> actually, you just missed it because i linked to the video feed above
[17:29:31] <Jan-> ...althougha ctually it's probably easier to use an external comparator
[17:29:43] <GuShH> Jan-: it's not
[17:29:48] <GuShH> wait, what are you trying to do?
[17:29:55] <Jan-> well no actually it's OK
[17:29:55] <amee2woof> specing: yes, but it aired on TV and if they said the name then i missed it
[17:30:04] <Jan-> I can still specify a trimmer to adjust the trip level
[17:30:10] <specing> amee2woof: I tell you its gotye
[17:30:15] <specing> amee2woof: they are famous
[17:30:18] <GuShH> goatse
[17:30:36] * specing cluebats GuShH into oblivion
[17:30:46] * GuShH gets a million clues
[17:31:10] <amee2woof> specing: ooh, you're right
[17:31:13] <amee2woof> http://www.youtube.com/watch?v=d9NF2edxy-M
[17:31:17] <amee2woof> that looks like it
[17:34:43] <Jan-> I assume I shouldn't write code for a device with 1k of program flash, that would cause the compiler to link in an enormous floating point library, or something
[17:35:51] <amee2woof> last time i used the FP lib, it wouldn't have fit a 1k device anymore anyway, so...
[17:35:57] <Jan-> uhhuh
[17:36:37] <Jan-> these things don't have any form of memory protection or anything like that, do they
[17:39:56] <amee2woof> nope
[17:40:29] <amee2woof> since they usually don't run anything more elaborate than a really simple RTOS thats not really useful in any way
[17:40:54] <Amadiro> Jan-, just tested it, went from 284bytes with some int arithmetic up to 900 bytes with some float arithmetic -- so not too bad, but on 1k, you might wanna avoid it
[17:41:29] <Amadiro> (and the obvious performance hit, of course)
[17:42:47] <Amadiro> wow, went to 1902 bytes by including math.h and using round()
[17:44:05] <Jan-> Amadiro: thanks for the info, that's good of you to try it
[17:44:37] <Amadiro> Jan-, no problem, I as curious myself (I've never used floats on the smaller AVR devices
[17:45:20] <Amadiro> looking at these results, it seems like one should consider not using them if one has 8k or less flash storage, but it's not much of a biggie if you have 16, 32 or more kilobytes
[17:47:57] <Amadiro> hm, using sqrtf(), exp(), round(), floor() and ceil() on volatile doubles, I get it up to 4.2KiB
[17:49:12] <Jan-> does it intelligently drop out code it doesn't need
[17:49:18] <Amadiro> removing the volatile, it's back to 410 bytes, so the compiler is obviously doing its job here... but it seems something like 512 bytes of overhead for each float function you're using is roughly something to calculate with
[17:49:19] <Jan-> or does it just always compile in any includes
[17:49:31] <Amadiro> Jan-, pretty much all compilers drop out code that isn't needed.
[17:50:26] <Amadiro> Jan-, hence if you say "volatile double a = 1.1; volatible double b = sqrt(a);" it will result in ~1KiB (the volatile tells the compiler to not optimize), but the same thing without the volatile will be only like 300 bytes.
[17:50:51] <Amadiro> the compiler just computes sqrt(a) at compile-time and then throws away the sqrt() function
[17:54:58] <Jan-> what I'm thinking is that sqrt() is probably only one part of the math library
[17:55:11] <Jan-> does it only compile in sqrt() or do you inevitably get the whole of math.c
[17:55:44] <specing> Jan-: TIAS
[17:55:48] <Kevin`> I think that depends on the compiler options, but you can omit parts of the libraries
[17:55:52] <Amadiro> Jan-, no, as you can see from the results I posted only the functions you *actually* use (the compiler can't optimize them away) get linked in, the rest is not
[17:56:20] <Jan-> uhhuh
[17:56:26] * Jan- is a bit new to C
[17:56:30] <Amadiro> Jan-, so if you write sqrt(1.1);, no functions from math.h are included in your code at all, if you write sqrt(a), only sqrt() is linked in.
[17:57:10] <Amadiro> Jan-, tested with gcc 4.7.1, but as I said, pretty much all compilers will do that.
[18:07:37] <Jan-> if I said a=1.1; sqrt(a) and never referred to a anywhere else in my code, would a compiler do enough analysis to realise that it never changed and precompute the result?
[18:07:46] <Jan-> or would it assume that a might change somewhere
[18:08:12] <Amadiro> Jan-, yes, unless you declare a to be volatile, it would completely remove both a and sqrt() entirely from your program
[18:08:48] <Amadiro> Jan-, there are various compiler flags (at least with gcc) which you can use to fine-tune the "freedom" the compiler is allowed to assume in re-structuring and manipulating your code.
[18:09:14] <Amadiro> but using some of those options will, for instance, invalidate IEEE floating point correctness
[18:09:37] <Amadiro> (although it's usually not a big deal, hardly anybody really understands IEEE floats anyway :)
[18:10:48] <Jan-> hehe I know what you mean
[18:10:52] <Jan-> we have those in C# too
[18:12:05] <Jan-> yay 16mhz crystals are cheap
[18:13:16] <Amadiro> Jan-, loop unrolling/hoisting/transforming can be pretty mindblowing as well, i.e. the compiler may change the order of your loops, if you have several of them nested, unroll them (remove the loop entirely) or move certain lines of code outside the loop, so that they only get executed once rather than each time -- if your loop does nothing, the compiler can indeed optimize it away entirely (often defeating not-so-well-thought-out benchmark
[18:13:16] <Amadiro> s)
[18:13:43] <Jan-> oh sure I know compilers can do strange and counterintuitive things
[18:13:59] <Jan-> I once wrote some C# that did some loop unrolling, I was bit-flipping some uncompressed HD video frames
[18:14:15] <Jan-> if I didn't unroll it you ended up with the loop admin being more work than the code in the loop.
[18:14:30] <Jan-> got it to generate asm on the fly :)
[20:25:34] <Vutral> mhm
[21:29:31] <ptg> \o
[21:36:04] <learningc> karlp: thanks for the link. It's one of the best article I've ever read :)
[21:38:45] <Roklobsta> ptg: hallo
[21:38:50] <Roklobsta> ptg: so you found #avr
[21:46:08] <ptg> ohy!
[21:46:12] <ptg> Indeedy :)
[21:46:52] <ptg> Just poking around the interrupt registers before I ask my stupid question :P
[21:47:05] <Roklobsta> ah so
[21:48:06] <Roklobsta> tomitx is very helpful and knows a wod. and some guys who work at atmel on the avr also lurk here
[22:10:15] <bakers> Why is the program called avrdude?
[22:10:52] <Tom_itx> because they liked the name
[22:11:01] <Tom_itx> and it's avr ... dude
[22:12:49] <bakers> I was wondering if there was a story behind it
[22:13:09] <Tom_itx> long long ago in a far away place....
[22:21:32] <Essobi> Heh.
[22:22:11] <Essobi> Anyone made one of the AVR logic analyzers? I've googled around and seen a few.
[22:22:40] <Tom_itx> i think somebody here made one but i forget who
[22:23:32] <Essobi> anyone played with a RPI and an AVR?
[22:23:49] <Essobi> Tom_itx: ya? Hmm. Cool.
[22:24:19] <Essobi> Tom_itx: Trying to get SPI between an RPI and an 8mhz 328P to work... no luck thus far.
[22:25:03] <Tom_itx> you wouldn't get very high sample rates
[22:25:42] <Essobi> Tom_itx: Wasn't trying to.. just something to play with. I can program the AVR over SPI pins using GPIO/avrdude.
[22:25:57] <Essobi> Was thinking I'd just re-use the same pins to communicate them.
[22:26:04] <Essobi> *between them
[22:26:51] <Essobi> Really was interested in using it as an I/O expander. I need mawr inputs.
[23:25:03] <rue_house> tiny26 would be a good io expander