#avr | Logs for 2015-06-30

Back
[05:35:21] <superbia> good day
[06:06:32] <superbia> how do i upload .elf file to a 32u4 "arduino" clone
[06:06:47] <LeoNerd> You don't. Convert it to .hex and avrdude it
[06:06:58] <LeoNerd> avr-objdump is usually the thing
[06:07:41] <superbia> oh, i have the hex also
[06:08:41] <superbia> are there some "presets" of avrdude parameters ?
[06:08:57] <LeoNerd> ... no? What would you imagine such presets to be?
[06:12:24] <superbia> well
[06:12:24] <superbia> when i type $ avrdude
[06:12:24] <superbia> i get alot of parameters i'm not aware what they do
[06:12:35] <LeoNerd> Then inform yourself :)
[06:12:50] <superbia> indeed.. avr seems like a nice platform..
[06:13:05] <superbia> or rather the community :)
[06:22:13] <superbia> LeoNerd: can you verify this:
[06:22:16] <superbia> $ avrdude -p m32u4 -p /dev/ttyACM0 -U flash:w:firmware.hex:i
[06:22:24] <LeoNerd> You'll want a -c too
[06:22:31] <LeoNerd> Every avrdude command needs a -p and a -c
[06:22:56] <superbia> hm. but i dont have a programmer
[06:23:14] <LeoNerd> The USB bootloader in the 32U4 counts
[06:23:17] <LeoNerd> Maybe
[06:23:25] <LeoNerd> Depends what bootloader is there. Try avr109
[06:25:56] <superbia> Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
[06:30:49] <superbia> should that atleast tell me i got the right /dev/ttyUSB0 port ?
[06:37:44] <LeoNerd> Press the reset/prg button
[06:38:10] <superbia> sadly i cannot find any buttons on mine
[06:38:21] <superbia> http://www.ebay.com/itm/New-Pro-Micro-ATmega32U4-5V-16MHz-Replace-ATmega328-Arduino-Pro-Mini-/381189300742?pt=LH_DefaultDomain_0&hash=item58c0a72206
[06:38:25] <LeoNerd> Uhm... there rrally should be a reset button :)
[06:38:39] <LeoNerd> If not, you'll have to add one on the reset pin
[06:38:57] <superbia> can i use metal to short gnd and reset ?
[06:39:05] <superbia> then run avrdude ?
[06:40:18] <LeoNerd> That would do to test, but you probably want a real button before long ;)
[06:40:34] <LeoNerd> Less risk of other shorts, like gnd/vcc
[06:42:53] <superbia> hm tried, nothing..
[06:47:41] <LeoNerd> Maybe you'll bred to burn a real bootloader into it?
[06:47:58] <LeoNerd> I'm sure we've had people with this problem before
[06:48:23] <superbia> http://pastebin.com/ZtXBArsy
[06:48:39] <superbia> is everything ok ?
[06:49:35] <LeoNerd> Ugh, pastebin :(
[06:50:17] <LeoNerd> Asides that it's on pastebin, that looks fine
[06:50:31] <superbia> i always use pastebin when on foreigh channels :)
[06:50:35] <superbia> it is universal.
[06:50:51] <Jartza> I use pastie
[06:51:44] <Lambda_Aurigae> should probably use an ardweeny selection in avrdude.
[06:51:49] <LeoNerd> It's univrrsally disliked
[06:52:10] <LeoNerd> Lambda_Aurigae: depends entirely on bootloader
[06:52:16] <Lambda_Aurigae> I suspect they have an arduino bootloader on it.
[06:52:26] <LeoNerd> Jartza: pastie.org is nice
[06:52:27] <Lambda_Aurigae> if it's sold as an arduino thingie.
[06:52:40] <LeoNerd> Yes; the Arduino 32U4 loader is avr109
[06:52:59] <Jartza> LeoNerd: yea, like it more than pastebin
[06:53:02] <Jartza> and it's faster
[06:53:44] <LeoNerd> Also has nice synhighlight
[06:54:51] <Lambda_Aurigae> I hate syntax highlighting!
[06:55:19] <Lambda_Aurigae> they never follow a color scheme that works for my eyes.
[06:55:39] <Lambda_Aurigae> I can read code just fine without it...better even.
[06:58:27] <superbia> LeoNerd: thansk for your assistance :)
[07:00:04] <superbia> you really made my day :)
[07:21:48] <DusXMT> Lambda_Aurigae: Finally someone I can relate to :)
[07:42:43] <rogan_> hi folks, I have a possibly stupid question. I'm trying to implement a PC to PC connection, using USB, such that one PC sees the device as a HID (keyboard and mouse), and the other sees the device as e.g. a serial port
[07:43:08] <rogan_> and the second can send "keystrokes" and mouse movements to the first
[08:09:33] <rogan_> the "obvious" solution is to pair a regular microcontroller with a USB serial adapter
[08:10:00] <rogan_> but I was wondering if it was possible to do this with a single chip (i.e. one of my existing dev boards if possible)
[08:10:19] <LeoNerd> I don't know of any MCUs with two USB device controllers
[08:10:21] <rogan_> I have a teensy 3.1, amongst other devices
[08:10:40] <LeoNerd> Honestly, you probably want to use a 32U4 for the USB, and stick an FTDI/PL/etc.. on the UART for the other side
[08:10:56] <rogan_> would it be possible to do software USB for one interface, and hardware usb for the other?
[08:11:14] <rogan_> LeoNerd: yeah, that's the "obvious solution" I mentioned above ;-)
[08:11:18] <LeoNerd> too slow
[08:11:40] <rogan_> it's only keystrokes and mouse movements, so not a huge processing requirement
[08:11:57] <rogan_> but are you referring to the hard realtime response time requirements for the software stack?
[08:12:03] <LeoNerd> Software USB is a pain to talk, though
[08:12:44] <rogan_> and would any of the existing USB stacks (LUFA, V-USB) be able to support a second instance?
[08:13:37] <rogan_> if anything could do it, I'd expect the Teensy to be "fast enough", no?
[08:17:50] <twnqx> so... still on the quest for resilient I/O
[08:19:18] <twnqx> and now i realized that my output mosfets will die on the negative half wave in case someone wires them up to AC
[08:20:12] <twnqx> so i probably need mosfets with V(DS) of +-250V, eh
[10:34:24] <lazor> Does anyone have an idea what could cause a Stream timeout in LUFA using a Endpoint_Write_Stream_LE() (on the Xmega)? My protocol sniffer seas the xmega usb never response as well.
[11:03:24] <martinus> Guys, is there a "standard" in-line (6*1) pin arrangement for SPI?
[11:03:43] <LeoNerd> I'm not aware of one
[11:03:59] <twnqx> np, spi isn't meant to be pluggable
[11:04:02] <jadew> why 6?
[11:04:35] <LeoNerd> Because ISP is a 6-pin signal
[11:04:38] <martinus> Prototyping. :)
[11:04:42] <LeoNerd> Usually it has 2x3 or 2x5 forms
[11:04:49] <jadew> SPI != ISP
[11:05:07] <LeoNerd> .. oh. I misread
[11:05:15] <LeoNerd> Ignore me :)
[11:05:20] <jadew> but that's what he meant anyway :)
[11:05:31] <jadew> didn't you martinus?
[11:05:57] <martinus> Derp! I did indeed. Sorry, brain-fart.
[11:06:14] <LeoNerd> I'd probably just use the same pin numbering as the 2x3 layout
[11:06:16] <jadew> you make your own and stick to it
[11:06:42] <martinus> Yeah, I might just alphabetically order the pins.
[11:06:45] <LeoNerd> Though, why do you want 1x6? You'd then be incompatible with all the existing tooling
[11:06:56] <jadew> martinus, by the first letter only
[11:06:56] <martinus> breadboarding.
[11:07:04] <jadew> so by P
[11:07:15] <LeoNerd> I have a breadboard ISP adapter
[11:07:30] <LeoNerd> Just a little tiny 2x3 to 1x6 pin breakout
[11:08:06] <jadew> that's a good idea
[11:19:32] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/new_kits/Accessory1_desc.jpg
[11:19:34] <Tom_itx> like those?
[11:20:09] <LeoNerd> Yah. similar. Except mine was hand-built on stripboard ;)
[11:20:22] <Tom_itx> i've got quite a few of those left
[11:20:31] <Tom_itx> not built up..
[11:21:59] <martinus> Doing the same, I figured it would be best to follow an agreed standard if there was one.
[11:22:57] <Tom_itx> just on the header pinout
[11:23:48] <Tom_itx> the header pinout can be found midway down on this page: http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_User_manual_index.php
[11:24:19] <martinus> Yeah, I'm familiar with the 5*2 and 3*2 pinouts. :)
[13:48:06] <rogan_> hi folks. Re-asking this question, since there seems to be a bit more activity in the channel:
[13:48:30] <rogan_> is it possible for LUFA to manage two separate device busses at the same time?
[13:48:41] <rogan_> i.e. to act as a device to two different hosts?
[14:13:49] <twnqx> are there chips with two physical usb interfaces?
[14:13:55] <twnqx> no.
[14:14:04] <twnqx> so how would you intend to physically wire it?
[14:14:35] <twnqx> (if you find a solution, pm me - i have somethin gin mind i'd need that for)
[14:14:49] <twnqx> (though one of the two would just be snooping)
[14:17:50] <LeoNerd> I expect he intends V-USB
[14:20:44] <specing> < twnqx> are there chips with two physical usb interfaces?
[14:20:48] <specing> oh yes there are
[14:21:06] <specing> not sure about 8bit avr tho
[14:21:33] <Tom_itx> not unless some xmega has it
[14:23:53] <specing> AT91SAM sure do
[14:25:44] <Tom_itx> hmm
[14:57:32] <rogan_> twnqx: I'd wire one USB interface up to the hardware pins, and the other up to two software controlled pins, if I had to
[14:57:50] <rogan_> but yes, I"m thinking V-USB or LUFA, running two busses
[14:58:13] <rogan_> I have e.g. a teensy 3.1 on hand, that would be perfect
[14:58:51] <rogan_> I've been googling for microcontrollers with two device interfaces, and have not been terribly successful
[14:59:14] <rogan_> only thing I've found that was vaguely positive was USB Easy Link cables, with a variety of chips embedded
[14:59:28] <rogan_> e.g Prolific PL25A1
[14:59:58] <rogan_> which obviously do have dual device ports, but do not seems to have any programmability
[15:00:13] <rogan_> and Linux drivers treat them as an RNDIS interface, I believe
[15:01:49] <rogan_> I guess it would be interesting to see if LUFA can do a pure software device interface using two randomly chosen pins
[15:06:49] <twnqx> i was under the impression that lufa is pure hardware
[15:34:39] <bezoka> hello, is on atmega8 any interface that can: communicate with for example 15 others atmega, and distance is about 100m
[15:41:47] <zed___> bezoka: what are you doing at 100m =
[15:41:50] <zed___> ?
[15:41:56] <zed___> what data are you transferring?
[15:42:48] <bezoka> zed___: I need send number 1-255 only
[15:43:00] <bezoka> for example "5"
[15:43:56] <bezoka> zed___: I make window blinds driver
[15:46:27] <zed___> bezoka: look into the xbee
[15:47:05] <zed___> bezoka: https://www.sparkfun.com/products/10414
[15:47:10] <zed___> bezoka: they have a 120m range
[15:47:29] <bezoka> I will have wire :)
[15:47:39] <bezoka> it isnt problem
[15:47:43] <zed___> bezoka: haha alright. a wire would be way better
[15:48:22] <bezoka> wire in wall :)
[15:49:01] <zed___> bezoka: but wireless would be so much cooler
[15:50:46] <bezoka> cool like cold or like good?
[15:51:20] <zed___> bezoka: cool like good, or awesome. I'm guessing you're not a native english speaker
[15:51:35] <bezoka> zed___: true
[15:52:11] <bezoka> just dont know whats better for me: uart/twi/spi
[15:53:14] <zed___> bezoka: use spi, it's easy enough
[15:53:52] <bezoka> can I use for 15 uC only 4 wires?
[15:54:08] <bezoka> master SS to slaves SS?
[15:54:42] <bezoka> Master SS -> slave -> slave -> slave (only one wire)
[15:55:01] <zed___> bezoka: yup, four wires total to daisy chain devices
[15:55:01] <zed___> https://cdn.sparkfun.com/assets/e/3/b/d/1/50e5d529ce395fd27b000001.png
[15:55:48] <bezoka> okay, thanks :)
[15:55:49] <zed___> but MISO from your first device goes to MOSI on your next, etc, and on the last device MISO goes to MISO on your uC
[15:56:17] <bezoka> zed___: oh
[15:56:52] <zed___> bezoka: check out this article https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi/slave-select-ss
[15:56:55] <bezoka> zed___: its complicate something?
[15:57:53] <zed___> zed___: it's a little more complicated, but it makes sense. i mean you could also just leave the MISO line disconnected entirely if you don't need to receive data from the window blinds
[15:59:06] <bezoka> zed___: why?
[15:59:37] <zed___> MISO is master in slave out - it's the data received by your main uC
[15:59:40] <bezoka> and how it will work in program: I need send only one time what I want?
[16:00:12] <zed___> yes - you would just send the command to change the window blinds, and then the uC at the window blinds would receive that data and perform the action with a servo or something
[16:00:30] <zed___> but those uCs at the other end could not send data back to the master if you disconnect the MISO line
[16:01:58] <bezoka> zed___: okay understand, thanks a lot :)
[18:24:45] <twnqx> zed___: you missed a huge problem
[18:25:15] <twnqx> i'd expect that at 120m the voltage drop over the line will render any 5V comms useless
[18:29:24] <zed___> twnqx: oh yeah totally
[18:29:39] <zed___> thought he was either going to account for that or figure it out on his own
[18:29:53] <twnqx> if he even needs to ask here...
[18:30:25] <zed___> you never know, he could be an electrician and understands that concept and is just learning about microcontrollers
[18:30:40] <zed___> or he's not and will learn that concept soon enough
[18:33:29] <zed___> and if he's still on here, he could read this: http://electronics.stackexchange.com/questions/49824/microcontroller-with-a-long-wire-for-digital-input
[18:34:13] <zed___> actually buying a bunch of cheap doorbells or garage openers could be fun to use for the wireless part instead of wired cables
[18:35:01] <zed___> or do something fun like this http://www.instructables.com/id/How-to-Send-Data-by-Light-Fiber-Optics/
[19:51:40] <Jordan_U> Why does avr libc include strlcpy() when GNU libc doesn't?
[19:53:13] <Lambda_Aurigae> because.
[19:53:19] <Lambda_Aurigae> avr libc is not gnu libc
[19:57:00] <Lambda_Aurigae> strlcpy in some cases is considered to be insecure.
[19:57:14] <Lambda_Aurigae> specially if it's written without bounds checking.
[19:57:23] <Lambda_Aurigae> which often times it is.
[20:01:06] <rue_house> I wonder how big the cap across an avr would have to be to give it time to write 4 bytes to eeprom before the capacitor died
[20:01:27] <Lambda_Aurigae> hmmm.
[20:01:35] <Lambda_Aurigae> bigger than 4700uF I'm sure.
[20:09:24] <Casper> how long does it take to write 4 bytes?
[20:09:40] <Casper> what is the Vsupply and Vmin? and at what current?
[23:24:17] <rue_house> it'd know when the supply feeding the cap was lost