#avr | Logs for 2012-08-04

Back
[00:45:29] <Sefid_Par> Is this program clear of syntax error? It is going to make a 3phase square wave.
[00:45:55] <Sefid_Par> http://www.heypasteit.com/clip/0FEP
[00:46:20] <Casper> Sefid_Par: why don't you compile it?
[00:46:27] <Casper> that will tell you if the syntax is ok
[00:47:14] * Casper woulds have used timers...
[00:51:55] <Sefid_Par> Casper: Thanks. Going to compile. I like to try timers instead. But I should read some documents first.
[03:10:28] <megal0maniac> dreamer: ping
[03:30:26] <dreamer> megal0maniac: pong?
[03:30:40] <megal0maniac> Did you come right with that port?
[03:30:43] <dreamer> nope
[03:31:01] <dreamer> just my diff and no result
[03:31:23] <dreamer> don't have the chip here either, so can't test. I'm going to a hackercamp next week. so hopefully someone there can help me :P
[03:31:32] <dreamer> (should be plenty of hardware hackers there)
[03:32:46] <megal0maniac> hackercamp?
[03:32:48] * megal0maniac sighs
[03:33:04] <smeding> there are too many of them
[03:33:05] <megal0maniac> Nothing like that within 1000km of here :)
[03:33:20] <smeding> they are also not ideally distributed :p
[03:33:36] <megal0maniac> (I live in deepest, darkest Africa)
[03:34:16] <megal0maniac> But not really...
[03:35:06] <megal0maniac> I was curious because I was trying to get a similar thing working. Struggled to get hardware UART working on a 32u4
[03:38:00] <specing> lol molavy was here again
[03:38:15] <specing> asking for spoon feeeding ofcourse
[03:42:30] <specing> megal0maniac: near rikusW?
[03:43:07] <megal0maniac> Recognize the alias, but not exactly a regular around here :)
[03:43:29] <megal0maniac> So I don't know
[04:00:47] <megal0maniac> specing: what was he looking for?
[04:00:58] * megal0maniac is genuinely curious
[04:03:12] <specing> molavy?
[04:03:18] <megal0maniac> Yes
[04:04:01] <specing> < molavy> can give me a step by step tutorial
[04:04:25] <specing> < molavy> how can i send .hex file to at91sam7x25
[04:04:48] <megal0maniac> "give me a step by step tutorial"
[04:04:52] <megal0maniac> XD
[04:05:07] <megal0maniac> oh dear
[04:06:11] <specing> He would be booted off ##c in less than 3s for saying that
[04:08:24] <megal0maniac> What is an "at91sam7x25" anyway?
[04:08:39] <specing> Sounds like some sort of an ARM
[04:08:50] <specing> by Atmel
[04:09:29] <megal0maniac> Ah... It's an at91sam7x256
[04:10:02] <specing> I have a sam926 with linux :P
[04:10:47] <specing> And it wasn't hard to flash >_>
[04:38:18] <megal0maniac> I find it difficult to understand how someone who can't flash a chip, is dealing with that kind of hardware. I don't really foresee much code being written.
[04:38:28] <megal0maniac> Or maybe I'm just jealous
[04:38:52] <megal0maniac> And have spent the last 3 hours spoon feeding and fixing other peoples' mistakes
[04:39:03] <specing> hehe
[04:42:10] <megal0maniac> I pretty much have a bunch of atmega328p based boards and chips as well as 4 attiny85s. Want to move to something more powerful and with more memory. Preferably still 8bit. Any suggestions? Or is 32bit not that big of a jump?
[04:44:21] <megal0maniac> Or 16bit xmega?
[04:51:11] <grummund> Don't believe the hype, xmega is 8-bit.
[04:51:42] <megal0maniac> Atmel says 8/16. But I do know that they're generally 8bit :)
[04:51:55] <grummund> marketing spin
[04:52:03] <megal0maniac> Oh yeah?
[04:53:31] <megal0maniac> Ooh!
[04:53:36] <megal0maniac> ATmega1284
[04:53:51] <megal0maniac> And it comes in DIP. I love DIP
[04:54:08] <OndraSter> but
[04:54:10] <OndraSter> 40 pins?
[04:54:13] <OndraSter> that is really few IOs
[04:54:30] <megal0maniac> More than the 328, which is what I'm trying to upgrade from
[04:54:37] <megal0maniac> I'm still just experimenting
[04:55:05] <grummund> megal0maniac: 644p
[04:56:11] <OndraSter> 644p is nearly the same price as 1284p
[04:59:14] <megal0maniac> And the 1284p has double the flash and far more sram. If I'm going to upgrade, I'd rather make one giant step
[04:59:47] <grummund> well ok, but how much ram/flash do you need?
[05:00:13] <grummund> there's not much you're going to do with 1284p than either 644/324p couldn't handle
[05:00:33] <megal0maniac> Just experimenting. Main thing I'd like is more flash and more eeprom
[05:01:13] <grummund> well ok, but how much *do* you need?
[05:01:51] <grummund> i mean, maybe 1284p is too small still...
[05:03:29] <megal0maniac> I basically just want room for expansion. Might not need it for a while, but want to investigate my options for when I begin exceeding 32kb
[05:03:52] <megal0maniac> Which has happened with Arduino, since it can be rather bloated
[05:04:00] <megal0maniac> Not yet with C
[05:13:36] <grummund> >64kb is a huge amount of code, generally only happens if you have lots of strings or embedded data e.g. menu structure
[05:13:40] <specing> megal0maniac: How much did you fill it with C?
[05:13:48] <specing> I haven't gotten over 1kb yet ;P
[05:15:41] <OndraSter> I've gotten over 3kB with ASM (without any data or maps or structures or anything!) and over 16kB in C :D
[05:16:06] <OndraSter> but hey, now that thre is C++...
[05:16:11] <OndraSter> the sizes grows VERY fast :D
[05:16:15] <OndraSter> there-
[05:17:08] <specing> C++ is fine if you limit yourself to template functions
[05:17:47] <megal0maniac> Arduino libraries fill it up quickly. Blink LED was something like 4x the size in Arduino. If nothing else, 2 UARTS would be really nice
[05:18:02] <specing> megal0maniac: bitbang ;P
[05:18:27] <megal0maniac> You're speaking to someone who is in limbo between Arduino and C :P
[05:18:44] <grummund> megal0maniac: that's why i suggested 644p (the old 644 only had one uart)
[05:19:02] <specing> Arduino is fine if you just want to get things done fast
[05:19:17] <grummund> xmega has like 8, crazy.
[05:19:47] <dfletcher> tip of the day: never forget the important difference between switching and toggling http://www.anyclip.com/movies/mystery-men/Q4Z14ttmYhYu2/#!quotes/
[05:19:48] <specing> If you want to reinvent everything (like me), then you use C
[05:19:52] <megal0maniac> grummund: hopefully the 644p is easier to get my hands on than the 1284p :P
[05:20:07] <megal0maniac> 8 is too much
[05:20:13] <grummund> hey dfletcher
[05:20:17] <dfletcher> hey gr
[05:20:21] <dfletcher> grummund :)
[05:20:38] <grummund> how goes things with you?
[05:21:04] <dfletcher> not bad. been working on some home automation equipment with a friend lately, that's been fun. what you up to these days?"
[05:21:36] <grummund> not much. looking for a new project (and work)
[05:21:52] <dfletcher> yeah for money I sling PHP. yay.
[05:21:54] * grummund haven't done much with avr recently
[05:22:47] <dfletcher> yeah seen you in ##stm32 wondering if you'd left us ;)
[05:22:52] <grummund> i still have some bumbleb here ;)
[05:22:52] * dfletcher spies in there
[05:22:58] <OndraSter> grummund, 7 UARTs :)
[05:23:00] <OndraSter> 5 SPIs
[05:23:02] <dfletcher> hah nice. yeah I still use em
[05:23:06] <OndraSter> and each UART can work as SPI :P
[05:23:08] <grummund> turned one into an xmega programmer
[05:23:14] <dfletcher> yeah programmer
[05:23:19] <dfletcher> the LUFA project is super handy
[05:23:22] <OndraSter> (except that half of the UARTs is on the SPI pins)
[05:23:31] <grummund> dfletcher: http://i52.tinypic.com/2u4n5i0.jpg
[05:23:37] <OndraSter> <specing> If you want to reinvent everything (like me), then you use C
[05:23:40] <OndraSter> I WANT TO REINVENT C!
[05:24:01] <dfletcher> ehrmahgherd you HOT GLUED it!!!!111oneoneone
[05:24:06] <OndraSter> lol
[05:24:09] <OndraSter> what's wrong on that
[05:24:26] <megal0maniac> Troubleshooting :P
[05:24:33] <megal0maniac> (Or the lack thereof
[05:24:34] <megal0maniac> )
[05:24:39] <dfletcher> no it just covers up my lovely soldering work ;)
[05:24:58] <specing> looks like an octopus
[05:25:39] <grummund> gotta be one of the smallest AVR programmers around i think ;)
[05:26:13] <megal0maniac> What is it?
[05:26:42] <grummund> bumbleb
[05:27:43] <grummund> hot glue ftw :p
[05:29:07] <Steffanx> Every engineer should have that .. and duct tape ofcourse grummund :)
[05:29:33] <dfletcher> megal0maniac, btw that board is no longer produced I can't afford it. was a nice hobby when I had lots of money a few years ago :) Tom_itx makes a similar board and they're both pretty similar to Teensy.
[05:33:09] <Steffanx> The good old 100 bumbleb's in 10 days? :)
[05:34:05] <dfletcher> haha. even with selling all those (and they did, pretty quick) the profit margin is so small it's not sustainable.
[05:35:00] <grummund> heh. they were too cheap
[05:35:17] <grummund> but the market is gone now i reckon
[05:35:39] <Steffanx> The PS3 hack hype is over :P
[05:36:46] <megal0maniac> dfletcher: I guessed as much, having seen "It Works!" on your website :P
[05:36:55] <dfletcher> haha
[05:37:11] <specing> GCC generates crapcode again
[05:37:30] <Steffanx> specing makes GCC generate crapcode again
[05:37:31] <dfletcher> whoa I didn't know that domain was even valid still. huh.
[05:37:34] <megal0maniac> What is the one that Tom_itx makes called?
[05:37:50] <Steffanx> dfletcher, someone else took it
[05:37:56] <dfletcher> oh
[05:37:58] <grummund> megal0maniac: url in the /topic
[05:38:40] <megal0maniac> Ah, got it :)
[05:38:43] <dfletcher> http://tom-itx.dyndns.org:81/~webpage/boards/USB_Breakout/USB_Breakout_index.php
[05:38:47] <dfletcher> heh I'm slow
[05:38:53] <dfletcher> it's 3:30am sorry :)
[05:40:13] <megal0maniac> On a side note: 4MHz ISP Rescue Clock (for mis-set fuses)
[05:40:22] <megal0maniac> This is interesting
[05:40:34] <megal0maniac> Thought you needed +12V for mis-set fuses
[05:40:56] <megal0maniac> (http://tom-itx.dyndns.org:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php)
[05:41:07] <grummund> depends which fuses you mis-set :p
[05:41:27] <megal0maniac> So that's just for if you set the clock to 128KHZ?
[05:41:58] <megal0maniac> (Which also confuses me, because general rule says 32KHZ ISP freq.)
[05:42:07] <specing> b8: ff 92 push r15
[05:42:08] <specing> ba: f8 2e mov r15, r24
[05:42:08] <specing> W4B (b >> 4);
[05:42:08] <specing> bc: 82 95 swap r24
[05:42:08] <specing> be: 8f 70 andi r24, 0x0F ; 15
[05:42:10] <specing> c0: e8 df rcall .-48 ; 0x92 <W4B>
[05:42:12] <specing> W4B (b);
[05:42:15] <specing> c2: 8f 2d mov r24, r15
[05:42:17] <specing> c4: e6 df rcall .-52 ; 0x92 <W4B>
[05:42:23] <specing> All it needs is 2 swaps and 2 rcalls -.-
[05:43:02] <specing> just dunno how to tell GCC that the called function does not modify its paramteres
[05:45:22] <grummund> const
[05:52:07] <specing> grummund: yes but the func (byte b) implies that the b is passed as a copy
[05:53:39] <specing> If I do func (byte b) const {...} it spews out "error: expected identifier or '(' before '{' token"
[05:54:14] <dfletcher> func(const byte b)
[05:54:32] <specing> If I do func (const byte b) {} it ignores it
[05:55:07] <specing> and still generates a lot of code
[05:55:25] <dfletcher> with -Os ?
[05:55:32] <specing> with -O2
[05:55:40] <dfletcher> well, thar's your prob.
[05:55:43] <specing> this is irrelevant to optimization
[05:55:51] <dfletcher> you sure? try it.
[05:56:07] <specing> the compiler *thinks* that I modify it in the called func
[05:56:21] <specing> 12:42 < specing> I would like to end up with "swap r, rcall func, swap r, rcall func" (AVR assembly)
[05:56:24] <specing> 12:44 < specing> Currently it generates "push r15; mov r15, r24; swap r24; andi r24, 0x0F; rcall func; mov r24, r15; rcall func"
[05:56:40] <specing> 2nd is neither fast nor compact
[05:56:55] <grummund> specing: can you pastebin the c code?
[05:56:57] <Steffanx> Where (b >>4 ) = swap ?
[05:58:14] <specing> static void W8B (byte b) { W4B (b >> 4); W4B (b); _delay_ms(2); }
[06:00:43] <grummund> specing: the problem is gcc does not know that W4b() will ignore the high 4 bits
[06:00:50] <specing> indeed
[06:01:01] <specing> Im asking how to tell it
[06:01:20] <grummund> what is W4B() ?
[06:01:23] <specing> W4B is a giant blob of assembly so it can't know that
[06:01:31] <specing> But I know it
[06:03:02] <Steffanx> They still have to invent the compiler that can read your mind specing
[06:03:38] <specing> :/
[06:03:40] <grummund> there's nothing in the C language for that, only change is if gcc offers and __atribute for that but i doubt it
[06:03:50] <grummund> *chance
[06:04:08] <specing> now Im trying to figure out how to pass a function address to inline asm
[06:05:51] <OndraSter_> specing, write it all in asm
[06:05:53] <OndraSter_> :)
[06:05:54] <grummund> why don't you just code W8B() in asm
[06:05:57] <OndraSter_> ;D
[06:06:08] <OndraSter_> RCALL W4B
[06:06:12] <OndraSter_> SWAP R24
[06:06:14] <OndraSter_> RCALL W4B
[06:06:16] <OndraSter_> done
[06:07:11] <specing> OndraSter_: Tell me of an assemler that has a register allocator, assembly block instantiation, and conditional assembly generation
[06:07:26] <OndraSter_> your mind?
[06:07:29] <OndraSter_> :P
[06:07:41] <specing> I can tell you one
[06:07:42] <OndraSter_> for W8B() you wanted it is like 4 or 5 lines of code
[06:07:47] <specing> GCC inline assembler.
[06:08:18] <OndraSter_> you don't need it :)
[06:08:22] <OndraSter_> the registers are given
[06:08:27] <OndraSter_> and you don't need any extra
[06:08:43] <Steffanx> Time to get your old 286 back.. you don't need more OndraSter_
[06:08:53] <OndraSter_> how does that relate? :)
[06:09:13] <Steffanx> "you don't need it :)"
[06:09:16] <OndraSter_> for W8B you do just call - swap - call
[06:09:22] <OndraSter_> you don't need extra registers
[06:09:43] <Steffanx> You administrator joined OndraSter_
[06:09:47] <Steffanx> *your
[06:09:48] <OndraSter_> I know
[06:09:58] <OndraSter_> bloody xchat refuses to remember the nickname
[06:10:59] <OndraSter_> test..
[06:11:15] <OndraSter_> finally!
[06:12:11] <specing> I found out how to do it
[06:12:30] <specing> static void W4B (byte b) asm ("W4B");
[06:12:35] <specing> .. rcall W4B
[06:13:08] <specing> Im going to optimize the fuck out of this HD44780 code ;P
[06:13:25] <OndraSter_> and where is W4B in asm? :P
[06:14:17] <specing> W4B is instantiated from 4 blocks of identical assembly macros
[06:14:30] <specing> and some sbi/cbi around it
[06:15:05] <specing> Hehe
[06:15:19] <specing> Now I shall optimize the init sequence
[06:15:26] <specing> this is going to be a tough one
[06:16:42] <OndraSter_> my mix of C and ASM... I did DRAM controller for MEGA in asm that can be called from C code :P
[06:17:26] <specing> Yeah but that is static asm code, it cannot be instantiated to fit specific needs
[06:17:31] <grummund> specing: did you try this? - static void W8B (const byte b) { ... }
[06:17:39] <specing> grummund: yeap
[06:17:44] <grummund> and?
[06:17:59] <specing> 12:47 < specing> If I do func (const byte b) {} it ignores it
[06:18:02] <specing> 12:48 < specing> and still generates a lot of code
[06:18:51] <grummund> oops sorry, i mean static void W4B (const byte b) { ... }
[06:19:33] <specing> I tried with both
[06:19:36] <specing> nothing
[06:20:41] <grummund> static void W4B (const byte b) should save one mov instrauction
[06:20:47] <specing> it doesen't
[06:21:04] <specing> And even if it did it would still be too much code
[06:21:23] <specing> Anyway I posted this on #gcc, maybe they come up with some obscure __attribute__
[06:21:48] <grummund> specing: if you could share the code i might try
[06:22:07] <specing> Ok
[06:23:18] <specing> http://codepad.org/donWXZCU
[06:23:56] <grummund> which avr?
[06:24:40] <specing> t2313
[06:50:05] <specing> OH MY
[06:50:12] <specing> MY STS/LDS ALARM WENT OFF
[06:51:03] * megal0maniac googles STS/LDS
[07:16:19] * megal0maniac wants Atmel Sample Centre to cater for students
[07:44:22] <OndraSter_> btw that display that is perfect for reflow oven:
[07:44:22] <OndraSter_> http://clip2net.com/s/2b183
[07:44:32] <OndraSter_> http://clip2net.com/s/2b18f
[07:44:40] <OndraSter_> http://clip2net.com/s/2b18l
[07:44:47] <OndraSter_> http://clip2net.com/s/2b18q
[07:44:59] <OndraSter_> http://clip2net.com/s/2b18y
[07:45:01] <Steffanx> looks nice
[07:45:09] <Steffanx> but you need your big ass dispaly for your oven :)
[07:45:15] <OndraSter_> :D
[07:45:54] <OndraSter_> what bogs me is that this is 5x9 segments
[07:46:07] <OndraSter_> so one can not use one 8bit constant current shift register :(
[07:49:06] <OndraSter_> also RED LED shines more at the same current :(
[07:49:11] <OndraSter_> than green ones
[08:11:21] <specing> Hehe my LCD lib is only 66 bytes :P
[08:22:40] <OndraSter_> congrats
[08:36:04] <tomatto> what can i use instead of prog_char ?
[08:36:11] <tomatto> when it is deprecated/
[08:36:12] <tomatto> ?
[08:36:27] <specing> PROGMEM
[08:38:33] <tomatto> thx
[08:42:04] <tomatto> what can i do with this? /tmp/cci1Wt34.s:929: Error: symbol `label' is already defined
[08:42:15] <tomatto> that file is not exist
[08:42:57] <Steffanx> The file is in /tmp/ for a reason :)
[08:43:09] * specing slaps tomatto around with the 10kg GCC manual
[08:45:53] <tomatto> but how can i trace/follow this error?
[08:46:17] <specing> grep label *.c
[08:46:44] <tomatto> asm("label: dec %0\n brne label" : : "r" (t) : "cc");
[08:46:58] <specing> well there you go
[08:46:58] <OndraSter_> isn't label "registered" word?
[08:47:06] <OndraSter_> or aren't you using it on more occasions?
[08:47:16] <tomatto> only there
[08:47:23] <OndraSter_> use something else
[08:47:29] <OndraSter_> like waitlabel
[08:48:09] <specing> Why is "cc" in clobber list?
[08:48:25] <tomatto> OndraSter_: same error
[08:50:18] <tomatto> specing: i don't know
[08:51:49] <specing> You don't know?
[08:51:58] <specing> It is your code dude -.-
[08:52:33] <tomatto> it is not. i am trying to compile code of someone else :(
[08:58:39] <izua_> how do you get gcc to remove dead code?
[08:58:55] <tomatto> specing: do you know something about this code?
[08:58:57] <specing> #define dead code
[08:59:03] <izua_> i'm having a small debug routine outside main()
[08:59:08] <specing> tomatto: No, Im not a mind reader
[08:59:12] <izua_> like main() {/* everything else */ test(); }
[08:59:22] <izua_> and it seems to put /* everything else */ in too, although it's never used
[08:59:36] <specing> izua_: #define DEBUG #ifdev DEBUG #endif
[08:59:42] <izua_> no, not like that
[09:00:06] <izua_> lol
[09:00:13] <specing> Do you have optimizations on?
[09:00:24] <izua_> yeah, i tried O2 and Os
[09:00:42] <specing> Are you exporting this function to other .c files?
[09:01:12] <izua_> nope
[09:01:31] <izua_> but other functions are imported from other .c files
[09:02:00] <tomatto> specing: this is whole wait function http://pastebin.com/RNq2WfAG
[09:03:15] <specing> tomatto: delete it, #include <util/delay.h> _delay_us(num);
[09:06:01] <specing> I hate it when there is code duplication
[09:06:14] <specing> Unless the code being duplicated sucks
[09:08:10] <tomatto> maybe it is because of decrease code size
[09:09:58] <tomatto> i have now region `text' overflowed by 744 bytes
[09:10:43] <specing> 0.o
[09:11:39] <specing> what happens when you do asm volatile ("1: dec %0 \n\t brne 1b\n\t"?
[09:12:59] <tomatto> i have no idea, i recognized dec and brne command but syntax is not too much familiar to me
[09:14:06] <specing> COMPILE IT!
[09:14:48] <tomatto> ) is missing
[09:17:20] <specing> false
[09:17:45] <specing> : : "r" (t) ); is missing
[09:18:11] <tomatto> Error: bad expression
[09:18:19] <tomatto> Error: garbage at end of line
[09:18:23] <tomatto> is errors
[09:20:24] <tomatto> specing: so : "cc" isn't needed?
[09:20:37] <specing> I have no idea what "cc" does
[09:20:42] <specing> it is not a register
[09:21:31] <tomatto> so i must use number instead of text label?
[09:22:22] <specing> you can use whatever
[09:23:21] <tomatto> label produce that error what i pasted before
[09:24:06] <tomatto> and others text
[09:39:42] <tomatto> could this be a problem why usb doesn't work? warning: 'usbFunctionDescriptor' used but never defined [enabled by default]
[09:47:50] <OndraSter> yes
[09:56:57] <specing> #if (PORTB) == (PORTB
[09:57:05] <specing> error: operator '*' has no left operand
[09:57:22] <specing> GCC is making it difficult...
[09:59:12] <tomatto> what is this for?
[09:59:45] <specing> my HD44780 library
[10:00:23] <tomatto> oh..it continue
[10:01:58] <tomatto> would be weird #if (PORTB) == (PORTB)
[10:02:32] <specing> This is just a testcase to illustrate the problem, tomatto
[10:02:47] <specing> #if HD44780_D0_PORT == HD44780_D1_PORT is the real thing
[10:02:54] <tomatto> what problem?
[10:03:02] <specing> 16:49 < specing> error: operator '*' has no left operand
[10:03:24] <tomatto> interesting
[10:04:22] <specing> #define _SFR_IO8(io_addr) ((io_addr) + __SFR_OFFSET)
[10:04:35] <specing> #define PORTB _SFR_IO8(0x18)
[10:04:49] <specing> #define __SFR_OFFSET 0x0
[10:04:49] <tomatto> offset is missing for it?
[10:05:18] <specing> Now where is the '*'?
[10:05:58] <tomatto> addr 0x18?
[10:09:48] <specing> Nevermind I found a post from Joers Wunsch saying it is not possible
[10:52:28] <R2COM> so are there Atmel chip users as well
[10:52:30] <R2COM> ?
[10:53:00] <Tom_itx> mostly abusers
[10:53:58] <R2COM> I'm just thinking to try out atmels, was wondering which debugger-programmer is it better to use for most of those chips
[10:54:12] <R2COM> i found the SAM-ICE
[10:54:45] <Tom_itx> mine of course
[10:54:50] <smeding> 'atmels' is vague
[10:55:02] <smeding> Atmel is a company that makes many chips
[10:55:23] <smeding> do you mean their 8-bit AVR, their 32-bit AVR, their ARM cores, maybe some other crud they make
[10:55:27] <R2COM> well
[10:55:34] <R2COM> I'm looking into SAM3/4 chips for now
[10:55:39] <Tom_itx> this channel is devoted to their 8 bit ones
[10:55:40] <R2COM> and probably SAM7/9
[10:55:44] <R2COM> oh ok
[10:55:46] <smeding> that sounds like ARM
[10:55:54] <R2COM> its just for some reason theres almost noone on atmel channel
[10:55:54] <Tom_itx> ##avr32 maybe
[10:55:55] <R2COM> yes arm
[10:55:59] <R2COM> oh
[10:56:06] <Tom_itx> or #edev maybe
[10:56:12] <smeding> avr32 is different though
[10:56:26] <smeding> but they are similar to most other ARMs -- i think they program / debug over JTAG
[10:56:30] <R2COM> what you mean its different? well yeah different from atmel SAM right
[10:56:32] <smeding> so get some jtag dongle
[10:57:28] <R2COM> well just not sure yet about compatibility
[10:57:41] <R2COM> currently I'm looking at this one: http://www.atmel.com/tools/ATMELSAM-ICE.aspx?tab=devices
[10:58:35] <R2COM> so if you look, you can see its supported devices, most of what i need actually. so I was just thinking if there is a better alternative to this debugger, or maybe this one is a way to go
[12:51:02] <age> hi. could I have possibly fried an attiny so that it would be programmable, but I/O ports would not function?
[12:51:56] <grummund> possible, but unlikely.
[12:56:27] <age> hmm, shouldn't "DDRB = _BV(PB3); PORTB = _BV(PB3); while (1) _NOP ();" set PB3 up then?
[13:01:20] <CoolBear> age: It can happen, I have fried outputs of a mega48, it would program, but the fried outputs didn't work. (Incredible what 10v can do)
[13:01:31] <OndraSter_> lol 10V
[13:01:59] <CoolBear> Inductor kickback is a bitch...
[13:02:01] <OndraSter_> aren't there (Except RESET pin) actually clamping diodes?
[13:02:44] <CoolBear> Yes, but they don't take much current before they blow.
[13:02:58] <age> alright, will try replacing it
[13:13:08] <konsgn> anyone here have a teensy2.0 on them by any chance?
[13:36:01] <age> I've replaced the attiny, no effect :|
[13:42:57] <specing> then you have lolcode
[13:43:25] <specing> or... FUSES!
[13:43:38] <specing> meh idk what could be wrong in fuses...
[13:43:48] <specing> Maybe you connected the LED wrong ;P
[13:43:54] <specing> Thats probably it
[13:44:09] <age> specing, I tried a few pins with multimeter
[13:44:26] <age> also, it *did* work a few days back
[13:44:32] <age> I just don't know what I did
[13:47:00] <age> fuck.
[13:47:06] <specing> Have you scoped the crystal?
[13:47:23] <age> why the hell would brownout detection break things!?
[13:47:29] <age> whyyyy :<
[13:47:52] <age> I just disabled it in the fuses and stuff works
[13:48:08] <specing> Is the voltage above 4.5V?
[13:48:17] <specing> Is it __STABLE__?
[13:48:20] <age> it was configured for 4.3v, and the tiny is powered with l7805
[13:48:34] <age> I think so, it comes from a printer supply
[13:48:40] <specing> LOL
[13:48:47] <age> what?
[13:48:51] <specing> Why aren't you powering it from USB...
[13:49:08] <age> because it's supposed to be mounted in a garage
[13:49:09] <specing> I power everything through my programmer...
[13:49:17] <specing> ah
[13:49:31] <age> I already have a pcb with everything
[13:49:45] <age> there is one strange thing
[13:50:04] <age> my multimeter shows 50 Hz frequency on GND
[13:50:41] <age> could it be the psu?
[13:52:59] <age> I should probably ask that in #electronics
[13:56:46] <specing> obtain_scope();
[13:56:47] <specing> :)
[13:57:37] <age> :<
[13:57:45] <age> that's a TODO
[14:41:49] <grummund> age: if it's showing 50Hz switch to AC volts and measure how much
[14:54:05] <age> grummund, I'm pretty sure it's DC since the attiny works on it
[14:58:16] <grummund> age: there may be an ac component on top of the dc
[14:59:26] <grummund> that could cause the brown out detect, btw.
[15:27:18] <age> that's what worries me.
[15:27:46] <age> but then, it works okay
[15:31:05] <OndraSter_> use a scope :)
[15:35:06] <age> don't have one :|
[15:37:10] <darsie> age: idk if it helps, but I use a piezo speaker instead of a scope.
[15:38:50] <age> I might
[15:39:16] <age> no point though, I'm pretty sure there's an ac component and there's nothing I can do about it
[15:45:01] <OndraSter_> capacitor?
[15:50:22] <age> hmm.
[15:50:32] <age> the psu has plenty
[15:50:56] <OndraSter_> do you have there the 100nF at the vcc?
[15:51:00] <OndraSter_> RIGHT at the vcc
[15:51:01] <OndraSter_> ?
[15:51:04] <smeding> do you have bypass caps
[15:51:05] <smeding> at all
[15:51:07] <age> nope :D
[15:51:10] <smeding> do that
[15:51:10] <OndraSter_> ...
[15:51:22] <age> hey, *it works*
[15:51:37] <smeding> 100nF between microcontroller vcc and microcontroller gcc
[15:51:45] <age> gcc D:
[15:51:47] <smeding> paths as short as possible, within reason
[15:51:50] <smeding> gnd
[15:52:00] <age> okay
[15:52:00] <smeding> i'm a little tired :p
[16:30:10] <OndraSter_> omg atmel studio can't be closed AGAIN
[16:30:14] <OndraSter_> and if it finally closes
[16:30:19] <OndraSter_> the dragon doesn't work
[16:30:20] <OndraSter_> TILL I REBOOT
[16:30:21] <OndraSter_> arrgh
[16:31:02] <specing> thats what you get for using windoze
[16:32:12] <OndraSter_> heh
[16:32:18] <OndraSter_> because on linux it can't happen
[16:32:22] <OndraSter_> BECAUSE THERE IS NO ATMEL STUDIO!
[16:32:24] <OndraSter_> for lindoze
[16:37:41] <Kevin`> OndraSter_: there is, however, full avr dragon support in the linux utilities =p
[16:37:44] <specing> OndraSter_: Who would want to run it anyway? vim + avr-gcc + avrdude rulez
[16:40:03] <OndraSter_> <specing> OndraSter_: Who would want to run it anyway? vim + avr-gcc + avrdude rulez
[16:40:06] <OndraSter_> sounds like poor man's speak really :D
[16:40:15] <OndraSter_> because VIM is just awful
[16:40:38] <specing> VIM IS THE MOST AWESOME EDITOR OUT THERE
[16:41:07] <Kevin`> vim is very powerful if you know how to use it. it has almost the worst new-user experience of any editor though
[16:41:11] <Kevin`> (ed is worse)
[16:41:38] <specing> Onve you get the hang of vim though...
[16:41:43] <smeding> vim is nice
[16:41:48] <smeding> i say that as a casual user
[16:42:03] <specing> smeding: do you have code folding enabled?
[16:42:04] <specing> :P
[16:42:06] <smeding> no
[16:42:15] <smeding> i have syntax highlighting
[16:42:16] <specing> I have, it rocks ;D
[16:42:28] <specing> :set foldmethod=syntax
[16:42:29] <smeding> the most complex thing i do is regex search/replace
[16:42:34] <specing> :set foldnestmax=1
[16:42:41] <smeding> code folding might be useful, i guess
[16:42:56] <specing> and then just 'za' everywhere
[16:43:05] <age> emacs!
[16:43:36] <age> but I was using sublime text lately :p
[16:43:59] <specing> indent folding method would be nicer if I figured out how to use it ;P
[18:30:19] <papo> hello
[18:32:24] <papo> I am currently working with the attiny85. I have a 32k crystal hooked up to XTAL1/XTAL2 and the fuses are properly set such that this would be used. Furthermore, I am using the divider and the timers such that an ISR is called every second. Now I was wondering whether I could use the crystal for the timer but the internal RC for computations and I/O to pins. Having studied the datasheet, I don't think this can be done but I want to be sure on t
[18:32:24] <papo> hat one
[18:35:51] * specing opens up the dshit
[18:38:26] <Kevin`> having not studied the datasheet, i'm not sure, but that IS possible on several chips. it's configured as part of a timer peripheral usually
[18:38:43] <OndraSter_> T0 input works only for squarewave probably
[18:38:52] <OndraSter_> on bigger chips you can use the 32k xtal directly on timer
[18:39:02] <OndraSter_> but I should check the datasheet
[18:41:37] <papo> hehe
[18:42:09] <papo> OndraSter_: just to clarify, I can use the 32k crystal directly on the timer but I want to have some other stuff running off a different clock source (that is the internal one)
[18:42:09] <specing> papo: doesen't look like it
[18:42:53] <specing> papo: yeah we get it, you want the PPLed 8MHz intosc for the core and 32K for the timekeeping
[18:43:16] <OndraSter_> well, on my tiny13a I am using the internal timer (running off internal RC oscillator 4.8MHz scaled down to 1.2MHz) for display refreshing (LEDs) and watchdog for user stuff :)
[18:43:22] <OndraSter_> (from 16ms to 8s timeouts are lovely)
[18:43:42] <papo> or maybe I am doing it all wrong... this is basically a LED binary watch project and the crystal is one of these watch crystal. I am outputting the LED pattern to two chained shift registers. This all works nicely and everything but the crystal imposes some limits, for example I can hardly multiplex the LEDs and some pulsing with (software) PWM would be nice too
[18:44:06] <papo> OndraSter_: oh nice that's exactly what I am trying to do
[18:44:19] <Kevin`> papo: how many of these devices are you building?
[18:44:50] <papo> Kevin`: half a dozen to a dozen, basically for gifts and the like. It's a hobby thing really
[18:45:15] <Kevin`> papo: IMO just pick a different chip that explicitly supports using the timer with an external crystal
[18:46:41] <Kevin`> papo: or alternately use an rtc chip with the crystal (or it's internal one) and just run the mcu completely from internal
[18:47:07] <papo> Kevin`: yeah that's the way to go I guess. I just wanted to make sure this was not me misinterpreting the datasheet... it all started out nicely and then I wanted to iterate over the firmware to add some fancy stuff but if this cannot be done with this guy I'll just take another one. I am sort of running out of pins anyway so I'd have to reconsider sooner or later anyway
[18:48:17] <papo> Kevin`: that's something else I considered but somehow a dedicated RTC chip seems to be a bit overkill.. The only advantage I see would be to have a nicer way to deal with drift but thanks for the input
[18:48:43] <specing> papo: you should buy a chip with aprox atleast 2KB code space, 64 bytes ram and all the IOs you need
[18:49:10] <Kevin`> a dedicated rtc chip will run longer than the mcu will from battery (most likely. really old ones may not)
[18:50:02] <Kevin`> assuming your project is designed such that everything except timekeeping can turn off when idle
[18:50:09] <OndraSter_> tinys can go down to 100nA or so without WD and RTC
[18:50:32] <papo> specing: you are right, the attiny85 was just the one I had lying around that seemed to fit at least somehow
[18:50:58] <OndraSter_> http://cz.mouser.com/ProductDetail/Microchip-Technology/MCP7940M-I-SN/?qs=sGAEpiMZZMuMkwKcEjFF1Onw5JUENdxOP4E%2fNSIxutA%3d
[18:51:00] <OndraSter_> 0.6€
[18:52:39] <OndraSter_> 1uA
[18:52:40] <OndraSter_> hmm
[18:54:55] <papo> the biggest share of power consumption will be by the LEDs so I am not really sure if batteries are the way to go but that is a whole different issue
[18:55:08] <specing> given a 1 mF cap it woult take exatly 1000 seconds to discharge it
[18:55:50] <OndraSter_> 1mF cap...
[18:55:51] <Kevin`> papo: if you are running those leds continuously, indeed they will be by far the largest consumer of power
[18:55:59] <OndraSter_> on my eDice I have 22uF
[18:56:01] <specing> OndraSter_: It is not that big actually...
[18:56:07] <OndraSter_> bigger ones are far too expensive
[18:56:08] <Kevin`> papo: and batteries would be annoying in such a device. if it's again continuous
[18:56:10] <specing> 1,5 cm in height
[18:56:12] <OndraSter_> and too big
[18:56:13] <specing> 6V
[18:56:27] <OndraSter_> I am using single CR2032
[18:56:39] <OndraSter_> (already occupies whole bottom of the board!)
[18:57:31] <papo> Kevin`: that's my thinking too. However a dedicated RTC would overcome short power outages (as specing is pointing out) which would be quite cool... actually I think I'll go with the RTC
[18:57:36] <Kevin`> ultracapacitors are more appropriate for that type of use than normal electrolytic (or a coin cell, they last for years)
[18:57:59] <OndraSter_> advantage of batteries: can be replaced withotu charging :)
[18:58:07] <OndraSter_> disadvantage: has to be replaced, cannot be recharged
[18:58:14] <OndraSter_> (or has anyone seen rechargeable CR2032? :D)
[18:58:32] <specing> papo: you can get a 5F supercap for $5
[18:59:22] <Kevin`> capacitors are more appropriate for a device that has power MOST of the time. it'll charge in a few seconds when you plug it in, but the power will only last for a few days (minutes or seconds with your leds running)
[19:00:29] <papo> if this is to overcome power outages (or battery chances although I doubt that this is feasible) the LEDs would be off when the cap is being discharged... I'm starting to like that
[19:01:14] <OndraSter_> http://www.dealextreme.com/p/2032-x-20-pcs-cell-batteries-751?item=16
[19:01:14] <OndraSter_> wow
[19:01:45] <OndraSter_> if they are all (or almost all of them) fully working
[19:02:53] <papo> although I always shudder when I am ordering stuff from china... summary of the last 3 things I got was two reasonable devices and one that I don't touch anymore when powered on, after having looked inside
[19:03:18] <Kevin`> OndraSter_: those are non-rechargable right? normal lithium cells?
[19:03:23] <OndraSter_> yes
[19:10:13] <Kevin`> (one with a battery backup power input_
[19:10:13] <OndraSter_> 65mAh only? regular CR2032 are 200 - 220mAh
[19:10:55] <OndraSter_> FOR THAT MONEY?!
[19:10:57] <papo> Kevin`: actually they are, but the price tag (besides other things) makes them totally inappropriate
[19:11:16] <OndraSter_> just buy few trays of those from BIC and you are done for a while :)
[19:11:51] <Kevin`> papo: what makes you say/think they are rechargable?
[19:12:40] <papo> Kevin`: because it says "rechargeable up to 400 times" as well as "rechargeable coin cells in various sizes", in German though
[19:12:41] <Kevin`> papo: oh, it says so on the page, heh :). I don't speak german
[19:12:48] <papo> yes sorry for that
[19:14:05] <Kevin`> common rechargable lithium cells are quite picky about how you charge them. be sure to find documentation for that specific cell type before you go that route
[19:14:22] <papo> we are using these for IMUs, apparently this is some niche application where you want to have something that is not impairing the user by its size but on the other hand these are used in lots of experiments and it would be a bit of a waste to constantly replace the coins
[19:14:40] <OndraSter_> IMU?
[19:14:55] <Kevin`> inertial measurement unit. cool stuff, I want one
[19:14:57] <OndraSter_> couldn't you fit in one of those rechargeable LiPol/whatever 3.7V batteries?
[19:14:58] <OndraSter_> ah
[19:15:17] <OndraSter_> they come from small to big capacities and from small to big footprints
[19:15:39] <Kevin`> I would be a bit suprised at that actually. lithium-polymer batteries are quite light because of the plastic packaging and because lithium
[19:15:52] <papo> OndraSter_: to be honest these design decisions were done before I started there and this is not one of my own projects so I don't know exactly why they decided to use this particular solution
[19:15:59] <OndraSter_> ah
[19:16:36] <papo> this is for prosthesis research and the like, it's the guys next door and I am more involved in other things
[19:16:47] <Kevin`> I suspect the main benefit is they fit into slots for 3v coin-cells and power 3v equipment. something designed for non-replacable batteries
[19:17:06] <OndraSter_> well they have to be taken out and recharged outside I presume anyway?
[19:17:07] <papo> but since I've been there I rediscovered that nice little electronics hobby of mine that I decided to give up when I started with my studies
[19:17:21] <papo> OndraSter_: yes
[19:17:30] <OndraSter_> the issue with having electronics as a hobby during studies - you have got no money for actual hobby :( :D
[19:17:33] <Kevin`> OndraSter_: the circuit could it, of course, but I assume it wasn't designed to, otherwise they would use a different socket
[19:17:57] <OndraSter_> well I am asking because it is much easier just to grab a new one than recharge the old one
[19:18:01] <OndraSter_> it takes time to recharge it
[19:18:16] <Kevin`> OndraSter_: have two or three batteries
[19:18:20] <Kevin`> charge while using
[19:18:25] <OndraSter_> yeah and one costs a LOT
[19:18:33] <Kevin`> not compared to the kit it's going into :)
[19:18:37] <OndraSter_> hmm
[19:18:38] <OndraSter_> okay then
[19:18:56] <OndraSter_> (I have no idea how much are IMUs priced at)
[19:19:08] <papo> OndraSter_: it was more of a time thing but I start to hate myself for that because it looks like I missed a lot of stuff... for example, I never got into this whole digital microcontroller thing because back then what you needed was a tremendously expensive programmer, with a ZIF socket and all, and I sort of failed to see all the cool applications you could use these chips for
[19:19:29] <OndraSter_> heh
[19:19:34] <OndraSter_> you must be then very old
[19:19:56] <OndraSter_> :P
[19:20:24] <papo> not really but I remember that the magazines features the expensive programmers and then some parallel port hacks for particular chips and the latter option didn't look too much appealing
[19:20:37] <papo> or maybe I missed something
[19:20:37] <Kevin`> it wasn't TOO long ago that a "basic stamp" was the cheap hobbyist option
[19:20:44] <Kevin`> and those are neither cheap nor very functional :)
[19:23:26] <papo> it's also a question of attitude somehow... the discrete and analog stuff was just sufficient for what I was doing so I did not feel the urge to look at other things... not saying this was wise though
[19:25:18] <OndraSter_> anyway, my eDice looks something like this http://clip2net.com/s/2b62E
[19:25:28] <OndraSter_> it has more than 7 LEDs :)
[19:25:30] <OndraSter_> aka 7 dots
[19:25:35] <OndraSter_> IT IS MUCH MORE INTELLIGENT!
[19:25:45] <OndraSter_> it can show even "ASCII"
[19:25:49] <OndraSter_> quite retarded ASCII
[19:25:58] <Kevin`> why does it have more than 9 dots though
[19:26:10] <Kevin`> oh, presumably for higher numbers
[19:26:13] <OndraSter_> yes
[19:26:15] <OndraSter_> upto 12 are dots
[19:26:18] <OndraSter_> >12 are ASCII :)
[19:26:28] <OndraSter_> (you can set that in menu)
[19:26:30] <OndraSter_> yes, it has got menu!
[19:27:10] <Kevin`> OndraSter_: yours isn't random enough: https://mywebspace.wisc.edu/lnmaurer/web/minirng/minirng.html
[19:27:13] <Kevin`> =p
[19:28:06] <OndraSter_> :)
[19:30:19] <OndraSter_> well it reads ADC and adds it to the random generated number :P
[19:30:30] <OndraSter_> which adds a bit to the randomness
[19:31:01] <OndraSter_> and the older the battery the more random numbers will actually be
[19:31:06] <OndraSter_> because the LEDs as they flash will take some power
[19:31:15] <OndraSter_> and the voltage will be dropping as they lit up
[19:31:21] <OndraSter_> and the capacitors will be (re)charging
[19:31:25] <Kevin`> but the leds flash determanistically
[19:31:26] <Kevin`> :)
[19:31:34] <OndraSter_> no
[19:31:41] <OndraSter_> since it is reading the ADC voltage not all of them blink
[19:37:10] <OndraSter_> afk 5 mins
[19:47:45] <OndraSter> well that was longer
[19:47:54] <OndraSter> bloody internet going slow, I WAS WAITING FOR FLASH TO UPDATE!
[19:48:05] <OndraSter> talking about "bloody", should I move out to UK?
[19:48:19] <OndraSter> how does UK feel about starting a new business?
[19:51:12] <OndraSter> anyway, more into electronics and batteries: I bought like 3 years ago (maybe 2? 2.5?) chinese 9cell battery for my laptop (HP 6715b). Funny thing is that about in half the whole laptop shut down. But in BIOS it stayed powered on till the complete discharge
[19:51:18] <OndraSter> (no warning about low battery, it just shut down in the system)
[19:51:27] <OndraSter> so I shelved it back in the day
[19:51:38] <OndraSter> now I have dusted it off and plugged and system refuses to find it
[19:51:56] <OndraSter> laptop tries doing something with it (orange LED) but then it shuts down as well (=no battery detected)
[19:52:01] <OndraSter> I am inclined to taking it apart :P
[19:52:16] <OndraSter> there will be 9 18650 batteries, small charging circuit and I2C EEPROM or something
[19:54:22] <OndraSter> I am actually only down by 21% on this original 6cell 3 years old battery... not bad
[19:54:33] <OndraSter> considering that for 2 years it was daily discharged during the day and recharged during the night
[20:35:59] <OndraSter_> also, has anyone tested Atmel Studio 6 on Windows 8?
[20:36:54] <Casper> win8 is a tablet os, shouln't be on a pc...
[20:45:08] <OndraSter_> well
[20:45:15] <OndraSter_> it is different approach to even desktop experience
[23:46:08] <PlastyGrove> I'm just stepping over from the arduino to code in C using atmel studio and learning a lot about the various registers and control bits of the Atmega328
[23:46:32] <PlastyGrove> Is there any reason I should look at working in assembly over C?
[23:46:43] <PlastyGrove> C provides some nice convenient libraries
[23:47:09] <PlastyGrove> but i believe asm would be way faster
[23:47:35] <PlastyGrove> and smaller of course
[23:52:11] <Kevin`> PlastyGrove: assembly is useful if you have something time critical that you can't do in c. it's pretty rare to need it actually, the c compiler is quite good
[23:52:43] <Kevin`> also useful for the really small, cheap parts, where your development time is less valuable than saving $0.05
[23:54:01] <PlastyGrove> Kevin: Cheap parts? Like an ATTiny instead of an Atmega?
[23:56:07] <PlastyGrove> I'm yet to push the boundaries of my muc, been able to do basic i2c and serial communication with code less than 3K
[23:56:35] <PlastyGrove> given the 32K on the atmega328, I've got some ways to go before I utilise it all
[23:56:47] <Kevin`> PlastyGrove: attiny you can use C on for most parts. the smallest ones from that range don't have ram, for example, or half half the cpu registers
[23:56:55] <Kevin`> or have*
[23:59:52] <PlastyGrove> Kevin: That's interesting. If you can use C to work on something with such limited resources, there's probly not much need to go with asm