#avr | Logs for 2014-02-10

Back
[00:14:02] <jacekowski> rue_shop3: there is shitloads of those
[00:14:14] <jacekowski> rue_shop3: analog makes them, ti makes them, and others
[00:14:37] <rue_shop3> I was looking for a part number to get a datasheet and emulate an adc for an encoder
[00:16:04] <jacekowski> ADC0831
[01:41:36] <hjohnson> anyone here played with the named address spaces in C?
[02:49:32] <avrusbquestion> To what extend is the usb subsystem (on atmega32u4) autonomous from the mcu
[02:50:43] <avrusbquestion> if interrupts are disabled will the connection to the usb host be retained?
[02:53:53] <avrusbquestion> ideally i would like to setup the connection and then loop reading the adc, storing the result in the dpram and inform the usb substystem the buffer is full and have the usb subsystem transfer the data on its own
[02:54:16] <avrusbquestion> is that feasible
[03:17:24] <OndraSter_> avrusbquestion, when usb hub/controller asks you for a <something> you have to reply within certain time frame
[03:17:28] <OndraSter_> (500ms I think?)
[03:20:19] <avrusbquestion> OndraSter_, does this mean the mcu must do it or is the usb subsystem able to do it by itself
[03:20:38] <OndraSter_> I'd say check datasheets, I have never used usb on atmega, only on atxmega
[03:20:46] <OndraSter_> and I am not sure if USB sends some periodical data
[03:20:49] <OndraSter_> (I don't think so)
[03:20:56] <OndraSter_> can't remember anymore
[03:21:29] <avrusbquestion> OndraSter_, thank you
[03:21:35] <OndraSter_> np
[06:39:59] <Lambda_Aurigae> avrusbquestion, the cpu has to handle it. The USB hardware basically just does the physical connection and data decode/encode...you have to handle all the comms.
[06:40:52] <avrusbquestion> Lambda_Aurigae, thank you
[06:41:03] <Lambda_Aurigae> welcome.
[06:41:14] <Lambda_Aurigae> I generally offload USB to a second chip
[06:41:32] <avrusbquestion> As the usb module has dualport ram I expected more
[06:41:48] <avrusbquestion> you mean a second avr?
[06:41:52] <Lambda_Aurigae> and let that chip handle USB comms and buffering while doing the rest of my work on my main chip.
[06:42:00] <Lambda_Aurigae> yeah...or a usbPIC or such.
[06:43:24] <avrusbquestion> then of course one has to handle the communication with the second MCU
[06:43:49] <Lambda_Aurigae> that's easy enough.
[06:44:05] <Lambda_Aurigae> usart or spi or i2c that can run lower priority.
[06:44:22] <avrusbquestion> in a way that it is not a burden the main cpu
[06:45:09] <Lambda_Aurigae> simple spi comms can be done one byte at a time by the hardware...
[06:45:23] <Lambda_Aurigae> same with USART.
[06:47:17] <avrusbquestion> any protocol that manages a whole buffer ?
[06:47:40] <Lambda_Aurigae> not that I know of.
[06:47:56] <Lambda_Aurigae> what are you looking to do with the device overall?
[06:49:17] <avrusbquestion> i want to sample an analog signal as fast as possible and pass it to the PC for processing and plotting
[06:49:50] <avrusbquestion> I would like to make the sample as long as possible.
[06:50:22] <Lambda_Aurigae> how fast is as fast as possible?
[06:53:15] <avrusbquestion> full adc speed i think it is around 70ksamples/s
[06:54:08] <Lambda_Aurigae> i2c can send at 400Kb/s
[06:54:22] <Lambda_Aurigae> and you should be able to get USB to go that fast.
[06:54:35] <avrusbquestion> kbits or kbytes
[06:54:52] <Lambda_Aurigae> but just because the ADC can sample that fast doesn't mean you can process and send it that fast.
[06:54:56] <Lambda_Aurigae> Kb is kilobits
[06:54:59] <Lambda_Aurigae> KB is kilobytes
[06:55:37] <Lambda_Aurigae> i2c can, in theory, go as fast as 1Mb/s as I recall.
[06:56:49] <avrusbquestion> so your final verdict is that usb can accomodate the 70ksamples/s with just one cpu if i program it carefully?
[06:57:44] <Lambda_Aurigae> the USB can most likely, yes. the adc can, most likely, yes...the two together are gonna be a problem...on the atmega series..
[06:57:51] <Lambda_Aurigae> you might look at the xmega series...they are considerably faster.
[06:58:22] <jacekowski> it's not about speed
[06:58:41] <Lambda_Aurigae> speed and ability to handle data between peripherals.
[06:58:41] <jacekowski> uab is slow when you do small transactions
[06:58:49] <Lambda_Aurigae> yeah..
[06:58:51] <Lambda_Aurigae> that too.
[06:58:58] <Lambda_Aurigae> usb is not a realtime connection.
[06:59:14] <avrusbquestion> thank you very much. i greatly appreciate your help
[06:59:24] <jacekowski> atmega and even xmega will not have emough ram to handle it
[07:00:07] <Lambda_Aurigae> for such a project I would probably use a pic32mx220f128b
[07:00:16] <jacekowski> 100 transactions/s on usb is what you are looking for
[07:00:37] <jacekowski> so you have to buffer 700 samples at least
[07:01:33] <avrusbquestion> it is because of the limited memory that i want to upload the data to the pc
[07:46:52] <jacekowski> avrusbquestion: usb is not very good for streaming
[08:12:38] <avrusbquestion> jacekowski, thank you
[08:13:04] <avrusbquestion> what is your suggestion another mcu?
[08:30:44] <jacekowski> uC that will have enough ram to buffer data and send big chunks of it
[08:31:07] <jacekowski> or usb scope or something like that
[08:31:24] <jacekowski> some can do streaming mode
[08:31:59] <avrusbquestion> thank you again
[09:27:42] <OndraSter_> so I bought this "big box"... it was some ISDN thingy. It has got (in front) 10 slots for eurocard stuff (and backplane in the back), DIN41 612 connectors. Oh and from the back? Half-length, another 10 slots for cards :P
[09:27:52] <OndraSter_> (same connector)
[09:27:59] <OndraSter_> thinking what one could build into it
[12:53:11] <megal0maniac_afk> jacekowski: There's a logic analyzer which does 20MHz with a mega328 with V-USB
[12:53:23] <megal0maniac_afk> Granted, it's a bit of a hack
[12:55:03] <megal0maniac_afk> V-USB handles the enumeration, control etc. The m328 initialises stuff when you click start, hands off the SPI link to the RAM to the buffer chips, then they just run until the RAM is full, mega takes back control and sends data back to PC. It isn't streaming, but it's still clever
[12:56:26] <megal0maniac_afk> Also it fascinates me that once set up, you can connect a buffer chip and an SRAM chip together with a common clock, and capture stuff with no CPU intervention
[12:56:59] <megal0maniac_afk> Also, hello everyone :)
[13:02:20] <myself> isn
[13:02:32] <myself> isn't that what we call DMA?
[13:02:45] <megal0maniac_afk> myself: Kind of
[13:03:00] <tzanger> https://code.google.com/p/avr-hardware-random-number-generation/wiki/WikiAVRentropy
[13:03:11] <tzanger> that should probably make its way into a channel FAQ or resources list along with things like LUFA
[13:03:40] <megal0maniac_afk> myself: Same principle
[13:03:58] <megal0maniac_afk> tzanger: Ooh, clever
[13:06:05] <myself> page mentions diehard, seems plausible :P
[13:06:18] <myself> (this is how I determine someone knows more about RNG than me)
[13:58:23] <jacekowski> megal0maniac_afk: ???
[13:58:33] <jacekowski> megal0maniac_afk: i can't see how this would work
[14:01:47] <jacekowski> megal0maniac_afk: SPI can only run at half of core frequency
[14:01:59] <jacekowski> megal0maniac_afk: and that alone would limit it to 10MHz
[16:09:34] <awozniak> anyone familiar with dfu-programmer on windows? I'm a linux user, my friend grabbed dfu-programmer for windows from sourceforge, and is having trouble installing it. He's getting a "windows encountered a problem installing the driver software for your device" and "Windows found driver software for your device but encountered an error while attempting to install it". Are there good step by step instructions somewhere?
[16:21:12] <OndraSter_> huh what device and what driver?
[16:21:16] <OndraSter_> as in. what programmer
[16:28:33] <Tom_itx> awozniak why not use FLIP?
[16:29:09] <awozniak> Tom_itx: I think he wants to script it with a batch file. Isn't FLIP all GUI ?
[16:29:43] <Tom_itx> you know, i'm not entirely sure about that
[16:29:49] <Tom_itx> it may have a cmd line too
[16:29:59] <w|zzy> You can use command line
[16:30:08] <Tom_itx> then i'd use FLIP with windows
[16:30:16] <Tom_itx> you'll likely have fewer problems
[16:30:25] <w|zzy> batchisp comes with flip
[16:31:07] <awozniak> awesome, thank you.
[18:16:08] <hjohnson> 12 serial ports is nucking futs
[18:16:11] <hjohnson> haha
[18:20:12] <Lambda_Aurigae> hjohnson, sounds like an old unix server...or rather, half of one.
[18:20:36] <Lambda_Aurigae> I've seen systems with 8, 12, 16, 24, and 32 serial ports.
[18:20:54] <hjohnson> Lambda_Aurigae: this is all attached to an atmel xmega
[18:21:11] <hjohnson> the problem is I can't remember what they all are. :o
[18:22:01] <hjohnson> when I think through the ports I have, it doesn't match the numbers on my schematic. :o
[18:22:49] <hjohnson> 1x AIS input, 4x NMEA I/O, Compass I/O, RS232, GPRS, GPS Receiver (2x), Iridium 9602
[18:22:52] <hjohnson> which is 11
[18:25:36] <hjohnson> *facepalm* right the wifi module
[18:25:41] <hjohnson> so yes, all 12 accounted for
[18:53:56] <Lambda_Aurigae> so, bitbanged serial or what?
[18:54:12] <Lambda_Aurigae> or are some using i2c and spi?