#avr | Logs for 2014-04-23

Back
[00:00:47] * Casper wonders if in gcc you have a way to put in a variable the source code line...
[00:01:11] <Casper> so your debug printout tell you which line you actually did the data print
[00:01:30] <alex20032> because i was wondering if shall buy an avr dragon..
[00:01:56] <alex20032> debugger, and a way to reset fuse
[00:02:49] <alex20032> i hate fuse
[00:04:03] <Casper> atleast they ain't one time fuse :D
[00:11:59] <alex20032> mv /alex20032 /etc/bed
[00:18:27] <rue_house> /etc/bed write permission denied
[07:23:36] <hetii> Hi
[07:23:58] <dkordic> Greetings.
[07:24:20] <hetii> I try use usbasploader, in PC its like: Bus 003 Device 064: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb but when i try use avrdude i got: avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc
[09:15:04] <rue_house> hetii, on windows?
[09:15:48] <rue_house> I think I recall there is a version of libusb that dosn't work right
[09:29:37] <hetii> rue_house: no, in linux mint 15.
[09:30:57] <rue_house> google for problems with libusb versions
[09:31:17] <rue_house> tom may know more about it
[09:31:23] <hetii> Here is full log: http://pastebin.com/8qxBqZ0d
[09:31:27] <rue_house> tom may know more about it
[09:32:43] <hetii> and here with lsusb: http://pastebin.com/QCQ9rWzh
[09:33:50] <hetii> Tom_itx: ?
[10:47:29] <vsync_> what's the maximum speed for spi comm. Is it 1/2 fsck?
[12:36:21] <hetii> Hi :)
[12:37:59] <hetii> I try change a bit usbasploader, when i add DDRD|= (1<<3); under if(bootLoaderCondition()){...} and try flash my chip i got: avrdude: verification error, first mismatch at byte 0x18c0 0xec != 0xea
[14:09:20] <tzanger> http://kck.st/1iMnumb
[14:09:23] <tzanger> guy Ive worked with for 20y just started a kickstarter for a solid usb3 hub
[14:09:26] <tzanger> don't care about the "beautiful" part of it. it's technically solid which is what most hubs are not
[14:14:45] <myself> Not bad, not bad.
[14:15:15] <mog> ive never had a problem with hubs.
[14:15:21] <mog> but i also dont use many usb devices
[14:15:40] <mog> but his price is really fair given small production
[14:21:17] <myself> I've learned that you do get what you pay for, in usb devices as much as anywhere else. i just don't own anything usb3 yet.
[14:32:07] <myself> tzanger: is he interested in another usb-related idea that I actually *would* buy? heh.
[14:35:25] <myself> Well, I'll braindump here anyway: I often find myself wishing for:
[14:35:37] <myself> * An external "battery slice" to extend my laptop's runtime
[14:35:54] <myself> * A "USB power bank" thingy for charging phones and other devices
[14:36:17] <myself> * tons of USB ports for working with several devices at once on a laptop that has only 3 USB ports.
[14:36:43] <kastein> cool story...?
[14:36:51] <myself> In my mind, these wishes overlap, and a battery-slice *covered in USB ports* could act as a massive hub, a power bank, all those things.
[14:37:58] <tzanger> myself: ?
[14:38:23] <tzanger> moment.
[15:38:51] <tzanger> myself: so basically a USB hub that can be powered from a battery?
[16:44:05] <myself> tzanger: A USB hub which *is* a giant battery, and which powers itself by taking in a laptop power cord. (And passing it through, so the laptop can still charge..)
[16:48:55] <megal0maniac_afk> myself: Lenovo Thinkpad X220 with Ultrabase & battery slice
[16:49:02] <megal0maniac_afk> 6 Cell, I think
[16:49:14] <megal0maniac_afk> 7x USB in total
[16:49:40] <megal0maniac_afk> Plus DVD writer and total battery capacity of 15 cells
[16:49:50] <specing> lifespan?
[16:50:13] <megal0maniac_afk> Forever
[16:50:17] <megal0maniac_afk> It's a thinkpad :)
[16:50:30] <megal0maniac_afk> Or battery lifespan?
[16:50:33] <specing> battery one
[16:50:45] <specing> and even a thinkpad dies eventually
[16:51:21] <megal0maniac_afk> Using AS or browsing internet I get 6-7 hours on a 6cell
[16:51:50] <megal0maniac_afk> myself: And it has a USB port which always provides power for charging stuff
[16:52:56] <megal0maniac_afk> I have the thinkpad with a 6 cell battery and the ultrabase. 9 cell isn't necessary and battery slice is excessive (for me)
[17:41:23] <Timmy> can someone compile this simple code and give me compiled hex file? How much I try I can't enable TIMERs and I think there must be a problem in the compiler http://paste.starnix.ir/pbafcm9z6
[18:04:41] <Mustafa__> which cpu?
[18:32:46] <sjokkis> I need to store which ports/pins are used for SPI in EEPROM. In the place where I'm reading this back out, I set the direction of the pins, set pullups and so forth. So where I read this, I need to know the data direction register and either the port or pin register (depending on if it's input or output) for each of the pins. What's the nice way to store this information with as few bytes as possible?
[18:34:16] <sjokkis> I noticed that on the controller I'm using, the 328, the register addresses are neatly ordered like PINB, DDRB, PORTB, PINC, DDRC and so on. I could use that to only transfer the address of one of the registers, rather than all three, but is that the case for all AVRs?
[18:35:28] <Casper> store the pointer address
[18:35:53] <Casper> or the pointer offset
[18:36:06] <sjokkis> Casper: Can I get an address for a particular pin in a PORT register?
[18:36:42] <Casper> I don't know how to deal with pointers exactly, but... pointers are basically the address in memory
[18:37:13] <Casper> if you store that info, you can set the pointer to it, then use your variable the same way as DDRA
[18:37:50] <sjokkis> Yeah, I can store the pointer to PORTB for instance, but if I want to store that I'm using PORTB3 for something, do I absolutely need to store that as two bytes (one being the pointer to PORTB, and the other the value 3), or can I do it with one byte?
[18:37:53] <Casper> and look at the memory map, you may be able to store only one of the info, and deduce the other, but that can be slightly risky if you change the device
[18:38:25] <Casper> you may be able to cheat, but I'ld use the 2-3 bytes needed
[18:38:29] <Casper> but why in eeprom?
[18:38:47] <sjokkis> Writing a bootloader that needs to know how to use SPI
[18:38:55] <Casper> your hardware will change?
[18:39:10] <Casper> you ain't using hardware spi?
[18:40:11] <sjokkis> Using hardware SPI, but I have to support a range of AVRs
[18:40:37] <Casper> then your thinking is most probably wrong
[18:40:38] <sjokkis> I thought they weren't always on the same pins
[18:40:59] <Casper> the binary most likelly won't run on other device, you need to recompile
[18:41:41] <sjokkis> Well yeah. But don't some AVRs even have multiple SPIs?
[18:42:08] <sjokkis> Pretty sure I saw some that did
[18:42:39] <sjokkis> Maybe I'm wrong, and I only need to store the chip select pin in EEPROM
[18:43:17] <Casper> I beleive you are better to hard code it and use some #ifdef and compile one binary per chip
[18:43:29] <Casper> which you most likelly need to do anyway
[18:43:40] <sjokkis> Yeah, I'll definitely have to compile for each chip
[18:44:05] <sjokkis> So then I only need to store chip select. That's excellent news
[18:48:14] <sjokkis> Thanks, Casper. You're the best!
[18:52:07] <Casper> also, double check to see if the pointer is 8 or 16 bits
[18:52:34] <sjokkis> the register address? pretty sure it's 8
[18:53:15] <sjokkis> is it 16 bits on some AVRs?
[18:54:10] <Casper> afaik, the register is memory mapped... and since you have more than 256 bytes... but the registers stop somewhere...
[18:54:15] <Casper> just double check