#avr | Logs for 2011-11-15

Back
[00:06:09] <ziph> abcminiuser: Did you sort out where the ripple was coming from?
[00:06:30] <abcminiuser> ziph, no, I'll do that tomorrow when I go into Uni and use the good scopes
[00:13:56] <rue_bed> abcminiuser, do you think an avr at 16Mhz could shovel 4 channels of audio data/
[00:14:25] <abcminiuser> rue_bed, at what frequency, and what output method?
[00:14:48] <ziph> I think virtually any uC with I2S could. ;)
[00:15:33] <rue_bed> ah right, 44khz, 12 bit serial
[00:15:38] <rue_bed> I think
[00:16:22] <rue_bed> if the data was being thrown out, do you think the avr could keep up with the usb rate tho/
[00:16:36] <rue_bed> need to fix the right shift key
[00:17:05] <abcminiuser> Hrm, let's see...
[00:17:44] <abcminiuser> At 48KHz, you get 333 cycles between packets
[00:17:45] <rue_bed> I dont know how much junk goes back and forth during the audio transfer, looks like all the samples via usb are 16 bit
[00:18:10] <abcminiuser> That's 83 clocks/sample, reasonable
[00:18:22] <abcminiuser> The USB overhead is very, very minimal once the device is enumerated
[00:18:27] <rue_bed> cool,
[00:18:45] <rue_bed> gnight (cat trying to walk on keyboard)
[00:19:08] <abcminiuser> However, 16bit audio x 4 channel x 48KHz = 384000 bytes per sec
[00:19:28] <abcminiuser> Too much for the USB AVRs, since the max bank size is 256 bytes / millisecond
[00:19:54] <abcminiuser> Although perhaps double banking will help there, not sure
[00:27:07] <inflex> mmm
[00:27:17] <inflex> I need a way of getting data from my SPI eeprom to USB
[00:27:30] <inflex> am going to just bitbash it 1-way out to an external device
[00:28:07] <inflex> I think I'm fearing the windows side of it
[00:28:16] <ziph> The USB side?
[00:28:24] <inflex> maybe I can find a way to save the data to a file with a simple bit of C programming in Win
[00:28:26] <ziph> USB driver side that is?
[00:28:48] <ziph> WinUSB is fairly straight forward.
[00:28:49] <inflex> well, I could just use a PL2003/FT232 module, might be easiest
[00:29:03] * inflex doesn't do Windows software :\
[00:29:22] <inflex> Last time I created a Windows app was when Borland Pascal 7 came out
[00:29:27] <inflex> ajd
[00:29:35] <inflex> and I promptly moved to Ultrix and OS/2
[00:29:37] <ziph> You could probably do it with Borland Pascal. ;)
[00:29:59] <ziph> What about an AVR with the serial class driver? :)
[00:30:03] <inflex> or python
[00:30:12] <inflex> oh wait, what am I saying -I hate python
[00:30:48] <ziph> What's the data? Battery usage or something?
[00:31:00] <inflex> servo data, voltage, and current
[00:31:24] <inflex> all you need to do is graph it
[00:31:35] <ziph> Would requiring people to install the .NET Framework be a problem?
[00:31:41] <inflex> *shudder*
[00:31:47] <ziph> Heh.
[00:32:13] <inflex> might just do it with FreePascal + Lazarus
[00:32:26] <inflex> of if I'm REALLY insane, there's always GAMBAS
[00:32:36] <ziph> Make abcminiuse*r finish the GPIB support. Then people can use LabView. ;)
[00:34:30] <Casper> ah the joy of pspice idiocy
[00:37:39] <abcminiuser> ziph, is that extra * a medal?
[00:38:29] <ziph> abcminiuser: Nope, It's so I don't distract people from their actual work while I'm making flippant remarks about them. ;)
[00:38:34] <inflex> hahah
[00:38:38] <ziph> abcminiuser: But would you like a medal? :)
[00:38:58] <abcminiuser> How considerate, and yes damnit
[00:39:03] <inflex> ah well, for now I've just got 3 lines coming out of the logging device... so I think I'll just make a simple Win app that talks to the serial port
[00:39:09] <abcminiuser> If I ever finish this bloody document
[00:39:15] <abcminiuser> I've got one more chapter to write
[00:39:21] <inflex> too bad it means the user is probably going to pick the wrong serial port and bitch at me
[00:39:23] <abcminiuser> Unfortunately, it's the one about the actual stack design :S
[00:40:32] <ziph> inflex: libusb works too if you just want to do something in C.
[00:40:54] <ziph> inflex: Then the same source would work for that other third rate operating system you use instead of Windows. ;)
[00:41:03] <inflex> ziph: well, if I get a premade USB-serial module (which I can, for cheap), then it sort of nulls out the USB aspect
[00:41:15] <inflex> oooh ooooh - that was a troll attempt.
[00:42:16] <ziph> Premade like an FTDI in an enclosure?
[00:43:19] <inflex> http://www.aliexpress.com/product-fm/506958696-Serial-Converter-USB-2-0-To-TTL-UART-6PIN-Module-CP2102-wholesalers.html <=- uyeah, like this - I can get them in a nice cable assembly too
[00:43:51] <inflex> $60 for 21 of them, that's cheap
[00:45:03] <inflex> http://www.aliexpress.com/product-gs/320074401-1m-1-8m-ft232rl-usb-ttl-adapter-cable-with-VCC-5v-GND-CTS-RXD-RTS-DTR-wholesalers.html <=- there we go :)
[00:45:31] <ziph> What's on the other end?
[00:45:40] <inflex> fly leads or many other options
[00:45:44] <ziph> Ahh.
[00:46:02] <inflex> http://www.aliexpress.com/product-gs/447784668-Free-shipping-FTDI-FT232RL-USB-TTL-converter-3-3v-level-support-TXD-RXD-VCC-GND-CTS-wholesalers.html <=- minimalist option
[00:46:11] <ziph> You can usually identify which port is your particular USB adapter anyhow.
[00:47:41] <inflex> thing is, I won't have any stop/start bits/status.... when I press the button on my logger, it'll just dump the data out as quick as it can
[00:48:01] <inflex> I should really go pick a suitable resonator to maximise the possilble speeds, since I'll be using a 512K eeprom
[00:48:04] <ziph> What is the logger?
[00:48:24] <inflex> sits on a servo lead, logs pulse length, volts, current
[00:49:12] <ziph> inflex: You can wire the RS232 TX and RX together...
[00:50:07] <ziph> inflex: The PC would then send something to elicit the next N records or delete the last M records.
[00:50:15] <abcminiuser> http://themagnificentwhatever.com/2011/10/23/one-wish/
[00:51:49] <inflex> ziph: that'd require me to be listening and talking on the same pin - I mean, I could do that
[00:52:17] <inflex> ziph: might buy a box of 21 of those cheaper converters
[00:52:22] <inflex> $60 is about nothing really
[00:52:47] <ziph> abcminiuser: Ever heard of PLIF?
[00:52:57] <abcminiuser> PLIF?
[00:53:29] <inflex> Professional Labotomy in France?
[00:53:39] <ziph> abcminiuser: http://plif.courageunfettered.com/archive/wc215.gif
[00:53:44] <ziph> http://plif.courageunfettered.com/
[00:54:29] <abcminiuser> Hrm
[00:55:00] <abcminiuser> If I have any more webcomics to get through each day, I'd never get anything done
[00:55:07] <ziph> :)
[00:57:23] <abcminiuser> Someone needs to prevent me from ordering a hardcopy of the complete Far Side however
[00:58:01] <ziph> Should I have Amazon gift wrap the drop-shipping copy I'm ordering for you?
[00:58:08] <ziph> *g,d*
[00:58:51] <abcminiuser> Heh
[00:59:10] <abcminiuser> But seriously, that sucker's available on the Book Depository, and I'm VERY tempted
[01:00:27] <ziph> I should fire off an order before it gets too close to Christmas.
[01:00:48] <ziph> (When all those suckers buying presents for other people slow down the delivery of the books for me. ;)
[01:01:22] <ziph> abcminiuser: Having 1-2 day delivery from Book Depository to Norway should be nice, did you try it while you were there?
[01:01:59] <abcminiuser> No, I've still got a ton of books from my last order :S
[01:02:14] <abcminiuser> I tend to overstock quite a lot, as I forget how little time I spend reading in a week :(
[01:03:42] <ziph> Except when you have a thesis to procrastinate from? :)
[01:04:28] <abcminiuser> Indeed@
[01:06:35] <ziph> Since you loaded the entire Bluetooth stack into your brain, why don't you use the NXP stack and do it on a uC that actually has enough memory and time to do a full proper implementation?
[01:07:19] <abcminiuser> Because too late, that's why
[01:07:28] <abcminiuser> If I had their code at the start, perhaps
[01:07:35] <ziph> Too late for your assignment? :)
[01:07:40] <abcminiuser> But the neat part about the project is the tiny, tiny processor used
[01:07:41] <abcminiuser> Yeah
[01:07:48] <ziph> Yeah, I mean just for interest.
[01:07:56] <ziph> Then when you're bored of Atmel you can work at NXP. ;)
[01:24:33] <rue_bed> you like larson eh?
[01:24:40] <rue_bed> hmm
[02:29:21] <earthshine> o/
[03:00:45] <theBear> hmmm.... is there a stupid amount of overhead adding a "software serial" port to an avr (to gain an extra serial input, like reverse-bitbang ... ?
[03:00:57] <theBear> or just a little bit ? i seem to remember i used to use some lib
[03:03:18] <ziph> SPI UART's are good for that.
[03:04:31] <theBear> but there's only 1 or 2 per chip
[03:04:34] <theBear> or you mean soft ones
[03:04:44] <theBear> oh, you mean external ones
[03:04:49] <ziph> External ones.
[03:05:17] <ziph> As a bonus they tend to come with massive RX and TX FIFO's (256 bytes sometimes).
[03:05:20] <theBear> yeah, right now, i'm trying to cut some corners.... if i can work it out i'll have this little "thing" going before i gotta go away again, if not well...
[03:05:27] <theBear> that IS a bonus... good to know
[03:06:50] <ziph> And they have interrupt lines that you can set to some FIFO level. You can actually end up with a UART that generates far fewer interrupts/uses much less CPU than the internal ones.
[03:07:58] <ziph> Plus you can get them with four physical UARTS on the same IC and SPI bus. :)
[03:13:12] * inflex stabs some ppl
[03:13:23] <ziph> Ouch!
[03:23:15] <inflex> I really REALLY want for some of these PCBs to arrive... SOON
[03:23:18] <inflex> esp the LOM oneas
[03:24:28] <ziph> You and your oddball needs for food and shelter...
[14:08:29] <feurig> nice work
[14:11:07] <feurig> erp
[15:16:42] <_abc_> re: atmega8u2 : is there somewhere firmware for this device? CDC maybe? I want a commercial solution or Atmel's own, not open source.
[15:18:34] <LoRez> you can license lufa
[15:25:51] <_abc_> LoRez: atmega8u2 has usb on board. Lufa is for usb less ones.
[15:26:01] <_abc_> I want the oem firmware... Atmel...
[15:26:44] <LoRez> It is an open-source complete USB stack for the USB-enabled Atmel AVR8 and (some of the) AVR32 microcontroller series, released under the permissive MIT License (see documentation or project source for full license details)
[15:27:35] <_abc_> LoRez: I know about lufa and v-usb
[15:27:42] <LoRez> apparently you do not.
[15:27:52] <_abc_> Well I will reread the license and stuff.
[15:28:10] <LoRez> http://www.fourwalledcubicle.com/PurchaseLUFA.php
[15:28:19] <_abc_> As far as I remember lufa and v-usb are for usb less chips.
[15:28:39] <LoRez> also, only thing buying lufa gets you afaik is that you don't have to say you use lufa
[15:28:48] <LoRez> MIT is pretty permissive that way I think
[15:28:53] <Xamusk> _abc_, no, lufa is for hardware usb
[15:29:01] <_abc_> Okay, so I did not know that.
[15:29:24] <_abc_> But is there an OEM stack too? I got the examples from Atmel (series 2 and series 4) and am trying to make sense of them.
[15:29:30] <Xamusk> I don´t think there´s a default USB firmware from Atmel
[15:29:35] <_abc_> There is.
[15:29:46] <Xamusk> well, then good luck
[15:29:53] <_abc_> It's just that it is of the average quality and likely full of bugs.
[15:30:00] <_abc_> Exactly like MicrochipÄs
[15:30:02] <_abc_> 's
[15:30:02] <Xamusk> I´d go for lufa
[15:30:19] <_abc_> I have certain constraints.
[15:30:37] <Xamusk> most of them probably are artificial
[15:30:54] <_abc_> You talk like a preacher erm therapist :)
[15:31:06] <Xamusk> if you´ve read a recent appliance´s manual these days, you´ll probably find some open source reference somewhere
[15:32:04] <Xamusk> nope, I just talk like this when people say a MIT license gets constraints... probably just in the heads of lawyers
[15:32:06] <landonf> Constraints that involve not using MIT-licensed LUFA?
[15:32:26] <Xamusk> MIT is not GPL
[15:32:27] <_abc_> Constraints I am not going to talk about here.
[15:32:43] <landonf> Xamusk: Not even in lawyers. It's only "GNU" or "MPL" that tend to make them uppity.
[15:33:05] <landonf> Mostly just middling middle managers get their socks wound up about MIT licensed software.
[15:33:08] <Xamusk> landonf, the it´s worse in this case
[15:33:18] <Xamusk> landonf, maybe a PHB?
[15:34:20] <Xamusk> I, for one, don´t even like to think of static linking as ¨derived work¨ as most people like to say when talking about LGPL
[15:37:07] <landonf> Yeah, well. They've decided on an interpretation and are going to stick to it. I'll just be over here, not linking.
[15:40:25] <ferdna> on a tip120... i can only drive negative voltage? can i drive positive voltage?
[15:40:56] <Xamusk> landonf, in that interpretation, LGPL is virtually GPL for embedded stuff... I just use my own interpretation
[17:31:08] <karlp> Rious: what exactly do you do that causes excess flood so often?
[17:31:19] <karlp> most people have boring quit messages, like, "ping timed out"
[18:02:26] <Casper> karlp: he decided to cut his water pipe
[18:02:30] <Casper> that's how he did it
[18:04:47] * karlp giggles
[19:02:00] <abcminiuser> So, slightly off-topic question
[19:02:36] <abcminiuser> If I cast a buffer to a struct type in order to process packet data in an easy manner, will the compiler use incorrect unaligned word access on 32-bit processors?
[19:02:57] <abcminiuser> Or will it generate byte accesses for the unaligned members?
[19:08:09] <grummund> its allowed to do anything
[19:52:02] <feurig> abcminiuser: good question.
[19:53:24] <abcminiuser> Damn
[19:53:33] <abcminiuser> Well, I'll just not mention that in my thesis then :P
[19:54:48] <vectory_> i dont even think it would be good practice
[19:55:06] <abcminiuser> Yeah, it's probably not
[19:55:08] <abcminiuser> Too late now :P
[19:55:15] <abcminiuser> I'm off for lunch, back later
[23:03:46] <inflex> well, at least my new power boards arrived for the LOM
[23:03:54] <inflex> now I can try see if the constant-current method works better
[23:21:07] <feurig> so does anyone know what changes to the avrisp protocol are made in the "arduino" avrdude device
[23:30:36] <abcminiuser> Wowza I can really waffle on about the software design of this thing
[23:36:42] <Casper> feurig: you sure that they even based their stuff on avrisp?