#avr | Logs for 2013-06-22

Back
[03:23:01] <Roklobsta> is the supplied avr-libc compiled with -O1?\
[03:27:21] <specing> could be
[03:35:31] <megal0maniac> I've heard somewhere that one should avoid -O0 at all costs
[03:38:53] <megal0maniac> abcminiuser: Morning :)
[03:39:49] <Roklobsta> yeah i looked at some -O0 assembly this morning and it was arse
[03:40:06] <specing> -O0 and -O2 doesen't make much difference with avr-gcc
[03:40:12] <specing> since it sucks anyway
[03:40:44] <megal0maniac> abcminiuser: I have a few things to say / ask since I've been hacking away at LUFA
[03:41:39] <megal0maniac> Firstly, AS6.1 wants to put new firmware on it, thus it is unsupported. But you probably know that already (I'm using the latest stable LUFA build though, not trunk)
[03:42:41] <megal0maniac> Secondly, I have some board files for you. Or board / leds / buttons files.
[03:43:29] <megal0maniac> I manually added them to the global files and they seem to work just fine. Haven't tested the button yet, since avrispmkii doesn't use it iirc
[03:44:51] <abcminiuser> Greetings!
[03:45:13] <megal0maniac> Thirdly, I need to move the clock output from C7 to B7 and add one or two lines of code for entering and leaving TPI programming mode (toggling pins on port C for HV TPI support with Rikus' board)
[03:45:14] <abcminiuser> Yeah, I need to push out a new release with a fix
[03:45:22] <abcminiuser> But the XMEGA support is a bit wonky
[03:45:31] <megal0maniac> What is the nice way to do that without breaking universal support?
[03:45:39] <megal0maniac> I think that's all, for now :)
[03:46:08] <abcminiuser> Which device?
[03:46:24] <megal0maniac> RikusW's U2S board. mega32u2 based
[03:47:42] <abcminiuser> Clock out shouldn't be on C7 on that chip
[03:48:14] <megal0maniac> Hmmm... I don't know if it's the actual clock output, but there's a 4mhz square wave on it
[03:48:21] <megal0maniac> Maybe I did something wrong
[03:48:41] <abcminiuser> C6 I would believe
[03:48:49] <abcminiuser> C7 is just an int pin, and the CPU clock out
[03:50:25] <abcminiuser> Moving it to B7 should be possible, just need to alter ISPTarget_ConfigureRescueClock()
[03:50:54] <megal0maniac> Here's what I've done: http://atinyhedgehog.za.net/u2slufa.patch
[03:51:44] <megal0maniac> I've already moved reset, it's mapped to the AUX line iirc
[03:52:38] <abcminiuser> If you use github submit a pull request for the board support patch
[03:52:46] <abcminiuser> That should reduce the maintenance burdon
[03:52:57] <megal0maniac> Obviously that'll break support on all other devices. I just wanted to get it working first.
[03:53:31] <megal0maniac> Mmm.. Maybe I'll register on github, then I'll learn how it works
[03:53:46] <megal0maniac> How do you go about moving things for specific boards?
[03:54:05] <megal0maniac> Without breaking universal support and making a complete mess of the code
[03:55:34] <abcminiuser> Hrm, well I didn't write it to allow for moving everything everywhere
[03:55:47] <abcminiuser> The interface clocks and what not are hard coded since they need physical device peripherals
[03:56:00] <abcminiuser> But I could add in options to use OC1B or OC1C for the rescue clock
[03:56:20] <abcminiuser> For the AUX line, use #if (BOARD == BOARD_U2S) checks in the header to move the AUX pin
[03:57:03] <megal0maniac> The TPI HV stuff just requres C4 C5 and C7 to be pulled low when entering programming mode, and tristated when leaving
[03:57:48] <megal0maniac> Don't think C6 is being used for anything, so that's fine. It's just that clock output on C7 that's bugging me
[03:58:41] <abcminiuser> You should be able to turn that off IIRC
[03:59:27] <abcminiuser> Hrm balls I didn't add a complete disable, just a option to move it to the USART XCK pin
[03:59:52] <abcminiuser> If you want to be super fancy you could either link in some __attribute__((strong)) functions to override the existing implementations
[04:00:07] <abcminiuser> And then call __real_* to call into the original code afterwards
[04:00:13] <abcminiuser> http://stackoverflow.com/questions/617554/override-a-function-call-in-c
[04:00:16] <megal0maniac> I'm not at the super fancy level yet :P
[04:00:20] <megal0maniac> But I could read that...
[04:01:07] <abcminiuser> I kid, I should probably add options to just move it to sane locations :P
[04:02:41] <abcminiuser> I haven't been doing much coding lately, I guess I should get back into it
[04:03:00] <abcminiuser> I just feel like I'm wasting my life doing the same old things, yet can't think of anything interesting to make :(
[04:03:11] <abcminiuser> So I just keep plodding along with what I know and what I have
[04:04:04] <megal0maniac> Ah. It is on C6
[04:04:16] <abcminiuser> Indeed
[04:05:18] <megal0maniac> Finding something interesting to make is a creative thing. Don't break your brain trying to find something, it'll come to you. Usually while you're showering or driving :)
[04:05:38] <megal0maniac> Oh balls. C4 5 and 7 are dead in the water
[04:05:52] <abcminiuser> Mmm?
[04:06:34] <megal0maniac> Oh no they aren't. Programming mode isn't entered until you read signature. Clicking apply doesn't do it
[04:06:51] <megal0maniac> 4 does nothing though :/
[04:07:48] <megal0maniac> PORTC &= ~(1 << 4) | ~(1 << 5);
[04:07:49] <megal0maniac> DDRC |= (1 << 7) | (1 << 5) | (1 << 4);
[04:08:22] <megal0maniac> Am I being a dumbass or is something else breaking it?
[04:09:14] <abcminiuser> PC4 doesn't seem to have any interesting alt functions...
[04:09:26] <megal0maniac> And that code should work, yes?
[04:09:35] <abcminiuser> Your code should make it low tho, is it stuck high?
[04:10:21] <megal0maniac> Yeah. C5 and C7 drop low while it tries to read signature, as expected, and return high when it times out. C4 stays high
[04:10:46] <abcminiuser> Simple test - make a basic app that just toggles all of PORT C
[04:10:49] <megal0maniac> Well they dont' /actually/ return high, but yeah
[04:10:52] <abcminiuser> See if that is still broken
[04:10:58] <abcminiuser> If so, it might be shorted to UCAP
[04:11:06] <megal0maniac> UCAP?
[04:11:18] <megal0maniac> Dammit where is Rikus? He made this thing
[04:11:33] <abcminiuser> USB pad regulator capactitor pin next to it
[04:12:02] <megal0maniac> https://sites.google.com/site/megau2s/home/STK500
[04:12:21] <megal0maniac> Check under the first schematic, there's function descriptions for the upper bits of PORTC
[04:12:54] <megal0maniac> C4 toggles reset in stock fw
[04:16:47] <abcminiuser> That makes my head hurt :P
[04:17:41] <megal0maniac> I know, right?
[04:18:37] <megal0maniac> Oh crap
[04:18:39] <megal0maniac> I remember
[04:19:07] <megal0maniac> I mustn't touch the lower bits of PORTC
[04:21:05] <megal0maniac> Because PC0 is also XTAL2
[04:21:23] <megal0maniac> Anyway, it works just fine
[04:21:32] <megal0maniac> 4 5 6 7 all clocking away
[04:22:30] <abcminiuser> If the device is fused to an external crystal, the XTAL pins can't be software modified
[04:23:08] <megal0maniac> Then maybe it's something to do with the module he has in the bootloader
[04:23:33] <megal0maniac> In any case, you stop the clock if you change one of the PORTC pins
[04:27:01] <megal0maniac> Hmm.. There's a button on C4
[04:27:27] <megal0maniac> But it's still software related because the test program worked
[04:28:17] <megal0maniac> "set C7 low to enable power, then C4 and C5 low"
[04:28:29] <megal0maniac> "If TPI requires a sharp 12V rise you may need to do C4 high C5 low --delay 10ms-- C4 low"
[04:30:58] <megal0maniac> The code I added also seems to break programming in general :/ This thing seems prone to freezing
[04:34:26] <abcminiuser> :(
[04:34:30] <abcminiuser> Hopefully not due to my code
[04:34:41] <megal0maniac> Most likely not :P
[04:35:11] <megal0maniac> I'm not entirely sure of what I'm doing
[04:35:34] <abcminiuser> Hurrah so I'm not alone then
[04:37:28] <antto> so when i do "lsusb" my USBasp appears as: "Bus 002 Device 092: ID 16c0:05dc VOTI shared ID for use with libusb"
[04:40:09] <abcminiuser> antto, jupp
[04:40:23] <abcminiuser> The string that appears is hard coded in the USB database *nix systems uses
[04:40:38] <abcminiuser> It ignores the actual device string except in dmegs
[04:40:41] <abcminiuser> *dmesg
[04:41:06] <antto> but why can't avrdude "see" it?
[04:41:18] <megal0maniac> Ooh! I know!
[04:41:21] <megal0maniac> udev rules?
[04:41:29] <abcminiuser> sudo avrdude ....
[04:41:40] <megal0maniac> Jawol
[04:43:05] <antto> oh, it works
[04:43:28] <antto> i *did* rehit all solder joints on it too
[04:43:41] <antto> except on the actual mcu, since it's SMD
[04:43:55] <megal0maniac> Google "avrdude udev rules" and you'll get a lot of instructions on how to run it as a regular user
[04:44:08] <megal0maniac> It's better practice to set it up that way
[04:44:14] <antto> but the question is, will it work in windows?
[04:44:30] <megal0maniac> Probably. Windows doesn't have that particular problem
[04:44:37] <megal0maniac> It's just a permissions thing
[04:44:39] <antto> it didn't work yesterday
[04:44:58] <antto> windows wasn't recognizing what usb device it is (as if it's broken)
[04:45:06] <antto> gonna reboot and see
[04:45:13] <megal0maniac> It's based on vusb, so that isn't impossible
[04:45:31] <antto> no idea what's vusb
[04:45:42] <megal0maniac> Because vusb is bit-banged, it doesn't enumerate on all machines / operating systems
[04:45:46] <antto> but my USBasp is very chinese, iykwim
[04:46:16] <megal0maniac> Try it through a USB hub, just to see
[04:46:33] <antto> don't have such things
[04:46:37] <antto> brb
[04:49:53] <abcminiuser> EMERGENCY FOOD SHOPPING
[04:49:56] <abcminiuser> THIS IS NOT A DRILL
[04:49:56] <megal0maniac> abcminiuser: Finally kind of figured it out
[04:50:06] <megal0maniac> Oh lawdie
[04:50:15] * abcminiuser will be back to regularly scheduled programming in about an hour
[04:50:28] <abcminiuser> Leave your messages at the beep and I'll see them when I'm back
[04:50:30] * abcminiuser BEEP
[04:50:35] <megal0maniac> :)
[04:53:49] <antto> okay, NOW windows recognized it, wanted drivers..
[04:54:12] <antto> so it _was_ broken yesterday, for some reason
[04:54:19] <antto> maybe rehitting the joints helped
[05:01:02] <megal0maniac> abcminiuser: I think (assume) I've submitted a pull request
[05:02:46] <antto> oh f*ck, the same thing again
[05:03:00] <antto> it suddenly stopped working, windows doesn't recognize it
[05:03:03] <megal0maniac> Oh. I tried to commit. And I can't :)
[05:14:35] <megal0maniac> Yay! Github is easy
[05:15:22] <specing> Indeed
[05:15:25] <megal0maniac> abcminiuser: I forked LUFA to my own account, cloned in Windows, made the changes, committed them and created a pull request with my fork as the head and yours as the base. Sound right?
[05:15:41] <specing> megal0maniac: look at the changes
[05:16:01] <megal0maniac> Well it all looks right
[05:16:20] <megal0maniac> So I shall assume it is until I'm told otherwise
[05:16:38] <antto> "Writing | | 0% 0.00s avrdude:error: usbasp_transmit: usb_control_msg: sending control message failed, win error: A device attached to the system is not functioning."
[05:17:07] <megal0maniac> specing: Quick check, is this the correct way to use #if ? https://github.com/megal0maniac/lufa/blob/4a4b9d3051e43a6495b28e9c7eb79674fcf1e46d/Projects/AVRISP-MKII/Config/AppConfig.h
[05:17:29] <megal0maniac> Indenting got broken, but that's not the point :)
[05:21:12] <antto> so, i bricked the thing
[05:21:57] <megal0maniac> *pat pat*
[05:23:16] <Roklobsta> speccing: what so crap about gcc for avr at least?
[05:25:26] <specing> Roklobsta: Look at (x86/arm)-gcc disassembly
[05:25:38] <specing> Now look at avr-gcc disassembly
[05:25:46] <specing> (at -O2)
[05:26:20] <Roklobsta> oh. i am sticking with -O1
[05:26:28] <Roklobsta> it's easy to deboog
[05:26:32] <Roklobsta> with avrs6
[05:26:52] <specing> -O1 is even worse
[05:28:40] <Roklobsta> i am happy so far.
[05:28:52] <Roklobsta> -O0 is shitawful
[06:02:17] <abcminiuser> MARCO
[06:03:03] <megal0maniac> POLO
[06:04:30] <abcminiuser> Heh
[06:05:06] <megal0maniac> I pushed. I think.
[06:10:29] <antto> i tried with ubuntu, while also watching the "dmesg" log
[06:10:31] <antto> http://pastebin.com/gjcGZQ9P
[06:11:19] <antto> i believe the same thing happens on windows
[06:12:31] <Roklobsta> abc: it's the longest daylight weekend of the year. go outside!
[06:13:16] <antto> all 3 LEDs on the USBASP remain lit after this
[06:14:14] <antto> retrying the avrdude command results in "could not find USB device USBasp .." error
[06:14:16] <abcminiuser> megal0maniac, got it
[06:14:30] <abcminiuser> Just needs a few tweaks my end and I can integrate it
[06:14:33] <antto> is it busted?
[06:14:47] <abcminiuser> Nah just infrastructure junk
[06:14:56] <abcminiuser> Changelogs and build tests etc
[06:16:27] <abcminiuser> What name do you want in the changelog?
[06:16:54] <Roklobsta> abcminiuser: what gcc features do you use in lufa?
[06:17:13] <abcminiuser> Roklobsta, all of them
[06:18:05] <Roklobsta> "and uses several GCC-only extensions to make the library API more streamlined and robust"
[06:18:10] <Roklobsta> i mean what extensions
[06:18:23] <beaky> what is the difference between SPI and ISP?
[06:19:26] <abcminiuser> Weak function signatures and aliases, compound literal intitializers
[06:19:31] <abcminiuser> And lots of C99
[06:19:43] <abcminiuser> beaky, SPI is a generic communication protocol
[06:19:49] <beaky> ah
[06:19:52] <abcminiuser> ISP is a programming protocol that runs across SPI
[06:19:59] <beaky> thanks
[06:20:00] <Roklobsta> i'll give you an 80% right answer: ISP just uses the SPI protocol where the avr is a slave to be programmed by a ruthless host.
[06:21:20] <beaky> hah
[06:21:36] <antto> can anyone tell from what i pasted above, what can i do in this situation?
[06:21:48] <beaky> is there a difference between uart and usart?
[06:21:57] <abcminiuser> USART can do synchronous mode
[06:22:09] <abcminiuser> Where you have a seperate clock signal that synchronises the transfer
[06:22:22] <abcminiuser> UART is (or rather should be) only asychronous
[06:22:42] <abcminiuser> Where the speed of transmission is agreed upon beforehand, and it's up to each end to sample the input at the correct time
[06:23:50] <beaky> ah
[06:23:54] <Roklobsta> UART needs a start bit to mark the start of the byte and syncronise the receiver, USART doesn't but has a seperate clock
[06:24:18] <abcminiuser> megal0maniac, patch integrated
[06:26:04] <beaky> what avr implementation does ATMEL recommend to their users?
[06:26:15] <beaky> is it avr-gcc? (the most popular one iirc)
[06:26:24] <beaky> I think ATMEL docs specify some other one
[06:26:36] <abcminiuser> You mean compiler?
[06:26:40] <beaky> yes
[06:26:41] <abcminiuser> IAR (commercial) or GCC (free_
[06:26:45] <abcminiuser> Don't use IAR
[06:26:49] <beaky> ah
[06:27:05] <Roklobsta> atmel supply avr-gcc for FREE so I think you know which one they endorse
[06:27:09] <Roklobsta> what's wrong with iar
[06:27:11] <beaky> my textbook goes on about some CodeVision AVR compiler and how it is the ultimate AVR compiler
[06:27:18] <beaky> but nobody ever mentions it ^^
[06:27:23] <abcminiuser> Jesus no
[06:27:33] <abcminiuser> IAR is the devil
[06:27:50] <abcminiuser> Expensive, horrendous project file format (since I had to help out with the project generator for it at work)
[06:28:02] <abcminiuser> Bad support unless you pay a lot, then it only becomes acceptable support
[06:28:06] <abcminiuser> TERRIBLE IDE
[06:28:12] <beaky> im so glad avr compilers are free and top quality; PIC and ARM compiler costs a thousand bucks
[06:28:14] <Roklobsta> how about the quality of the code it generates
[06:28:24] <Roklobsta> arm is free
[06:28:31] <abcminiuser> Basically, you're paying $3000 for slightly smaller binaries, in all other respects it's worse than GCC
[06:28:31] <Roklobsta> gcc-arm
[06:28:49] <abcminiuser> arm-gcc is mature and works great
[06:29:00] <Roklobsta> do atmel pay ppl to work on avrgcc?
[06:29:03] <abcminiuser> Since it's used by all the big projects on all the big phones, it's been worked on a lot
[06:29:11] <abcminiuser> Yes, we have several dedicated toolchain engineers
[06:29:18] <Roklobsta> eric and joerg
[06:29:19] <Roklobsta> ?
[06:29:24] <beaky> wow that is awesome
[06:29:57] <abcminiuser> Nei
[06:30:07] <abcminiuser> A few in Chennai, and a few here in Norway
[06:30:15] <Roklobsta> aha
[06:30:17] <abcminiuser> Grab the toolchain from the Atmel website
[06:30:43] <Roklobsta> beaky: yeah get the toolchain, stand alone or with avrs
[06:31:24] <beaky> I got the excellent CROSSPACK bundle for OSX
[06:31:31] <beaky> and the bundle they have for windows
[06:31:44] <beaky> (which I think is avr-gcc + avr-libc) with avr studio 4
[06:32:35] <Roklobsta> abcminiuser: i asked earlier, if I do the equivalent of a software interrupt by doing "SPMCSR |= _BV(SPMIE);" will the next opcode to be executed be in the ISR?
[06:32:59] <Roklobsta> i can't seem to determine this just by single stepping in the debugger
[06:33:20] <Roklobsta> at the disassembly level
[06:34:18] <abcminiuser> It will fire the vector table first
[06:34:27] <abcminiuser> IIRC, 7 cycle latency
[06:35:47] <Roklobsta> so after the 'out 0x37,R24' is executed the ISR shoudl be set and the next opcode will be in the isr. Is the 7 cycle latency stalling the pipeline ?
[06:36:39] <Roklobsta> i am just wondering if i need to put a pile of NOP's after the out as i don't want any more usefile code to be executed after the out.
[06:36:58] <abcminiuser> At most one instruction will be executed IIRC
[06:37:12] <abcminiuser> The 7 cycles is the vectoring and standard ISR prolog
[06:37:26] <abcminiuser> AVR8 has only two visible pipeline stages
[06:37:38] <abcminiuser> Which is why all instructions are either single or dual cycle
[06:37:52] <Roklobsta> ok, i see in the manual it says between reti and the next irq there is one cpu cycle
[06:42:27] <Roklobsta> hmm, ok i think once an ISR is asserted the pipeline stalls while the PC is pushed to the stack.
[06:43:32] <megal0maniac> abcminiuser: Sorry, forgot to /afk. Was lunching :)
[06:46:38] <megal0maniac> Not a biggie (no affect on functionality) but Rikus is misspelled in DeviceSupport.txt
[06:46:44] <megal0maniac> Otherwise, cool :) Thanks
[06:46:59] <abcminiuser> Balls, I can fix
[06:47:37] <megal0maniac> And sorry about the indentation. It looked fine in Sublime, only saw the fail on Git :/
[06:51:35] <beaky> what is the difference between an ATtiny and an ATmega?
[06:51:44] <beaky> and the Automotive AVRs
[06:51:55] <beaky> and ATxmega
[06:52:12] <beaky> I heard ATtiny is the cheapest of the bunch
[06:52:21] <Roklobsta> someone fetch the Big Spoonfeeding spoon.
[06:56:22] <jacekowski> beaky: same core, just more flash/memory/other peripherials
[06:56:40] <jacekowski> beaky: as in, atmega and attiny
[06:57:03] <jacekowski> atxmega are higher end
[06:57:20] <megal0maniac> Yet somehow cheaper
[06:58:41] <Roklobsta> will atmel change the manuf process and make a 100MHz AVR?
[06:58:50] <jacekowski> what for
[06:58:59] <jacekowski> you have AVR32 for that
[06:59:00] <Roklobsta> moar betta!
[06:59:15] <jacekowski> at bear in mind that on avr it's 1 instruction per cycle
[06:59:17] <Roklobsta> meh just go arm.
[06:59:23] <jacekowski> so 20MHz AVR == 80MHz PIC
[06:59:38] <Roklobsta> right. i have used 100MHz Silabs 8051
[06:59:58] <beaky> ahPING)))
[07:00:05] <Roklobsta> that needed a cache to keep the pipeline moving coz the flash wasn't fast enough
[07:00:27] <Roklobsta> though silabs reduced the cycles on many of the opcodes
[07:00:35] <beaky> avr is so fast
[07:00:42] <beaky> 1-1.5 MIPS
[07:01:00] <Roklobsta> err, try 1MIPs/MHz.
[07:01:01] <jacekowski> more like 20MIPS
[07:01:18] <beaky> ah
[07:01:29] <beaky> I thought I read somewhere thatn ATxmega was faster than ARM
[07:01:35] <beaky> in terms of MIPS/MHz
[07:01:40] <beaky> more efficnet*
[07:02:20] <Roklobsta> depends, arm and avr32 have 32 bit registers so many things will be faster because less work has to be done
[07:02:46] <Roklobsta> alrhough new to AVR i am impressed with its opcode expressiveness and efficiency
[07:03:10] <Roklobsta> 32 bit operations aren't as expensive as expected
[07:04:02] <beaky> yes avr is the worlds most modern 8-bit microcontroller
[07:05:21] <beaky> and the ideal SoC for most embedded applications
[07:07:09] <beaky> no wonder it is also the worlds most successful microcontroller family
[07:08:51] <Roklobsta> oh whup, i can't use lufa on my mega1280?
[07:08:54] <Roklobsta> or can i?
[07:09:01] <RikusW> no
[07:09:05] <RikusW> only USB avr
[07:09:35] <Roklobsta> poop
[07:09:44] <Roklobsta> not even some shitty bit banging?
[07:09:46] <Horologium> lufa requires hardware usb...
[07:09:56] <Horologium> vUSB can run on the mega1280.
[07:10:06] <Horologium> that is the software implemented usb.
[07:10:18] <Roklobsta> what did atmel offer before lufa came along?
[07:10:40] <Horologium> atmel has their own usb stack for the chips with hardware usb.
[07:11:01] <Horologium> lufa is just an alternate usb stack for chips with hardware usb.
[07:11:36] <Roklobsta> abcminiuser: which one is better. ;)
[07:12:04] <Roklobsta> aha vusb looks good
[07:12:50] <Horologium> vUSB is usable but it is only low speed usb and takes advantage of the fact that nobody follows the USB specifications real strictly.
[07:13:14] <Horologium> specially on the CDC implementation.
[07:13:43] <Horologium> CDC or virtual serial over usb is not supposed to run on low speed usb which s all that vUSB can do.
[07:14:02] <Horologium> but windows breaks the usb standard by accepting cdc over low speed usb.
[07:14:26] <Horologium> and linux can be made to do so...in fact, I think in the latest kernel series they have implemented the break by default.
[07:15:15] <Horologium> I've used vUSB for many HUD devices, specially custom joysticks and game controllers for flight simulators.
[07:15:29] <Roklobsta> excellent
[07:16:47] <Horologium> works well for custom keyboard and mouse implementations too.
[07:19:04] <Roklobsta> alas, the hardware i am using is fixed at 11MHz
[07:19:13] <Horologium> not fast enough.
[07:19:20] <Horologium> needs to be at least 12MHz.
[07:19:30] <Horologium> time to change the crystal.
[07:19:30] <Roklobsta> i think the designer wanted the fastest reliable speed at 3V
[07:19:50] <Roklobsta> it's not mine. i am just writng some software for it
[07:19:54] <Horologium> or, add a little usb avr as communications interface.
[07:20:10] <Roklobsta> it has a serial port anyway
[07:20:10] <Horologium> get one of those little boards from tom-itx
[07:20:25] <Roklobsta> and a 3g modem
[07:20:27] <Horologium> Tom_itx
[07:21:16] <Horologium> vUSB takes up a lot of processor time.
[07:21:25] <Horologium> it doesn't play well with a lot of heavy interrupts.
[07:22:37] <Roklobsta> hmmm, i have written a context switcher with 100Hz cycles.
[07:23:07] <Roklobsta> i don't expect a tight bit banger like vusb will play nice
[07:26:51] <Horologium> not at all.
[07:27:21] <Horologium> considering it is doing bit packing and unpacking and sending and receiving data at 1.5Mb/s.
[07:28:02] <Roklobsta> not a change
[07:28:04] <Roklobsta> chnace
[07:29:35] <Horologium> that little board that Tom_itx sells is really small and has everything on it you need to do a LUFA based comms system.
[07:30:04] <Horologium> although, I'm guessing you are going to need large quantities eventually?
[07:33:23] <specing> < beaky> no wonder it is also the worlds most successful microcontroller family
[07:33:27] <specing> nope.gif
[07:34:29] <Roklobsta> horo: not for me to decide.
[07:35:00] <Roklobsta> there is scope for a daughter card
[08:04:13] <megal0maniac> RikusW: https://github.com/abcminiuser/lufa/commit/4a4b9d3051e43a6495b28e9c7eb79674fcf1e46d
[08:06:54] <megal0maniac> No HV TPI support yet, but I'm getting there. PC4 isn't playing along for some reason. And moving the clock output might be more tricky than I thought.
[08:06:59] <megal0maniac> Work in progress :)
[08:11:13] <antto> what is the outter-most metal on a USB typeA plug?
[08:11:54] <antto> because when i try to measure resistance on it (on both ends of a cable) it is like not connected
[08:25:38] <abcminiuser> Hrm, forgot about studio integration
[08:25:39] <abcminiuser> Damnit
[08:27:08] <RikusW> hi
[08:27:28] <RikusW> megal0maniac_afk: some parts of that patch will need to be in #ifdef #endif
[08:27:35] <RikusW> else you might break some other stuff
[08:33:16] <RikusW> megal0maniac_afk: the mods to mkii source will have to be in #ifdef __BOARD_U2S__ #endif
[08:37:44] <RikusW> I see you already did a #if in AppConfig :)
[08:50:06] <abcminiuser> Collaboration, yo
[08:57:15] <RikusW> abcminiuser: we don't want to break you mkii just to make U2S work ;)
[08:57:32] <RikusW> #ifdef ftw
[08:57:36] <abcminiuser> A small #ifdef is fine
[08:57:46] <abcminiuser> I don't want enormous patches for one board
[08:57:51] <abcminiuser> But small tweaks are ok
[08:58:09] <RikusW> it will be a few lines in tpi enter/leave
[08:58:34] <RikusW> how about dW disabling support ?
[08:58:53] <abcminiuser> Sure if it's feasable
[08:58:56] <RikusW> that will probably end up in a separate file
[08:59:23] <RikusW> I used asm, will have to see how feasible it is in C
[08:59:46] <RikusW> it will work on Tom's programmer, he does have a pullup between the AVR and GTL IC
[09:01:17] <RikusW> TPI patch is basically to turn on 12V for HV TPI
[09:08:10] <RikusW> abcminiuser: https://github.com/abcminiuser/lufa/commit/4a4b9d3051e43a6495b28e9c7eb79674fcf1e46d
[09:08:21] <RikusW> you just missed it when megal0maniac_afk pasted it
[09:08:38] <RikusW> that one seems ok to me, shouldn't wreak havoc on the rest of LUFA
[09:09:01] <abcminiuser> Yeah that's fine
[09:09:01] <RikusW> TPI patch not included
[09:09:11] <RikusW> yet...
[09:09:29] <RikusW> it does fix the reset pin I put on B0...
[09:10:04] <RikusW> during my dW disable code it turns SPI into a slave.... nice bughunt there...
[09:10:50] <RikusW> seems it only happens when B0 is input
[09:10:55] <RikusW> fortunately for me
[09:11:54] <beaky> hello
[09:12:03] <beaky> http://ideone.com/Xh9lZg can anyone help me improve my code?
[09:12:57] <specing> beaky: here, let me move it to trash for you.
[09:13:07] <beaky> :(
[09:13:15] <beaky> but my code works
[09:13:26] <beaky> I want to just make it more efficient
[09:13:29] <beaky> and more elgant
[09:13:31] <beaky> elegant*
[09:13:35] <specing> then do so
[09:15:08] <beaky> what do you recommend?
[09:16:27] <ambro718> beaky: your time capture is racy, "us = TCNT1 + (65536lu * ovfs);"
[09:17:28] <beaky> ah
[09:17:30] <beaky> is it bad?
[09:17:37] <beaky> why is it bad*
[09:18:02] <ambro718> consider this: you read my_tcnt=TCNT, TCNT overflows and ovfs is incremented, you read my_ovfs=ovfs, you return my_tcnt+65536*my_ovfs
[09:18:45] <ambro718> yes, it's bad, your time will be off by around 65535 in random cases
[09:18:50] <beaky> ah damn
[09:19:30] <beaky> yeah my timing is a bit more
[09:19:33] <beaky> a bit extra*
[09:19:38] <beaky> how do I fix it?
[09:20:03] <theBear> heh, that's more than 9000 !
[09:20:34] <beaky> in practice my counter doesn't overflow since the input capture finishes quick
[09:20:43] <beaky> hmm maybe I should use builtin input capture
[09:20:50] <beaky> but I connected my LCD to port D damn
[09:21:04] <beaky> I mean PORTB
[09:22:03] <beaky> programming is the easiest part of embedded development
[09:22:14] <beaky> the hardest is coming up with the hardware
[09:22:21] <beaky> also the most expensive
[09:22:23] <beaky> or am I mistaken?
[09:22:28] <theBear> hmm, scrolling text eh ? that's err, not perfect but surprisingly not-too-bad ... not like the last random code some dude pasted here
[09:22:55] <beaky> I am printing readings from an ultrasoic transducer
[09:22:57] <theBear> if i can read it this drunk and sleepy, and it DOES do that, it must be not-too-bad
[09:23:33] <beaky> yeah it works!
[09:23:41] <beaky> but as ambro said the readings are a bit off :(
[09:23:47] <beaky> very slightly though
[09:25:00] <beaky> ambro is an elegant pogrammer
[09:26:18] <theBear> what, like ambro programs with perfect hairstyle and a long flowing ballgown ?
[09:26:26] <theBear> heh, elegant programmer
[09:26:28] <ambro718> beaky: here's one correct algorithm http://ideone.com/1PfKmD
[09:26:51] <beaky> wow what does TIFR mean
[09:26:58] <ambro718> this assumes interrupts were enabled before, you may want some of the lock macros if you don't know
[09:27:02] <beaky> ah
[09:27:30] <ambro718> beaky: the datasheet should help you with that. But anyway, it's the "overflow interrut pending" flag.
[09:27:41] <beaky> alright I will use it
[09:28:00] <beaky> maybe I will finally get the accurate readings my transducer promises (~300cm, my code reads up to 307cm
[09:28:03] <beaky> )
[09:28:08] <ambro718> meh forgot to fix all the code, s/TimeType/uint32_t/
[09:28:35] <beaky> ah you got it from your own programs? ^^
[09:28:48] <ambro718> huh?
[09:28:53] <beaky> copy-paste :D
[09:29:02] <beaky> from one of your larger programs
[09:29:18] <ambro718> yes, that's from the RepRap firmware I'm currently developing
[09:29:34] <beaky> wow awesome
[09:29:46] <beaky> whats it do? ^^
[09:30:04] <ambro718> right now, it moves the steppers left and right :D
[09:30:34] <beaky> soon it will 3d print anything
[09:30:53] <ambro718> it'll take some time, a week or three :P
[09:31:17] <ambro718> I'm trying to make it perfect :D
[09:35:58] <beaky> I want to use my atmel for something useful someday
[09:36:11] <beaky> for now I am just blinking leds :(
[10:03:14] <Horologium> antto, technically that outer contact is ground but it is often not connected to anything and just plays floating shield.
[10:05:37] <Horologium> http://www.smbc-comics.com/comics/20130622.png
[10:27:09] <antto> Horologium: so it's not required that the two outer contacts on both ends of a cable are connected to each other?
[10:29:40] <cart_man> RikusW: Hi Rikus how are you ?
[10:29:47] <RikusW> hi cart_man
[10:29:59] <RikusW> Relaxing a bit in Saturday :)
[10:30:07] <RikusW> How are you ?
[10:30:20] <cart_man> Pretty good thanks...working lol
[10:30:28] <cart_man> big project for monday demo
[10:30:43] <cart_man> Kind of a bummer, Came quite unexpected.
[10:32:19] <cart_man> RikusW: How often do you work with Proteus?
[10:32:31] <cart_man> To simulate things
[10:32:42] <RikusW> I used Altium and only for PCB design
[10:33:03] <RikusW> haven't even figured out how to use the rest of it
[10:33:30] <cart_man> Ohh ok cause I keep on getting this weird ADC error in the simulation...I dont have al my hardware with me soo im coding and then simulating.
[10:34:05] <RikusW> I still need some good sim sw
[10:34:19] <RikusW> but most seems to be rather expensive
[10:34:28] <cart_man> Well Proteus isnt bad at all !
[10:35:06] <cart_man> Yea its quite expensive..I have a semi old version that Im working on...Works but still seems to have all the old ICs I use
[10:35:49] <Horologium> antto, no..only thing required for usb communications is D+, D-, and GND...
[10:35:57] <Horologium> which are all in the wire.
[10:36:09] <antto> ahum
[10:36:13] <Horologium> also there is a +VUSB which is around 5V but is not guaranteed to be regulated.
[10:36:30] <Horologium> it can be anywhere from 4.25 to 5.25V...or so I've experienced.
[10:37:07] <Horologium> if you are going to power a device over usb, use a 3.3V LDO regulator.
[10:37:23] <Horologium> and don't draw more than 100mA until you get connected and on the USB bus and request more power.
[10:37:36] <antto> no, i am just tearing my hair off with this usbasp
[10:37:57] <antto> i don't know if it's the chineesness of it or the cable
[10:38:00] <Horologium> u
[10:38:02] <Horologium> umm.
[10:38:31] <antto> it worked two months ago, now it sort-of works
[10:38:35] <Horologium> usbasp uses vUSB which is a bitbanged USB and doesn't exactly conform to the USB standards..it's close...as such, it might or might not work on a particular computer.
[10:38:48] <Horologium> same computer?
[10:38:51] <antto> yes
[10:39:00] <antto> it did work 2 months ago
[10:39:04] <antto> on windows
[10:39:16] <Horologium> now, still on windows?
[10:39:47] <antto> now windows said that it cannot recognize what USB device it is
[10:39:55] <antto> so i tried under ubuntu as well
[10:40:17] <antto> turns out that if i plug it 10 times - only 1 time it actually recognizes it as USBasp
[10:40:25] <antto> it's sort of random
[10:40:27] <Horologium> any capacitors on the board?
[10:40:41] <antto> uhm, no idea, it has SMD stuff on it
[10:40:53] <antto> including the atmega
[10:41:04] <Horologium> if it were me, I would pack it up and move on to something better.
[10:41:25] <antto> any recommendations?
[10:41:46] <Horologium> Tom_itx, has a nice one he sells.
[10:42:13] <antto> url?
[10:42:42] <Horologium> looking for it.
[10:42:52] <antto> just opened my usbasp, everything is SMD except the LEDs and the resonator
[10:43:02] <antto> so yeah, it has 3 caps
[10:44:34] <Horologium> bah....not finding it...deleted logs a while back...
[10:44:43] <Horologium> hey Tom_itx ,,,,url for your programmer?
[10:45:33] <Horologium> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_User_manual_index.php
[10:45:36] <Horologium> there it is.
[10:45:49] <Horologium> http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[10:45:53] <Horologium> knew I had it somewhere.
[10:46:58] <Horologium> even does TPI and PDI so you can program xmega and the 6pin attiny chips.
[10:48:05] <antto> no idea what that means even
[10:48:26] <antto> i only need it to flash a bootloader on an atmega2561
[10:50:41] <Horologium> ISP is the normal avr for atmega and attiny chips...TPI is for the little bitty 6pin attiny chips...and PDI is for the Xmega series chips.
[10:50:52] <Horologium> that programmer handles just about any AVR out there.
[10:52:31] <Horologium> http://tom-itx.dyndns.org:81/~webpage/commerce/commerce_index.php
[10:52:34] <Horologium> purchase page.
[10:52:42] <antto> i don't think i'll ever need to deal with anything than this atmega2561
[10:53:28] <antto> oh, that ISP is 6-pin?
[10:55:24] <Horologium> yes.
[10:55:36] <Horologium> there are 2 standards...6pin and 10pin
[10:55:45] <Horologium> the 10pin just has lots of unused connections.
[10:57:11] <cart_man> Does anybody know what this error's suppose to mean ?
[10:57:12] <cart_man> PC=0x0D3C. [AVR AD CONVERTER]Reference value = 0
[10:57:20] <cart_man> Proteus Simulation error
[10:57:32] <cart_man> on an Atmega 328 with a Arduino HEX
[10:57:41] <antto> is there a more limited variant, i don't think i need TPI and DPI and such things
[10:59:12] <Horologium> cart_man, no clue....never used proteus and refuse to use anything arduino myself.
[10:59:24] <Horologium> antto, there are literally hundreds out there.
[10:59:38] <cart_man> Horologium: Thats what I said...But they demanded
[11:00:12] <Horologium> cart_man, by that I meant, I have no clue and can't help with this one.
[11:00:20] <Horologium> I recommend asking in the ardweeny channel.
[11:00:24] <cart_man> Horologium: Yeap
[11:00:41] <Horologium> but that looks like a proteus simulator error...
[11:00:57] <antto> something with 10 pins
[11:01:29] <Horologium> antto, easy enough to make a 6pin to 10pin converter.
[11:01:35] <Horologium> 4 wires.
[11:01:38] <cart_man> Horologium: Must be because I have exactly the same Simulation at work and ...works fine
[11:02:14] <antto> yes, but isn't there some cheaper variant?
[11:02:35] <Horologium> antto, hundreds.
[11:02:41] <antto> $30 for something that i'll only ever use once
[11:02:44] <Horologium> but that one I know works.
[11:02:52] <Horologium> do you have a computer with a parallel port?
[11:03:09] <antto> lemme see
[11:03:48] <antto> i got something with 9 pins
[11:03:52] <antto> it's not labeled
[11:04:30] <Horologium> parallel port...not serial port.
[11:04:36] <Horologium> 25pin dsub connector.
[11:04:51] <Horologium> http://www.qsl.net/ba1fb/avrisp.gif that is one of the simplest programmers for AVR out there....and it just works.
[11:04:57] <cart_man> Horologium: AVRlike Error reads -> Cannot find source code at address '000000D3C'. This may be because the CPU has no source window, OR because it is executing library or runtime code for which no debug data is present
[11:04:59] <Horologium> keep wires under 30cm.
[11:05:31] <antto> ah 25-pin
[11:05:49] <Horologium> cart_man, no clue where these errors are coming from...are you running this in a simulator or on the actual chip?
[11:06:04] <antto> i got, on the old PC
[11:06:07] <Horologium> antto, it's where you used to plug printers to back in the olden days before USB.
[11:06:13] <cart_man> Nope all in simulator
[11:06:15] <antto> but it has an ancient linux
[11:06:15] <Horologium> ok...then that programmer above should work for you.
[11:06:27] <Horologium> cart_man, no clue then...have never run that simulator, know nothing about it..
[11:06:35] <Horologium> antto, all you need is avrdude on that ancient linux.
[11:06:40] <Horologium> and that programmer will work.
[11:06:41] <cart_man> Horologium: Ok np thanks anyway
[11:06:43] <Horologium> all i use is linux.
[11:06:55] <antto> that could be a problem then
[11:07:06] <Horologium> and have a programmer built from that schematic that I used literally 10 years ago when I started AVR programming.
[11:07:06] <antto> it most likely doesn't have avrdude
[11:07:18] <Horologium> what flavor of linux?
[11:07:26] <antto> slackware 9.1 iirc
[11:07:30] <antto> it's from 2003
[11:07:32] * antto hides
[11:07:43] <Horologium> can you search your packages for avr ??
[11:08:01] <Horologium> I bet, if your package manager is up to date, avrdude is in there.
[11:08:18] <antto> up to date - no.. nothing is up to date on it
[11:08:24] <antto> everything is from 2003
[11:09:03] <antto> and it's probably not a "complete" install, since it's all on a less than 4GB of partition
[11:09:16] <cart_man> Full install for the time
[11:09:44] <antto> no, it wasn't a full install
[11:09:54] <antto> i skipped many things back then
[11:10:06] <antto> especially dev stuff
[11:10:26] <antto> it has gcc 3.0 or something
[11:11:03] <cart_man> Oh I see you said partition..thought actual OS size on disc
[11:11:07] <cart_man> disk
[11:11:21] <antto> the whole hard disk is 15GB on that computer
[11:11:23] <antto> ;]
[11:11:53] <Horologium> my full install of modern debian is less than that before I added all the extra programs.
[11:12:15] <Horologium> can it boot from a USB thumb drive?
[11:12:22] <antto> no
[11:12:34] <antto> i thought about that
[11:12:43] <Horologium> then put a modern live CD in it and grab avrdude in live mode.
[11:12:43] <antto> since i have this ubuntustudio on a flash stick
[11:13:03] <antto> something that would fit on a 700MB CD?
[11:13:09] <specing> Horologium: Funny, because full Gentoo fits into 500 MB
[11:13:38] <antto> it only has a cd reader, not dvd reader
[11:13:56] <antto> in fact, i don't have a dvd reader at all
[11:16:46] <Horologium> specing, I have a live debian that does too.
[11:17:31] <antto> then how do you use the serial port to program? via avrdude?
[11:17:37] <antto> i mean just that?
[11:17:54] <Horologium> you use the parallel port.
[11:17:58] <Horologium> and avrdude.
[11:18:06] <Horologium> and that schematic I linked to earlier.
[11:18:11] <antto> yeah
[11:18:21] <antto> those a 330 ohms, right?
[11:18:26] <Horologium> and, really, the resistors are not necessary.
[11:18:32] <Horologium> but, yes, 330ohm.
[11:18:37] <antto> okay then
[11:18:49] <Horologium> you will need to provide your own power for the avr..
[11:18:56] <antto> so i need to find some linux that would fit on a CD
[11:18:56] <Horologium> that programmer does not provide any power.
[11:19:03] <antto> ah
[11:19:04] <Horologium> and the programmer type is stk200
[11:19:32] <Horologium> that is the bare bones basic programmer...provides mosi, miso, reset, sck, and gnd.
[11:19:38] <antto> oh lord, i have no idea what i'm doing :/
[11:19:47] <Horologium> those you connect to the relative pins on your programmer header.
[11:21:34] <Horologium> might I suggest learning electronics first then?
[11:21:52] <Horologium> Getting Started In Electronics by Forrest M. Mims III is the best beginner electronics book ever.
[11:44:55] <antto> Horologium: i originally wanted to reprogram the damn firmware
[11:45:01] <antto> i can solder stuff
[11:45:39] <antto> but i didn't intend to have a laboratory for programing every type of AVR chip that exists
[11:46:04] <antto> this chip i have, should have a bootloader, but it doesn't
[11:46:44] <antto> i only want to put one, so that i can continue with the firmware and use the bootloader instead of programmers and whatnot
[11:47:18] <antto> i made a mistake i admit
[11:47:27] <antto> chosing this chinese usbasp
[11:47:56] <antto> but i'm not rich, so i picked the cheapest one that supported my atmega2561
[11:48:50] <antto> i wish i could borrow a programmer from someone
[11:49:36] <antto> i'm just bound to not have any luck with whatever i'm doing ;]
[12:01:24] <megal0maniac_afk> RikusW: Don't worry. I submit pull requests, abcminiuser commits. Nothing gets past him ;)
[12:04:36] <antto> https://www.olimex.com/Products/AVR/Programmers/AVR-ISP500/
[12:04:43] <antto> does this look faithful?
[12:12:36] <Horologium> why should it have a bootloader? they don't come with one from the factory.
[12:13:12] <Horologium> olimex makes good stuff generally.
[12:15:12] <RikusW> megal0maniac_afk: got the TPI patch in email ?
[12:15:32] <RikusW> I'm sure that will work
[12:15:46] <antto> Horologium: because the device has FTDI and USB, and normal users can change their firmware only via USB
[12:16:35] <RikusW> megal0maniac_afk: and how do you submit a pull, GUI client or commandline ?
[12:17:33] <antto> so i'll order this olimex programmer, it feels wrong to waste so much money for something that you'll use only once :/
[12:17:51] <antto> but if there's no other way..
[12:18:40] <Horologium> I gave you another way.
[12:18:58] <antto> Horologium: i'm open to any ideas, do tell
[12:19:08] <Horologium> you have a computer with a parallel port..boot with a linux live cd and do a quick download of avrdude and program it via the parallel port.
[12:19:47] <antto> yeah, that's not a very easy thing to do
[12:20:00] <antto> i don't have a live cd
[12:20:06] <Horologium> do you have a CD burner?
[12:20:08] <antto> but i'll see if i can do it
[12:20:09] <Horologium> and a blank CD?
[12:20:17] <antto> yes, but only for CDs, not DVDs
[12:20:31] <antto> yeah, i got 700MB empty writable CDs
[12:20:32] <Horologium> don't need a DVD.
[12:20:45] <Horologium> http://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/
[12:20:58] <Horologium> http://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/debian-live-7.0.0-i386-standard.iso
[12:21:06] <Horologium> 538 MB debian live cd.
[12:21:14] <Horologium> or you can go with a slackware one if that's your preference.
[12:21:28] <antto> the slackware is uber old
[12:21:50] <antto> i couldn't install codeblocks on it, so i bet avrdude won't work on it either
[12:22:00] <antto> nor anything ;]
[12:22:55] <antto> k, downloading this
[12:23:32] <Horologium> with the liveCD, you boot to the CD and use the system on the CD...then just open a root terminal and do "apt-get install avrdude"
[12:23:53] <Horologium> it will install avrdude on the live ramdisk,,,which goes away when you reboot..
[12:24:21] <antto> i'll need internet on it
[12:24:29] <antto> cuz my .hex is on this machine ;P~
[12:24:44] <Horologium> that's all up to you.
[12:24:49] <antto> yeah, i know
[12:24:59] <Horologium> there are ways to get the file over to the other computer....usb flash drive, floppy,
[12:25:00] <antto> btw, the hardware is very old too, i hope it works
[12:25:27] <Horologium> that's the i386 iso....it should run on anything back to a pentium with 64MB of ram I would think.
[12:25:46] <braincracker> h
[12:25:46] <Horologium> might even run on a 486 or 386 but not sure...think they dropped support for the very old processors.
[12:25:52] <antto> it's an AMD Duron 650MHz with 256MB ram ;]
[12:26:00] <Horologium> should run then.
[12:26:22] <Horologium> once linux is running live you should be able to read a flash drive.
[12:26:46] <Horologium> will need internet to install avrdude too.
[12:26:51] <antto> i hope so
[12:26:56] <braincracker> ohh, a cooling monsoon rain
[12:26:59] <Horologium> unless you download the needed packages and install them manually.
[12:27:10] <Horologium> we got a cooling rain here too...that's why I'm not out mowing.
[12:27:23] <Horologium> hard to mow a hill when it's wet.
[12:27:33] <Horologium> mower tends to slide then rip the grass out of the ground.
[12:27:44] <Horologium> churchy people don't like it when I do that to their grass.
[12:28:29] <Horologium> http://www.das-labor.org/wiki/AVR-Live-CD/en
[12:28:33] <Horologium> you might look at that antto
[12:28:41] <Horologium> everything you need for programming linux on a livecd
[12:29:21] <Horologium> 571 MB download
[12:29:25] <antto> i don't quite understand
[12:29:44] <antto> bear in mind, the fact that i have an old slackware doesn't mean that i know anything about linux ;]
[12:30:14] <Horologium> ok...forget the debian download.
[12:30:32] <Horologium> that one I just linked to is a live linux distro, runs from the CD, and is made for programming linux...has avrdude on it already!
[12:30:49] <antto> well, okay then
[12:31:23] <Horologium> it is something I considered doing years ago but never got around to..someone else beat me to it.
[12:32:28] <antto> downloading with 4mb/sec O_o that would be quick ;]
[12:34:04] <antto> done o_O
[12:34:43] <Horologium> mine will be another 20 minutes.
[12:35:14] <antto> burning this will require some physical exercise
[12:35:18] <Horologium> hmmm...hope it is 32bit.
[12:35:35] <antto> can i even burn CDs from this ubuntu?
[12:36:22] <Horologium> if you have to ask, no.
[12:37:46] <Horologium> and time to go do some work outside in the rain.
[13:07:30] <megal0maniac_afk> RikusW: I did, going to submit it later this evening. Watching a movie at the moment. I forked the entire LUFA project, made the changes, then submitted a pull request using the original as the base and mine as the head. There must be a better way of doing it, but I haven't found it..
[13:08:01] <RikusW> Seems the mkii won't work for me :/
[13:08:19] <RikusW> compiled it, lsusb sees it
[13:08:29] <RikusW> guess I'll have to test it in native windows
[13:08:44] <RikusW> my RavrProg sees a garbled serial...
[13:08:52] <RikusW> even on the original LUFA one
[13:11:17] <RikusW> megal0maniac_afk: I also had difficulty importing it in AS6... just typed make in Linux and it built :)
[13:25:58] <RikusW> megal0maniac_afk: seems sudo avrdude fixed it ;)
[13:26:09] * RikusW needs to setup the udev rules again.....
[14:51:17] <RikusW> megal0maniac_afk: seems the mkii doesn't work in virtualbox.... it does work in plain XP
[14:54:07] <RikusW> Tom_itx: http://pastebin.com/ehqdYv9F
[14:54:15] <RikusW> udev rules for Atmel programmers
[14:54:30] <RikusW> you might want to put that on your site for Linux support
[15:01:01] <inkjetunito> hmm. so that's how to make modem manager ignore things. thank you, RikusW
[15:01:12] <RikusW> :)
[15:01:24] <RikusW> mm can be VERY irritating
[15:01:29] <inkjetunito> indeed
[15:07:36] <ambro718> inkjetunito: if you like messing around with Linux networking you might want my programming language interesting, https://code.google.com/p/badvpn/wiki/NCD
[15:07:47] <ambro718> * might find
[15:08:54] <ambro718> basically you write the steps to configure stuff like network interfaces, and the language automatically takes cake of the deconfiguring (like removing routes/IP addresses after link layer goes down)
[15:12:58] <inkjetunito> ambro718: looks good
[15:14:11] <ambro718> it's really an extension of imperative programming so if some feature is missing it's most likely possible to implement it with some hacking
[15:23:40] <antto> why oh why is that linux in german :/
[15:23:50] <antto> i don't understand anything X_X
[15:24:48] <inkjetunito> ambro718: wechsel einfach die Sprache dann
[15:26:11] <ambro718> how can I figure out why my .elf binary has vfprintf inside? I don't call anything like that in my program.
[15:30:35] <antto> Horologium: halp
[15:30:49] <antto> tell me there's a way to change the language
[15:30:53] <antto> ..to english
[15:44:43] <megal0maniac> I'm back
[15:44:54] <megal0maniac> Anyone familiar with the git system?
[15:48:02] <megal0maniac> I'm trying to figure out how to keep an up-to-date copy of someone else's repo, and submit pull requests. I only seem to be able to submit pull requests if I fork the entire repo and make changes.
[15:49:47] <megal0maniac> Problem is, as soon as any changes are merged into master, then my fork is outdated and I need to start all over again, forking from the new master
[15:50:15] <ambro718> you mean github? Git doesn't know about pull requests
[15:50:30] <megal0maniac> Yeah, github
[15:52:17] <megal0maniac> Now that I want to make other changes, the only option I see is to delete and fork the whole thing again
[15:52:21] <ambro718> megal0maniac: for the repo and do you personal changes there. But when you want to send a pull request, create a new branch and somehow end up in a state where this branch is (latest_upstream)+(your commits)
[15:52:23] <megal0maniac> Because I can't commit
[15:52:27] <ambro718> * fork the repo
[15:52:45] <megal0maniac> How do I keep my branch up to date with the master?
[15:53:43] <ambro718> megal0maniac: you create a branch specifically for a pull request. If the upstream changes in a way your commits no longer apply to the upstream, pull from upstream into the branch
[15:54:02] <ambro718> (and fix the conflicts)
[15:55:04] <ambro718> when you're locally on your special branch, just "git pull upstream", I think
[15:55:25] <ambro718> or whatever the remote name for the upsteam is (check "git remove")
[15:56:09] <ambro718> megal0maniac: the important thing it that you make a specific branch for a pull request. If you just send a pull request for the primary branch, then the next thing (possibly unrelated) you commit is gonna show in the pull request and confuse people.
[15:56:49] <megal0maniac> Hmmm... I may have made that mistake already
[15:57:09] <ambro718> yeah I've made it too, which is why I'm mentioning it :D
[16:00:29] <megal0maniac> Okay, so to keep up to date with the master, you use a branch and not a fork
[16:00:57] <ambro718> megal0maniac: you have to fork it
[16:01:05] <ambro718> but then create a new branch in the fork
[16:01:28] <ambro718> if you don't create the entire repository as a fork github won't let you send pull requests
[16:01:53] <ambro718> if you're annoyed by the presense of unneeded branches resulting from the forking you can delete them
[16:03:26] <Tonelock> well, this should be interesting- I'm going to try to program some Atmega16APU I got from China
[16:03:45] <Tonelock> I am most dubious as to whether they will work or not
[16:03:55] <megal0maniac> This system doesn't seem suited to this kind of thing
[16:04:01] <megal0maniac> Tonelock: It will work
[16:04:21] <Tonelock> I have got fake transistors before
[16:04:39] <Tonelock> and this was as a "test" of a supplier
[16:07:49] <Tonelock> I bought an ISP from ebay
[16:08:04] <Tonelock> I'm going to use AVR studio
[16:08:04] <RikusW> megal0maniac: you might need to move the 12V turnon code to just before the reset low and _delay_us(1) code
[16:08:20] <RikusW> it seems there needs to be a slight delay
[16:08:28] <Tonelock> just wondering whats the minimum circuit I need to program this device?
[16:08:28] <megal0maniac> RikusW: I'm still trying to figure out stupid github :/
[16:08:34] <RikusW> heh
[16:08:42] <Tonelock> Do I need a crystal ?
[16:08:44] <RikusW> when you do, please tell me too
[16:08:52] <Tonelock> I'm not familiar with AVR
[16:08:53] <megal0maniac> Tonelock: No
[16:09:03] <RikusW> or ask abc
[16:09:30] <ambro718> I once managed to destroy an AVR by programming it while it was unpowered.
[16:10:02] <megal0maniac> It was fine initially, when I had a fork which was exactly the same as the master except for my changes
[16:10:13] <RikusW> megal0maniac: how did you upload the first headers to github ?
[16:10:32] <megal0maniac> I forked the entire repo, made the changes, submitted pull request
[16:10:49] <megal0maniac> abc fixed some stuff then merged the changes into master
[16:10:51] <RikusW> using a GUI or CLI ?
[16:11:00] <megal0maniac> GUI and web client
[16:11:13] <RikusW> so its already merged ? :)
[16:11:15] <RikusW> nice
[16:11:51] <RikusW> To keep his code clean a #define ENABLE_TPI() could be used
[16:12:20] <RikusW> basically in one of the main LUFA headers do #define ENABLE_TPI()
[16:12:30] <ambro718> megal0maniac: if you've done further changes after those that were merge you can rebase them on top of the new master
[16:12:34] <RikusW> then #undef and define again in U2S Board.h
[16:12:56] <RikusW> do{\
[16:12:57] <RikusW> code\
[16:12:57] <RikusW> }while(0)
[16:13:10] <RikusW> megal0maniac: you know about \ at the end of line right ?
[16:13:34] <megal0maniac> RikusW: It escapes the line feed?
[16:13:39] <megal0maniac> ambro718: And how the heck?
[16:13:42] <RikusW> yes, making it all one line
[16:14:06] <ambro718> megal0maniac: git rebase
[16:14:42] <RikusW> megal0maniac: the new mkii works fine now :) just not in VBox...
[16:14:56] <ambro718> megal0maniac: if successful the result will be (new upstream)+(your_extra_commits)
[16:15:18] * RikusW should really learn git sometime too...
[16:22:46] <RikusW> megal0maniac: https://sites.google.com/site/megau2s/home/extension-boards
[16:22:59] <RikusW> megal0maniac: do you still have the links to the U2S photos ?
[16:28:30] <megal0maniac> I do
[16:28:33] <megal0maniac> One sec
[16:29:37] <megal0maniac> http://i.imgur.com/F0NirGyl.jpg
[16:29:44] <megal0maniac> Remove the l for full res
[16:30:01] <megal0maniac> And if you want http://i.imgur.com/cquHJful.jpg
[16:31:23] <RikusW> If you photograph the extension boards I'll post all of it on my site :)
[16:31:40] <RikusW> Should I use your real name or nick for giving credit ?
[16:31:43] <megal0maniac> Sure :)
[16:32:06] <megal0maniac> Nick is fine. It's my #avr name :P
[16:44:17] <RikusW> megal0maniac: https://sites.google.com/site/megau2s/home/photos
[16:46:13] <megal0maniac> Awesome :)
[16:47:08] <RikusW> I'll post the extension boards too
[16:47:33] <RikusW> I think it will look best if all is the same size
[16:49:19] <megal0maniac> Cool, I'll probably take them tomorrow
[16:49:39] <megal0maniac> Don't have the camera with me now
[16:49:59] <RikusW> I'm not in a hurry :)
[16:50:21] <RikusW> what was the full resolution you used ?
[16:51:05] <RikusW> 2 189px × 3 054px
[16:51:11] <RikusW> it seems from imgur
[16:51:42] <megal0maniac> 12.3 megapixel, cropped
[16:51:57] <megal0maniac> Nikon D5000 + Nikon SB600
[17:13:38] <megal0maniac> Goodnight
[17:16:49] <inkjetunito> 3,3V or 5V?
[17:18:48] <RikusW> megal0maniac_afk: good night
[17:19:21] <RikusW> inkjetunito: ?
[17:20:50] <inkjetunito> RikusW: i have the freedom to choose between the two supply voltages.
[17:21:20] <RikusW> my board got a jumper for that too
[17:21:36] <RikusW> Some AVRs go down to 2.7V even
[17:22:13] <inkjetunito> even down to 1.8V
[22:45:17] <tzanger> hm, atmega16 is one of the cheaper solutions with CAN
[22:45:32] <tzanger> I can get an 8051 from silabs for cheaper, but 8051 programming is shit
[22:49:35] <tzanger> hm, LPC11C2 gives me ARM and builtin CAN PHY
[23:19:54] <annath> Hey all, I've got a weird issue I'm trying to work out and I'm kind of at a dead end. I've got three boards that are the same schematic. They're all three running the same code with the same fuse byte settings.
[23:19:57] <annath> There is only one identifiable hardware difference, and that is that there is an unpopulated resistor that is part of a voltage monitoring circuit, but it's not connected to the serial at all and it's not being used at the moment anyway.
[23:20:01] <annath> Does anyone have any ideas why the serial might work on one chip and not on the other?
[23:20:27] <annath> arg, sorry, left out the problem: Two of them just print gibberish on the serial line
[23:20:31] <annath> and one works perfectly
[23:22:16] <Casper> do you use a crystal?
[23:22:52] <annath> nope, internal oscillator with ckdiv8 enabled
[23:23:02] <Casper> then wonder no more
[23:23:11] <Casper> it can be off by more than 10%
[23:23:48] <annath> damn, I hadn't even thought about that, that's a good point. Isn't there a way to tune them?
[23:23:54] <Casper> yes
[23:24:21] <Casper> there is a way to calibrate it, look it up in the datasheet... never done it, you should really use a crystal for serial communication
[23:24:55] <Casper> 14.7456 Mhz or 18.432 Mhz are ideal frequency
[23:25:09] <Casper> 16 and 20 are acceptable
[23:25:10] <annath> unforunately I don't really have control over the hardware design - I'm the software guy on the team. :P Thanks for the direction anyway! I'll check out the datasheet and do some googling
[23:25:13] <Casper> http://www.wormfood.net/avrbaudcalc.php