#avr | Logs for 2012-08-08

Back
[00:00:18] <PlastyGrove> Xark: May or may not be - which is why we do the check in the next line for UDRE0
[00:00:45] <Xark> PlastyGrove: What assembler are you using?
[00:01:10] <Xark> PlastyGrove: I don't understand that. See if your error changes if you change UCSR0A to FOOBAR
[00:01:10] <PlastyGrove> Xark: Atmel studio
[00:01:43] <Xark> PlastyGrove: Hmm, if Amtel studio doesn't use GNU assembler, then perhaps it doesn't support local labels (i.e., #:)
[00:01:51] <PlastyGrove> Xark: My error goes away with the following code:
[00:01:53] <PlastyGrove> wait1:
[00:01:54] <PlastyGrove> ldi r17, UCSR0A
[00:01:56] <PlastyGrove> sbrs r17, UDRE0
[00:01:57] <PlastyGrove> rjmp wait1
[00:02:45] <Xark> PlastyGrove OK, then looks like it probably isn't using GNU assembler then and you can't use the integer labels (or perhaps it has a different syntax, not sure).
[00:03:32] <PlastyGrove> darn - would have been convenient
[00:03:38] <PlastyGrove> Xark: C:\Program Files (x86)\Atmel\Atmel Studio 6.0\extensions\Atmel\AVRAssembler\2.1.51.46\AvrAssembler\avrasm2.exe
[00:03:54] <PlastyGrove> looks like atmels' assembler?
[00:04:07] <Xark> PlastyGrove: Yeah, apparently a proprietary assembler in AVS.
[00:04:39] <PlastyGrove> Xark: How do you use the GNU assembler? Or rather set it up?
[00:05:20] <Xark> PlastyGrove: I suspect you can use avr-as if you like. If you pass a .S file to gcc, it will know to invoke the assembler on it (or failing that, you can use a build step to invoke it).
[00:05:53] <Xark> PlastyGrove: I am pretty sure it is included with AVS (since GCC uses it).
[00:06:08] <k-man> do i have to tell avr-gcc where to find the includes?
[00:06:33] <k-man> i'm getting this error: i2c_rgb.c:46:22: fatal error: inttypes.h: No such file or directory
[00:06:40] <Xark> k-man: It may have a default location for standard stuff, but other than that typically yes.
[00:08:09] <PlastyGrove> Xark: Thanks, I'll try it out
[00:08:29] <k-man> thanks Xark
[00:09:31] <Xark> k-man: Just checked and my WinAVR does include that header (so I would expect it to be in the default path...). See if you have it under \avr\include\inttypes.h
[00:10:28] <Xark> k-man: Not sure if it would matter, but are you using <> brackets in the #include (you should)?
[00:11:15] <k-man> Xark, yeah, its a file i got off the internets - just trying to get myself up and running with avr-gcc
[00:11:46] <k-man> i manually added the lib path and it solved that issue
[00:12:52] <k-man> i need a shove in the right direction though, suppose i want to write a simple program to set a could of pins to output and simply set them low, or high
[00:17:36] <k-man> when i compile with avr-gcc, do i need to specify which device its targeting? i get this error: /usr/local/avr/avr/include/avr/io.h:301:6: warning: #warning "device type not defined" [-Wcpp]
[00:18:12] <Xark> k-man: If you include <avr/io.h> you can do something simple like DDRB = 0x1; PORTB = 0x1; to output HIGH on port B bit 0
[00:19:27] <Xark> k-man: You need to define the AVR CPU type (so it knows what PORTs etc. are available). Something like "-mmcu=atmega328p"
[00:22:04] <k-man> Xark, now i sem to be having a linker issue: http://pastie.org/4410048
[00:22:18] <k-man> is there a gcc option to specify the path to the libs?
[00:23:23] <k-man> -L maybe?
[00:23:24] <Xark> k-man: It wants the "startup" file (pre-main setup). Again, typically defaults correctly). I believe -L<path> to specify.
[00:23:47] <Xark> That is library path, not sure if its also used for startup file.
[00:24:02] <k-man> Xark, yeah, not sure why the paths are not working - this is on OSX, i unstalled using mac homebrew (just in case you are wondering)
[00:24:06] <Xark> If not, you can pass crtn85.o directly on line.
[00:24:17] <Xark> (with full path)
[00:24:49] <Xark> k-man: Yeah. Looks like the binaries "work" but they install is a bit fubared.
[00:24:54] <Xark> the*
[00:25:07] <Xark> k-man: May just need an environment variable set or something...
[00:25:43] <k-man> yeah
[00:26:06] <Xark> k-man: gcc -dumpspecs will show info on default options (but it is NOT easy to understand for humans). :)
[00:26:36] <Xark> (but you may get a clue on the paths it is expecting to work...)
[00:27:15] <k-man> hehe, i see what you mean
[00:27:42] <Xark> k-man: Yeah. You also might try compiling a file with -Q -v (and it will dump some info that may be helpful)
[00:31:56] <k-man> thanks Xark
[00:32:13] <k-man> i just upgraded xcode and i suspect i need to re-install the whole avr-gcc toolchain
[00:32:18] <k-man> just recompiling it now
[00:32:30] <k-man> but this really makes me want to switch to linux for this kind of dev
[00:32:33] <Xark> k-man: Cool. Are you on Mountain Lion?
[00:32:38] <k-man> Xark, yeah
[00:33:09] <Xark> k-man: Yeah, I like OSX but it is a PITA for "unix" development in my experience (just different enough to cause headaches with stuff that "should work"). :)
[00:33:22] <k-man> yeah
[00:43:39] <k-man> *sigh* gcc is taking ages to compile
[01:00:25] <k-man> Xark, that was it, i needed to recompile the lot
[01:00:29] <k-man> now things are working ok
[01:00:35] <k-man> no need to specify paths or anything
[01:00:36] <Xark> Cool. :)
[01:00:37] <k-man> thanks for your help
[01:00:41] <Xark> NP
[01:00:53] <k-man> anyway, got to run
[04:11:19] <OndraSter> isopropyl alcohol finally came today
[04:11:26] <OndraSter> I CAN DO STUFF!
[04:11:35] <OndraSter> and toaster oven should arrive tomorrow
[04:13:44] <Steffanx> Received your paycheck? :D
[04:16:37] <Tom_itx> OndraSter you can't get it at the local drug store?
[04:17:10] <OndraSter> local drug store hasn't got that
[04:17:28] <Tom_itx> odd
[04:17:32] <Tom_itx> it's sold everywhere here
[04:17:46] <Steffanx> US vs Europe :P
[04:18:05] <OndraSter> I remember one woman in a drugstore even asking me "is it even legal to be sold?"
[04:18:08] <OndraSter> so.. yeah
[04:18:13] <Steffanx> *EU actually
[04:18:16] <Tom_itx> huh
[04:19:05] <Steffanx> I think i got mine from a computer store
[04:19:13] <Steffanx> *electronics and crap
[04:19:24] <Tom_itx> well that makes sense
[04:19:30] <jadew> isn't that acetone?
[04:19:58] <Steffanx> It's 99.7% 'pure' isopropyl alcohol, not sure what the other 0.3% is
[04:20:08] <jadew> it should be easy to find in any super market / beauty shop
[04:21:06] <Steffanx> No it's not acetone
[04:21:11] <Tom_itx> oil maybe
[04:21:41] <Tom_itx> that's what is commonly sold here that and 70%
[04:21:50] <OndraSter> I have acetone as well
[04:22:01] <Tom_itx> is that easier to get?
[04:22:03] <jadew> yeah, it's not
[04:22:04] <OndraSter> yes
[04:22:11] <OndraSter> mine isopropyl should be 99.9%
[04:22:20] <Tom_itx> take proper precautions with all chemicals
[04:22:25] <OndraSter> there was another seller with 99.7
[04:22:32] <OndraSter> yeah, don't drink them
[04:22:44] <Steffanx> It's smells so nice :P
[04:22:49] <Tom_itx> or absorb them thru your skin
[04:22:53] <OndraSter> acetone or IPA, Steffanx ?
[04:22:58] <Steffanx> IPA
[04:23:07] <OndraSter> well acetone vaporizes quicker than you absorb it
[04:23:22] <OndraSter> IPA should even faster
[04:24:22] <theBear> hmmm, i wonder if meth spirits is still poison if filtered and diffused thru the skin
[04:24:22] <jadew> what's the difference in usage?
[04:24:44] <jadew> between IPA and acetone
[04:27:16] <Tom_itx> i think acetone will degrease better
[04:27:28] <Tom_itx> and it's used in nail polish remover
[04:27:45] <jadew> yeah, I'm using it to clean the tonner off of PCBs
[04:27:53] <OndraSter> acetone dissolves plastic
[04:27:55] <OndraSter> not sure how about IPA
[04:28:01] <jadew> I have IPA as well, but never used it
[04:28:24] <Tom_itx> i've used it to clean flux of pcbs
[04:28:32] <OndraSter> acetone couldn't clean flux
[04:29:05] <jadew> interresting
[04:29:58] <tlvb> o/
[04:43:49] <OndraSter> woah it smells awful
[04:44:03] <OndraSter> I feel like in a drugstore! IPA, Acetone, denatured alcohol, distilled water
[04:44:13] <OndraSter> now I hope that I won't mix IPA and distilled water, they have got the same bottles
[04:44:16] <OndraSter> only different labels
[04:44:43] <Steffanx> Murphy ..
[05:05:44] <specing> BurnaSter, now with chemical burns
[05:08:19] <tlvb> I assume IPA is not the beer
[05:09:20] <agile_aardvark> usually IPA is some kind of isopropyl alcohol
[05:09:38] <GuShH> no shit.
[05:11:39] <OndraSter> GuShH, "no shit sherlock" is the correct ter,
[05:11:40] <OndraSter> term
[05:12:45] <KidBeta> im using avr-gcc and im trying to workout which port the pins I want to access are on, they are 13, 12 and 11 on the Adruino uno R3 from what I can gather these pins are on port D but im just here to double check
[05:16:16] <agile_aardvark> just trace the position from the controller pins.
[05:17:00] <k-man> so how do i go from a .c file to something i can download to an avr using avrdude?
[05:17:13] <k-man> i got the first part of compiling using
[05:17:20] <agile_aardvark> use a compiler.
[05:17:29] <k-man> avr-gcc -DF_CPU=8000000UL -mmcu=attiny85 -Os -o pwmled.o pwmled.c
[05:17:37] <k-man> what do i do with the .o file?
[05:17:45] <KidBeta> you need a .h k-man
[05:17:47] <KidBeta> .hex*
[05:18:03] <k-man> ok, whats the process of getting to a .hex?
[05:18:13] <KidBeta> http://www.mygooglest.com/fni/electronics.html
[05:26:31] <jadew> k-man: http://dumb.ro/files/avr/Makefile
[05:26:59] <k-man> thanks jadew
[05:27:08] <k-man> and thanks KidBeta
[05:27:11] <jadew> np
[05:27:19] <KidBeta> np
[05:27:43] <specing> Oh no, not makefiles again...
[05:27:52] <jadew> what's wrong with them?
[05:27:58] <k-man> specing, whats wrong whit that?
[05:30:43] <specing> They are unmaintainable
[05:31:08] <k-man> specing, what do you propose instead?
[05:31:22] <specing> Scons
[05:31:59] <specing> Also you have to manually modify Makefile every time you add a new .c file
[05:32:24] <specing> My SConstruct automatically builds everything in avr/ that ends with .c or .cc
[05:32:30] <specing> and links them together
[05:33:54] <k-man> nice
[05:34:02] <k-man> how long does it take to learn?
[05:34:23] <specing> It is pure python
[05:34:37] <specing> and python is one of the easiest languages to pick up out there
[05:35:09] <specing> that is right, SConstruct is a python program by itself
[05:35:22] <specing> Also
[05:35:39] <specing> Fuck yeah, constant pointer makes gcc eliminate high-byte LDS!
[05:35:45] <k-man> specing, ok, how do i do it?
[05:35:48] <specing> 23e: 30 e0 ldi r19, 0x00 ; 0
[05:35:53] <k-man> what?
[05:35:54] <specing> 248: 50 e0 ldi r21, 0x00 ; 0
[05:35:58] <k-man> you've lost me now
[05:36:00] <specing> 24c: 35 07 cpc r19, r21
[05:36:07] <specing> 24e: 09 f4 brne .+2
[05:36:20] <specing> WTF are you doing GCC? You are drunk.
[05:37:40] <specing> k-man: http://codepad.org/7sJ3j4xP
[05:38:07] <specing> substitue /data/specing/include with a dir with your custom includes (if you have one)
[05:39:58] <OndraSter> specing, are you sure that none touches those r19 and 21?
[05:40:22] <OndraSter> nothing*
[05:40:45] <Casper> specing: make a proper makefile and you won't have to manually include your .c/.h
[05:40:53] <specing> OndraSter: one sbci
[05:41:07] <specing> OndraSter: But I declared the pointer constant!
[05:41:13] <OndraSter> heh
[05:41:18] <specing> const struct command *const command_base = &commands[0];
[05:41:45] <specing> Casper: that would require me to learn the cryptic make syntax
[05:41:50] <specing> Casper: I <3 Python
[05:42:09] <Casper> or just get a premade makefile and be done with it
[05:43:17] <k-man> specing, are you sure that file was correct? line 20 seems to be repeated and scons is complaining
[05:43:43] <specing> yeah delete l.18&19
[05:44:04] <specing> I copy-pasted it wrong
[05:44:39] <k-man> ok, thanks
[05:44:49] <k-man> seems to work ok
[05:45:09] <k-man> is there a way to build the command to flash the device into it?
[05:45:36] <KidBeta> anyone have a good guide on how to use avrdude i used to just program all my stuff through the adruino gui but im not anymore
[05:46:07] <k-man> KidBeta, i'm goind down this path too
[05:46:21] <k-man> KidBeta, can you build from source yet? to a .hex file?
[05:46:44] <KidBeta> im on windows so im just using avr studio as the simulator is useful for what im doing
[05:49:07] <KidBeta> and it automagically outputs hex aswell as o when you compile
[05:50:09] <specing> k-man: yup
[05:50:25] <specing> just add it to BUILDERS
[05:50:49] <specing> Or not, do it like the command at the end
[05:52:29] <specing> Now Im trying to convince GCC to give me the upper byte of the pointer to commands[0]
[05:53:31] <specing> so the upper byte is constant (ldi)
[05:54:07] <k-man> KidBeta, ah thats nice
[05:54:08] <specing> and I dereference (command*)((upper << 8) | offset)
[05:54:35] <KidBeta> I love the dodgy stuff c allows
[05:55:04] <specing> I love the dodgy stuff c generates
[05:55:32] <specing> avr/../lib/shell.h:67:1: error: initializer element is not constant
[05:55:37] <specing> GRRR
[06:01:47] <k-man> how do i set PB0 to an output?
[06:02:01] <k-man> or where do i look this stuff up?
[06:03:04] <KidBeta> google
[06:03:23] <KidBeta> does anyone know if there is a way to get AVR studio 6 to flash my adruino for me or will i have to do it myself
[06:06:04] <OndraSter> yourself
[06:07:37] <tlvb> k-man: get the datasheet for your avr and check out the pin/port/ddr registers
[06:20:47] <k-man> what does 1U in DDRB|=(1U<<3); means?
[06:21:48] <k-man> ah unsigned?
[06:22:10] <specing> U as in Useless
[06:22:24] <specing> since it is useless to have it there
[06:24:44] <k-man> so, to set PB0, PB1 and PB2 to output, should i write 7 to the DDRB?
[06:28:50] <tlvb> k-man: for future readability _BV(PB2)|_BV(PB1)|_BV(PB0) would be recommended
[06:29:46] <k-man> tlvb, ok, so can you give me the recommended way to write it?
[06:30:22] <k-man> just DDRB= _BV(PB2)|_BV(PB1)|_BV(PB0) ?
[06:32:16] <tlvb> |= instead of =, unless you explicitly want to set all other bits to 0
[06:32:46] <k-man> tlvb, ok, thanks
[06:34:47] <PlastyGrove> Beware my 1337 H4XX0R ZkIllZ m0rtAlz!
[06:35:01] <OndraSter> OKAY!
[06:35:06] * OndraSter is running scared away
[06:35:33] * PlastyGrove runs and drags OndraSter back
[06:35:35] <PlastyGrove> well, I got USART working in ASM, so I'm a little pumped
[06:35:37] <PlastyGrove> :)
[06:35:43] <OndraSter> heh
[06:36:42] <PlastyGrove> I'm afraid I might become a byte junkie soon - trying to write code that takes up as little space as possible
[06:37:12] <OndraSter> welcome to specing 's world
[06:37:44] <OndraSter> I simply write everything that needs to be fast and/or compact in asm directly
[06:37:57] <PlastyGrove> Well, don't think I'll be able to compete with him anytime soon - my blinky is no where near 6 bytes yet!
[06:38:11] <KidBeta> im trying to get avrdude working but it just wont, ive got the right port and the right programmer and the TX and RX leds on the board flashes but it says theres a time out
[06:39:34] <k-man> tlvb, what is your suggestion for explicitly setting an output port? and for toggling it?
[06:40:03] <tlvb> write to the port register
[06:40:47] <k-man> tlvb, yeah but is there some macros i should use to get the particular pin i am addressing?
[06:45:44] <KidBeta> does anyone know if the adruino GUI stores the command line paramters it uses for avrdude cause thats all working fine but mine arent
[06:45:59] <k-man> can you xor like with the |= operator?
[06:46:29] <PlastyGrove> KidBeta: I can find you a link for the command line params the arduino gui uses
[06:47:03] <KidBeta> k-man: yeah all the bitwise ops work with =
[06:47:06] <tlvb> k-man: a^=b is same as a=a^b
[06:47:07] <KidBeta> aswell as +-/*
[06:47:23] <tlvb> and << >>
[06:47:34] <PlastyGrove> KidBeta: http://www.jayconsystems.com/forum/viewtopic.php?f=5&t=66&p=295#p295
[06:47:37] <k-man> thanks
[06:47:42] <tlvb> or maybe that is included in bitwise ops
[06:47:57] <PlastyGrove> Check out the command and arguments that get passed, sorry don't know much more abt avrdude
[06:48:06] <k-man> yay! I have a flashing light!
[06:48:26] <k-man> its an order of magnitude off in the flash frequency but still!
[06:50:52] <tlvb> k-man: check out the ckdiv8 fuse documentation
[06:50:58] <k-man> should i set F_CPU in hz?
[06:51:12] <tlvb> yes
[06:53:59] <k-man> clock is divided by 8...
[06:54:09] <k-man> tlvb, thanks so much for the pointer!
[06:54:21] <specing> __attribute__((aligned)) is not suitable for my case AAArgh
[06:54:22] <k-man> i'd probably have been debugging for weeks
[06:54:29] <k-man> how do i fix it?
[06:54:49] <specing> k-man: unset DIV8 in fuses
[06:55:03] <k-man> ok, thats new to me
[06:55:10] <k-man> how do i set fuses?
[06:55:33] <specing> go into avdude terminal mode and write ?fuse 0xXX
[06:55:42] <specing> avrdued*
[06:55:45] <specing> avrdude*
[06:55:50] <Steffanx> And be sure you don't mess up!
[06:55:53] <tlvb> indeed
[06:56:31] <tlvb> there is a risk of bricking the avr if you don't pay attention
[06:57:33] <k-man> ok
[07:10:18] <KidBeta> PlastyGrove: all good had the wrong -b value now working! thanks
[07:11:03] <PlastyGrove> KidBeta: great!
[07:11:17] <KidBeta> going to make life a lot easier :)
[07:25:18] <KidBeta> whats a good easy way to just turn all the pins on to high
[07:25:23] <KidBeta> in a port
[07:27:16] <KidBeta> im having trouble even so muc has turning a LED on with this but with the adruino one it all worked fine, i even upload one of my old sketches ot see if its the board and it all blinks perfectly :/ no idea what im doing wrong
[07:29:19] <PlastyGrove> KidBeta: To turn all ports high, you can do PORTB |= 0b11111111
[07:29:31] <KidBeta> will 0xFF do the same?
[07:29:35] <PlastyGrove> yup
[07:29:43] <PlastyGrove> but before that you need to mark all of them as output
[07:29:49] <KidBeta> ive got that
[07:29:51] <KidBeta> and done that
[07:29:56] <KidBeta> and shoved it in a neverending loop
[07:29:58] <KidBeta> no output :/
[07:30:16] <PlastyGrove> just to confirm, you did DDRB |= 0xff
[07:30:29] <PlastyGrove> ?
[07:30:45] <KidBeta> nope
[07:30:48] <KidBeta> DDRB = 0xFF
[07:30:56] <KidBeta> and just tried |= then and still nothing
[07:31:02] <PlastyGrove> that's fine as well
[07:31:52] <PlastyGrove> even LED13?
[07:31:53] <KidBeta> and ive also got LED's hooked upto pins 13 - 2 and none lightup
[07:31:55] <PlastyGrove> i.e. PB5
[07:32:00] <PlastyGrove> the onboard LED?
[07:32:07] <KidBeta> it lights up when its flashing
[07:32:12] <KidBeta> and so does the real LED attached to 13
[07:32:20] <KidBeta> and starting
[07:32:24] <PlastyGrove> after that is it turned on or off?
[07:32:31] <KidBeta> off
[07:32:41] <PlastyGrove> hmm, can you put your code on pastebin?
[07:32:55] <KidBeta> let me try something first
[07:34:16] <KidBeta> the whole project is 400 lines
[07:34:26] <KidBeta> but i can give you main if you want its only like 10 and doesnt call anything atm
[07:35:45] <KidBeta> http://pastebin.com/hkW3cDMa
[07:36:41] <PlastyGrove> KidBeta: you mean the same code in teh arduino works fine?
[07:37:20] <KidBeta> well no, its similar code from a adruino (program? i think thats the language) sketch
[07:37:33] <KidBeta> which works fine, uses the same layout as ive got on my breadboard atm and lights pins
[07:37:56] <PlastyGrove> KidBeta: did you try a simple blinky on PB5 (onboard LED) in the C code?
[07:38:07] <PlastyGrove> just to see if the problem is in the code?
[07:38:15] <KidBeta> yeah ill have a looky
[07:39:04] <KidBeta> ill just coppy it straight over
[07:40:58] <KidBeta> blinky no work either
[07:40:59] <KidBeta> odd
[07:41:01] <PlastyGrove> here's a code that works
[07:41:02] <PlastyGrove> http://pastebin.com/igS2fZH3
[07:41:16] <PlastyGrove> can you try that?
[07:41:48] <KidBeta> no worky
[07:43:01] <PlastyGrove> really? works on my arduino - maybe something not right with the way GCC is setup?
[07:44:21] <KidBeta> maybe
[07:44:24] <KidBeta> the sketch works
[07:44:26] <KidBeta> well mine
[07:44:28] <KidBeta> just double checked
[07:46:20] <PlastyGrove> hmm - are you using atmel studio?
[07:49:24] <KidBeta> yeah
[07:50:43] <KidBeta> want me to check the asm output
[07:51:01] <specing> lol
[07:51:08] <specing> Cant even get a led to blink
[07:51:28] <specing> Did you connect them with common cathode?
[07:51:54] <PlastyGrove> specing: even the onboard LED isn't blinking
[07:52:08] <specing> define onboard
[07:52:22] <KidBeta> i need leds so i can check my task switching
[07:52:48] <specing> task switching?
[07:53:00] <specing> dude you can't even get leds to blink ;P
[07:53:34] <KidBeta> its alll done in the simulator so far
[07:53:46] <PlastyGrove> specing: the standard onboard LED on pin 13 on the arduino board
[07:54:08] <specing> Im not familiar with arduinos ;D
[07:54:16] <specing> or what "pin 13" is
[07:54:31] <PlastyGrove> :)
[07:56:44] <KidBeta> PlastyGrove: any ideas
[07:56:56] <OndraSter> IMPOSSIBRU!
[07:57:00] <OndraSter> the oven should arrive today
[07:57:03] <OndraSter> in like 20 minutes
[07:57:07] <OndraSter> she sent it today...
[07:57:09] <OndraSter> impressive
[07:57:12] <OndraSter> oh well, it is DHL or something
[07:59:20] <PlastyGrove> KidBeta: Difficult to say, I'm guessing the problem might be in the way you have it setup in atmel studio
[07:59:40] <PlastyGrove> can you try the tut on the jaycon systems website?
[07:59:57] <PlastyGrove> i mean check against it to see if you've got everything set up in a similar way?
[08:00:06] <PlastyGrove> that's exactly what I did and it works fine for me
[08:00:14] <PlastyGrove> i'm using the UNO by teh way
[08:00:23] <KidBeta> oh cool
[08:00:27] <PlastyGrove> KidBeta: http://www.jayconsystems.com/tutorial_detail.php?tid=7
[08:00:52] <PlastyGrove> To be absolutely sure, UNO R3 :)
[08:01:07] <KidBeta> ah same
[08:02:10] <PlastyGrove> KidBeta - try copying these into your external tools commands then:
[08:02:18] <PlastyGrove> Command: c:\arduino\hardware\tools\avr\bin\avrdude.exe
[08:02:28] <PlastyGrove> Arguments: -CC:\arduino\hardware\tools\avr\etc\avrdude.conf -patmega328p -carduino -PCOM4 -b115200 -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i
[08:02:41] <PlastyGrove> my arduino folder is in C:\
[08:03:09] <PlastyGrove> I need to step out for a while, try it out and see if it works
[08:03:20] <OndraSter> Atmel++
[08:03:23] <OndraSter> they just sent me samples :)
[08:03:30] <KidBeta> yeah
[08:03:33] <KidBeta> ill try that
[08:04:54] <OndraSter> xmega256a3u, 128a1u and 32a4u
[08:04:58] <OndraSter> each 3 pieces :)
[08:05:12] <OndraSter> but I wasn't lying about my use for them
[08:06:22] <KidBeta> blinky works now :/
[08:06:24] <KidBeta> thanks
[08:07:44] <specing> OndraSter: they arrived already?
[08:07:48] <OndraSter> yeah
[08:07:49] <OndraSter> ordered 3 days ago
[08:07:54] <specing> Oh
[08:07:54] <OndraSter> :)
[08:08:02] <OndraSter> I thought it was something else
[08:08:13] <OndraSter> the toaster oven I bought two days ago and she shipped it today
[08:19:34] <OndraSter> capn
[08:19:36] <OndraSter> where is capn!
[08:20:39] <OndraSter> I need to know if he can do 4mil track/4mil spacing
[08:21:09] <Steffanx> !seen capnkernel
[08:21:10] <tobbor> CapnKernel was last seen in #avr on Aug 08 05:06 2012
[08:21:33] <OndraSter> hmm
[08:21:39] <OndraSter> it is impossible to route it out on 2 layers anyway
[08:21:43] <OndraSter> (100 pins BGA)
[08:23:01] <OndraSter> I will have to go for a bigger PCB to accomodate TQFP100
[08:23:51] <OndraSter> or I'd need a REALLY small vias
[08:25:07] <Blecha> I learned I dont like programming in asm very much...
[08:25:11] <OndraSter> heh
[08:25:13] <OndraSter> why?
[08:25:22] <Blecha> because its asm
[08:25:25] <OndraSter> lol
[08:25:29] <Blecha> what do you mean why?
[08:25:30] <k-man> when setting fuses, can i just set 1 bit somehow? or I have to know what the current fuse setting is, alter the bit then write the whole fuse bytes back?
[08:25:42] <Steffanx> Good point Blecha :D
[08:25:42] <OndraSter> read, modify, write
[08:26:05] <OndraSter> why don't you like it
[08:26:54] <Blecha> The whole process was just kind of painful
[08:38:47] <k-man> so how do i read the fuses?
[08:38:59] <k-man> -U lfuse:r ?
[08:40:21] <k-man> nm, worked it out thanks
[08:41:17] <specing> k-man: go into terminal mode and use the avrdude cli
[08:41:43] <k-man> specing, yeah, i am, i just couldn't work out the syntax - but got it now
[08:43:27] <timemage> k-man, if you haven't found it already, try the :b option for the format. sort of useful for reading fuses.
[08:43:31] <timemage> ack
[08:48:35] <KidBeta> how faitful is the simulator
[08:51:05] <k-man> yep, found that
[08:54:20] <Blecha> I wish I had internet at home, i dont have a sim on my computer :(
[09:33:10] <specing> Hmm reading about PROGMEM...
[09:33:41] <specing> How would one place a struct into flash without storing pointers to its members too?
[09:33:43] <specing> const struct command commands[] = { { "lcd", lcd }, { "mem", mem }
[09:33:46] <specing> };
[09:34:48] <KidBeta> doesnt the instruction to store to prog_mem take a pointer to where you want to store
[09:35:24] <specing> I'l like to end up with 0x6D656d00xxxx6c636400xxxx...
[09:36:03] <specing> Dean's tutorial lists USART_TxString_P(pgm_read_word(&MenuItemPointers[EnteredNum]));
[09:36:19] <specing> it first loads a ptr to it
[09:36:29] <specing> But that is for variable-length strings
[09:36:39] <specing> Im interested in fixed-length structs
[09:37:07] <karlp> just add EEMEM attribute?
[09:37:23] <specing> EEMEM is for eeprom
[09:38:56] <karlp> s/EEMEM/PROGMEM/g
[09:45:13] <Blecha> Is it possible to use an SD card as a kind of swap space?
[09:45:35] <specing> Not recommended
[09:45:43] <specing> use a SPI ram
[09:51:33] <specing> Yeah, jsut declaring the struct as PROGMEM works
[09:51:46] <specing> I checked the .hex and the .s
[10:01:06] <Blecha> avr-as takes .s files doesn't it?
[10:03:32] <specing> yuep
[10:07:08] <Blecha> cool, i just discovered deal extreme :O
[10:08:36] <Steffanx> No dx discovered you
[10:08:39] <OndraSter> lol
[10:08:43] <OndraSter> dx sucks, it takes them ages to ship anything
[10:08:53] <OndraSter> and you can often find cheaper the stuff on buyincoins.com or ebay
[10:11:02] <Steffanx> buyincoins.com and ebay(the seller) are slow too
[10:11:03] <Blecha> Yeah im noticing taht
[10:11:08] <Blecha> is buyincoins a bitcoin site?
[10:11:19] <Blecha> and what are any of these US suppliers?
[10:11:21] <OndraSter> not that I am aware
[10:11:28] <OndraSter> Steffanx, buyincoins ships stuff in a day
[10:11:41] <OndraSter> Blecha, if you are lucky dx will ship it from US/UK warehouse
[10:11:42] <Blecha> allied electronics?
[10:11:44] <OndraSter> but it still takes ages
[10:11:57] <Blecha> or mouser?
[10:12:03] <OndraSter> dx itself took last time a month to ship thing that was marked as "4 to 7 days"
[10:12:11] <OndraSter> mouser and farnell and digikey etc are regular part suppliers
[10:12:16] <OndraSter> not any china copy crap
[10:12:29] <Blecha> I want fast shipping
[10:12:43] <Blecha> but deal extreme has some really nice looking relay boards
[10:12:52] <Blecha> I might just order one and then randomly be excited when it comes
[10:12:56] <OndraSter> hehe
[10:13:44] <Blecha> http://www.dealextreme.com/p/8-channel-5v-relay-module-extension-board-for-arduino-avr-arm-51-140703?item=6
[10:14:52] <specing> wow that is expensice
[10:14:59] <specing> last time I saw one for $8
[10:15:15] <OndraSter> $16 duh
[10:16:35] <Blecha> You could get 2, maybe 3 relays for that at radioshack
[10:16:43] <Blecha> If they even carry/stock them
[10:18:19] <specing> One relay <= 0.5$ in china
[10:23:07] <OndraSter> they are $0.5 even in local overpriced shop
[10:24:49] <specing> lol
[10:25:38] <to8> Hi. I'm writing a program in C on a atmega32u4 and I'm looking for a function similar to Arduino millis(). Does anyone have an example code?
[10:26:05] <specing> util/delay.h
[10:26:34] <karlp> that's not really the same thing specing
[10:28:28] <specing> Well then make a better suggestion to him Mr. Smartass.
[10:29:29] <to8> I'd like to read the delay since my board has start - in milliseconds.
[10:29:59] <specing> aha
[10:31:02] <specing> Load the timer OCR with some value, set its prescaler to produce atleast millisecond resolution
[10:31:30] <specing> create an ISR that will count seconds based on its interrupts
[10:31:51] <specing> and read both seconds and the timer register wherever you want to
[10:35:27] <to8> yep, thanks. I'm still looking for an example code as it should be a regular question and I mixing up with register names and prescaler on 32U4.
[11:29:02] <Guest76855> If i compile "int main(){return 1;}" with "gcc -g -mmcu=atmega16", gdb should be able to debug it by running "avr-gdb a.out" and doing "target sim" and "start" , right?
[11:35:34] <Blecha> Well crap... just had the dude to take over my shift call in. Might be stuck here till 10.
[11:39:06] <specing> shift?
[11:39:12] <specing> Where do you work Blecha ?
[11:40:52] <RikusW> Guest76855: seems right
[11:41:53] <RikusW> the snow is mostly melted here now :)
[11:42:35] <Steffanx> Here too
[11:42:40] <Steffanx> Nah, it's all gone
[11:43:19] <RikusW> Steffanx: It summer over there, there shouldn't be any snow :-P
[11:44:12] <RikusW> there is only a few pieces still lying around
[11:48:51] <Blecha> Specing at a hotel, a fancy hotel
[12:00:06] <specing> oh no, freenode is breaking again
[12:00:35] <RikusW> netsplits...
[12:00:58] <Guest76855> Doesn't work over here : \ I gives "warning: No program loaded. Warning: Cannot insert breakpoint 1. Error accessing memory address 0x74: Input/output error."
[12:01:57] <Guest76855> Google isn't being very cooperative. Anyone have nay ideas what could cause something like this?
[12:02:56] <Guest76855> GDB was configured as "--host=i686-pc-linux-gnu --target=avr", and I'm using packages from Archlinux's repositories.
[12:06:32] <karlp> and what's the target? a simulator?
[12:07:06] <Guest76855> Yes.
[12:10:21] <Guest76855> I assume it has in in-build simulator, I didn't specify one explicity myself: just ran "target sim" and it returns "connected to the simulator".
[12:13:02] <RikusW> maybe you should use the elf format instead of a.out
[12:13:44] <Blecha> Why does everyone with a good UI have expensive prices/slow shipping, and everyone with low prices have a crappy UI that requires searching for a part.
[12:13:54] <Blecha> I just want to browse cool things i could play with!
[12:14:43] <RikusW> they had to pay the developers more ;)
[12:15:18] <Blecha> I like digikey and mouser but man I just want to browse :(
[12:15:41] <Guest76855> RikusW: Isn't a.out just the default file-name (but in ELF-format)? I can use avr-readelf on it.
[12:26:33] <Guest76855> = Eric_Vuhl, forgot to register.
[12:36:33] <Blecha> That reminded me to finally register this nick
[12:39:12] <OndraSter_> holy cow @ XMEGA128A1U
[12:39:20] <OndraSter_> 2x2channels 12bit 1MSPS each DAC
[12:39:26] <OndraSter_> 2x16channels 12bit 2MSPS each ADC!!
[12:40:32] <specing> I wonder how you plan on processing all that data
[12:40:36] <OndraSter_> :)
[12:40:37] <OndraSter_> 32MHz
[12:40:42] <specing> Try overclocking it
[12:40:43] <OndraSter_> many people overclock them to 48MHz just fine
[12:40:47] <specing> to 100MHZ!
[12:40:49] <OndraSter_> I think that some run on 64MHz
[12:41:27] <specing> mmm 100Mhz AVRs...
[12:42:21] <Eric_Vuhl> For those interested: fixed it by doing this instead, goo.gl/bpmm6 . I suppose the "target sim" does not work how I expect it to.
[12:42:55] <specing> Eric_Vuhl: you have to run simavr and then connect to it with gdb
[12:44:09] <Steffanx> 2MSPS isn't THAT special OndraSter_
[12:44:19] <Steffanx> You want these http://www.st.com/internet/mcu/product/253744.jsp .. 5msps :P
[12:44:32] <OndraSter_> but two separate ADCs, each having its own 2MSPS and 16 channels is cool
[12:44:39] <OndraSter_> heh
[12:44:40] <OndraSter_> stm32
[12:44:48] <Steffanx> ofcourse
[12:44:58] <OndraSter_> can it work with 16MB SDRAM?
[12:45:09] <karlp> Eric_Vuhl: why the goo.gl link instead of the actual link?
[12:45:12] <Steffanx> No, but at least it's > 8bit
[12:45:21] <Eric_Vuhl> It's long
[12:45:38] <Eric_Vuhl> but if you preffer it: http://electrons.psychogenic.com/modules/arms/art/6/SimulatingandDebuggingAVRprograms.php#avr-gdb
[12:46:05] <karlp> that's not long.
[12:46:11] <karlp> this isn't twitter
[12:46:23] <karlp> it only has a single url param in it, that's _fine_
[12:47:54] <Eric_Vuhl> I blame my tiny screen :P
[12:51:06] <OndraSter_> what does AVR stand for? Atmel's Very RISC?
[12:52:09] <Steffanx> "The creators of the AVR give no definitive answer as to what the term "AVR" stands for."
[12:52:15] <OndraSter_> :(
[12:52:20] <OndraSter_> that makes me quite angry actually :D
[12:52:25] <Steffanx> "However, it is commonly accepted that AVR stands for Alf (Egil Bogen) and Vegard (Wollan)'s Risc processor."
[12:52:28] <Steffanx> Wikipedia ftw
[12:52:33] <OndraSter_> :)
[12:52:53] <Blecha> Actually Very Racist
[12:56:24] <specing> racist jokes are unavoidable.
[13:03:16] <Eric_Vuhl> Okay.. I'm an idiot.
[13:03:49] <Eric_Vuhl> All I had to do was: "<gdb>target sim"
[13:03:53] <Eric_Vuhl> "<gdb> load"
[13:04:15] <Eric_Vuhl> That last bit is apparently important.
[13:43:03] <xata> hi all
[13:43:43] <xata> what is programmer type if i am using programming by serial port? (gromov's programmer)
[13:44:01] <xata> for avr dude. trying to overbear it
[13:45:04] <xata> http://easyelectronics.ru/img/AVRProgrammator/gromov.jpg
[13:47:23] <RikusW> ah sound like bitbang
[13:49:12] <RikusW> that would be some --- type=serbb--- in avrdude.conf
[13:50:19] <Blecha> I want to make a bootloader, thats a good noob project right? :P
[13:50:53] <RikusW> xata: try dasa3
[13:52:21] <RikusW> xata: or you may need to add the right programmer type to /etc/avrdude.conf dasa3 seems like it might work
[13:52:53] <specing> Blecha: see you in a year ;P
[13:54:00] <RikusW> Blecha: for what AVR ?
[13:54:41] <specing> Blecha: make a 100 byte bootloader :P
[13:55:00] <RikusW> Blecha: http://ruemohr.org/code/BLM8.zip
[13:55:11] <RikusW> Thats mine all in asm for mega8
[13:55:29] <RikusW> it use stk500v2
[13:55:38] <specing> RikusW: In how many words did you do it?
[13:55:47] <RikusW> 1k
[13:55:51] <specing> ouch
[13:55:57] <specing> THAT IS A LOT
[13:56:14] <RikusW> well its stk compatible
[13:57:22] <RikusW> the usb version takes 2k
[13:57:38] <specing> 0.o
[13:57:54] <specing> My asm bootloader would probably be less than 100 words
[13:57:58] <Blecha> specing aren't you doing that?
[13:58:05] <specing> With my own space-efficient proto
[13:58:11] <RikusW> for usart...
[13:58:20] <RikusW> usb isn't that simple
[13:58:22] <specing> Blecha: I was working on the shell
[13:58:41] <RikusW> specing: I dare you to do CDC in less than 800 bytes....
[13:58:48] <Blecha> I honsestly have no idea how to even get started on that
[13:58:51] <specing> Blecha: then decided it ain't gonna work and went for a packet-based proto instead
[13:59:10] <specing> RikusW: Who needs USB when one can do uart?
[13:59:39] <RikusW> specing: when you want to use your m8u2 or m32u2 with it...
[14:00:26] <Blecha> but I would want to do it with an attiny of some kind
[14:00:33] <specing> I can ISP them just fine
[14:00:34] <Blecha> and ftdi/serial
[14:00:51] <specing> Blecha: t25 ;P
[14:01:19] <RikusW> as far as I'm concerned attiny is too expensive when compared to atmega...
[14:01:44] <Blecha> idk
[14:01:49] <RikusW> I'd rather use a mega
[14:02:01] <Blecha> still up in the air but no matter what some cool projects lie ahead
[14:02:07] <Blecha> can't wait until i get my paycheck
[14:02:10] <specing> Why don't you just skip to cortex-M4 while you are at it?
[14:02:14] <RikusW> I got mega324A for 3E and paid 2.5E for t2313
[14:02:21] <specing> 100 DMIPS...
[14:02:37] <RikusW> so why would I ever again get a t2313....
[14:02:54] <Blecha> im trying to figure out the best use of ~$50 to spend on AVRs and something fun to hook them too(lcd, relays, wireless modules, etc), or maybe a tool+avr
[14:03:02] <RikusW> specing: what does it cost ?
[14:03:48] <RikusW> Blecha: do some research on tiny vs mega prices...
[14:04:26] <Blecha> Why? I really just wan a recommendation for something that isn't as huge as a mega328
[14:04:30] <Blecha> as in physically huge
[14:04:35] <RikusW> also the older mega's tend to be much more expensive than the new versions
[14:04:46] <Blecha> 8 pin dip would be coolest i think
[14:04:56] <RikusW> tqfp m328 ?
[14:05:00] <RikusW> thats small
[14:05:19] <RikusW> as small as 8 pin dip...
[14:05:30] <Blecha> ...
[14:05:36] <Blecha> you know what i mean!
[14:05:38] <Blecha> :P
[14:05:45] <RikusW> or can't you solder surface mount avr ?
[14:05:58] <Blecha> nope
[14:06:04] <Blecha> not with my current tools
[14:06:48] <RikusW> I soldered a lot or m32u2 using just a soldering iron and flux
[14:06:51] <RikusW> *of
[14:07:54] <RikusW> I used a Plato EW-103 tip
[14:12:09] <Blecha> flux RikusW
[14:12:21] <Blecha> I am broke enough that every little thing like that adds to my cost
[14:12:31] <Blecha> I just want some stuff to play with that I can hit the ground running on.
[14:15:00] <RikusW> flux is fairly cheap
[14:15:30] <Blecha> I would need that + a new tip for my iron
[14:15:40] <RikusW> I bough a 250ml bottle for 5E and even after soldering 130 smt chips and a lot of other work its still 75% full
[14:15:43] <Blecha> plus a board to put it on.
[14:15:59] <RikusW> the pcb will be a problem....
[14:16:03] <Blecha> all that adds to the cost when i could just use DIP and my breadboards
[14:16:11] <RikusW> price wise that is
[14:16:13] <karlp> Blecha: I've hand soldered 0.5mm pitch 48pin qfp,
[14:16:20] <Blecha> grats
[14:16:20] <karlp> with a fat tip, and no flux
[14:16:26] <karlp> and I drink too much and have shaky hands
[14:16:33] <Blecha> Me too
[14:16:33] <karlp> just buy some solder wick
[14:16:37] <karlp> presto => easy
[14:16:41] <Blecha> not on the drinking too much
[14:16:42] <karlp> well, let's not say "easy"
[14:16:45] <karlp> but it's more than doable
[14:16:51] <Blecha> still need a board, and really id rather go dip
[14:16:58] <Blecha> because I dont know what im using them for yet
[14:17:06] <karlp> yeah, well, half the interesting sensors aren't through hole anymore anyway
[14:17:15] <karlp> so you're either paying someone else to make breakout boards all over the place
[14:17:19] <karlp> or you just bit teh bullet
[14:17:27] <karlp> and a board for smt is smaller and cheaper anyway
[14:17:31] <Blecha> yeah im going to when i get my new solder station up and running
[14:17:39] <Blecha> but for now nothing is permenent so no need
[14:17:41] <karlp> the prototyping tools are normally good enough anyway
[14:18:27] <Blecha> right now its Chips to play/learn with, solder station, logic analyzer/o-scope, etchant and copper clad
[14:18:40] <Blecha> Thats my priority for ordering stuff to add to my lab
[14:18:50] <Blecha> then I dont need breakout boards and all the crap ordered
[14:33:54] <RikusW> Blecha: have a look at mega324A
[14:34:59] <Blecha> yikes $5 a chip
[14:35:40] <Blecha> RikusW seems a bit beefy for my needs
[14:36:15] <OndraSter> which one?
[14:38:11] <Blecha> in general, but i was looking on digi for the dip
[14:38:21] <RikusW> I got it for $4
[14:38:44] <RikusW> from RS
[14:39:25] <Blecha> RS?
[14:39:33] <Blecha> and thats still a bit pricey
[14:39:42] <Blecha> im looking for $1-3
[14:41:51] <RikusW> mega168 ?
[14:41:58] <RikusW> or mega88
[14:42:03] <OndraSter_> your choice
[14:43:16] <Blecha> mega168 maybe ill look at the 88
[14:44:33] <Blecha> What do the letters after the name mean, for example:ATMEGA88PA-PU-ND vs ATMEGA88A-PU-ND
[14:52:27] <RikusW> PU - dip
[14:52:55] <RikusW> 88PA --- P > low power A > new version
[14:53:05] <RikusW> AU - tqfp
[14:53:13] <RikusW> ND ??....
[14:53:42] <xata> RikusW: yeah, like dasa3, but with non-inverted reset. already done, but thanks anyway
[14:58:07] <Blecha> Ok cool
[14:58:19] <Blecha> These are the chips im considering in order of cost
[14:58:24] <Blecha> based off a thread I found
[14:58:32] <Blecha> ATTINY13A-PU-ND ATTINY45-20PU ATTINY85-20PU ATMEGA88PA-PU-ND ATMEGA168-20PU-ND ATMEGA164P-20PU-ND
[14:58:54] <Blecha> Thread: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=592930
[14:59:28] <OndraSter> :)
[15:06:03] <RikusW> the m164P got 40 pins
[15:06:25] <RikusW> the 88/168 only 32
[15:07:17] <RikusW> for prototyping I'd consider more pins better
[15:08:39] <Steffanx> More pins? mega2560 ? :P
[15:09:00] <RikusW> thats too much :-P
[15:09:28] * RikusW have yet to see a 100 pin dip chip
[15:09:40] <Blecha> yep i think im going with the tiny45/85 and ATMEGA88A-PU
[15:09:49] <Blecha> I have made up my mind and shall not change it again!
[15:09:54] <Blecha> err
[15:10:19] <Blecha> tiny45/85 and mega168
[15:10:36] <Blecha> not sure how many of each but i figure that will give me the best of both worlds
[15:10:47] <RikusW> how does the m164 vs m168 prices compare ?
[15:11:05] <Blecha> not very well for the 164
[15:25:26] <Blecha> really I dont need that many pins RikusW
[15:25:40] <uv_> hi
[15:25:43] <uv_> which is the Linear Technology ZVS FB controller alternative of UCC3895?
[15:27:10] <OndraSter> Blecha, it is just few mm on your breadboard :)
[15:27:17] <OndraSter> I wish sometimes I had more pins on the breadboard
[15:27:22] <OndraSter> (which will be... SOON!)
[15:27:40] <OndraSter> dumping some (E)EPROM? Have to use shift registers :(
[15:28:07] <Blecha> OndraSter thats just good experience then :D
[15:28:21] <OndraSter> no
[15:28:28] <OndraSter> it is bazilion wires to connect
[15:28:40] <Blecha> pfff
[15:28:46] <OndraSter> instead directly wiring up 16 + 8 wires (for 64kB chip) one has to wire another bunch
[15:28:56] <OndraSter> and check datasheet which pin is MISO, which is MOSI, which is SCK
[15:29:07] <OndraSter> then another 3 registers to be sure he hasn't forgot about something...
[15:29:12] <Blecha> Why do you need to that if you are dumping eprom?
[15:29:40] <OndraSter> 16 addressing bits
[15:29:42] <OndraSter> 8 data bits
[15:29:49] <OndraSter> read from EPROM, send to serial
[15:30:04] <OndraSter> now find me whole 3 ports that are not used
[15:30:08] <OndraSter> PortA - empty (1)
[15:30:13] <OndraSter> PortB - empty (2)
[15:30:16] <OndraSter> PortC - JTAG
[15:30:20] <OndraSter> PortD - UART
[15:30:30] <OndraSter> there are no 3 whole ports available no matter what you do ;)
[15:30:49] <Blecha> I think im too much of a noob to follow...
[15:36:30] <Blecha> Im getting pretty excited
[15:36:48] <Blecha> I just need to decide what i should buy to hook these up, some kind of simple display probably
[15:36:53] <Blecha> going for an alarm clock build
[15:39:37] <Blecha> USI can do I2C, USART, and SPI stuff right?
[15:39:49] <OndraSter> yes
[15:39:58] <OndraSter> but USI sucks... you have to manually take care of sending and receiving
[15:40:05] <Blecha> hmmm
[15:40:18] <Blecha> I dont really see any small avrs with a non USI setup
[15:40:27] <OndraSter> so grab a bigger one a bit ;)
[15:40:29] <OndraSter> mega328
[15:40:33] <OndraSter> 168
[15:40:49] <Blecha> I am getting some 168s and tiny45/85
[15:41:17] <Blecha> So really only have to worry about it on the tiny
[15:43:26] <Blecha> OndraSter any links talking about the USI?\
[15:43:34] <OndraSter> datasheet
[15:44:19] <Blecha> ah gotcha
[15:46:20] <Blecha> Weird this doesn't seem too bad
[15:46:44] <Blecha> while ( !( UCSRnA & (1<<UDREn)) ) ; UDRn = data;
[16:04:07] <Blecha> OndraSterver did you see that code i posted?
[16:04:12] <Blecha> datasheet seems to say its fairly easy to do
[17:14:10] <OndraSter> I found probably this in my drawer
[17:14:11] <OndraSter> http://serdisplib.sourceforge.net/ser/i2c_ericssont2x.html
[17:14:19] <OndraSter> I do wonder how would one go about connecting that ribbon cable?
[17:14:29] <OndraSter> I thought about grabbing blank PCB and scrapping some lines in it
[17:14:49] <OndraSter> I am pretty sure I will not find the original board from the phone :P
[17:36:49] <xata> anyone got ready-to-go 100% working firmware to test serial connection with pc?
[17:38:35] <xata> also avrdude is awesome. pity there is no good enough ide for linux
[17:39:02] <xata> OndraSter: \o
[17:40:03] <specing> xata: arduino?
[17:41:04] <xata> specing: no, atmega32+max232
[17:41:24] <xata> connected to com-port
[17:41:32] <OndraSter> lolCOMport
[17:41:33] <specing> arduino doesen't mfq its own chips
[17:41:34] <OndraSter> who has one now?
[17:41:38] <specing> Me
[17:41:45] <specing> I have a machine with two actually
[17:41:50] <specing> on the back
[17:41:53] <OndraSter> actually my server has got it as well
[17:41:56] <OndraSter> because it is el-cheapo motherboard
[17:41:59] <OndraSter> was-
[17:42:01] <OndraSter> was*
[17:42:02] <OndraSter> years ago
[17:42:28] <specing> Heh
[17:42:36] <OndraSter> G31 chipset
[17:42:40] <OndraSter> already recapped it
[17:42:50] <xata> OndraSter: i have one. i just don't have way to use ft232 since it surface-mount only
[17:42:59] <OndraSter> do you have arduino?
[17:43:30] <OndraSter> *any* arduino that uses ft232
[17:43:33] <xata> OndraSter: no. try to remember me, i am a guy that tries to make a synth on atmegas
[17:43:38] <OndraSter> oh
[17:43:56] <OndraSter> well I do have arduino as well (but can't find the damned mega328 that I took out from lol)
[17:44:01] <OndraSter> just as I do have netduino :P
[17:44:15] <OndraSter> I wanted to suggest to pop out the chip from the arduino and hook up your own mega to the RX/TX pins
[17:44:38] <OndraSter> that's what I do at least once a week
[17:46:17] <xata> OndraSter: but max232. even st232. with atmegas. uart. com-port. any 100%-working code to check connection and circuity? repeater for ex.
[17:46:37] <OndraSter> well
[17:46:55] <OndraSter> while(data is ready on serial) UDR = UDR;
[17:47:43] <xata> i guess how to make it in abstract. but i need a ready and checked code, so i can not make any mistakes
[17:47:58] <OndraSter> use ASM then :D
[17:48:16] <OndraSter> you know that gcc won't deoptimize the code
[17:48:19] <OndraSter> you'll
[17:48:20] <OndraSter> -
[17:48:21] <OndraSter> *
[17:48:30] <OndraSter> (bloody altgr not working when I need it)
[17:48:42] <xata> why would i? i don't need a solution of my problem. i need a test-code to test circuit with cutecom. you get it?
[17:49:22] <xata> *of my code problem
[17:50:43] <OndraSter> well appearantly there is nobody with it
[17:50:53] <OndraSter> let alone with the fact that each chip has got different bits in different registers
[17:52:02] <xata> OndraSter: uart is different on avr? oh come on
[17:52:13] <OndraSter> no, but the registers might not be the same
[17:52:18] <OndraSter> some bits might be in different registers
[17:52:25] <OndraSter> on mega328 or mega32 for example
[17:52:43] <xata> OndraSter: also, how is your synth you made once? sold it?
[17:52:46] <xata> m32
[17:52:55] <OndraSter> I did not finish that project
[17:53:06] <OndraSter> it was lab wave gen, I put that into the freezer
[17:53:24] <xata> but you already had a pcb
[17:53:39] <OndraSter> no I had only PCB design
[17:53:53] <xata> so what was a weak point?
[17:53:54] <OndraSter> and then I realized that I had there one major issue
[17:54:04] <OndraSter> plus I then switched to different micro
[17:54:12] <OndraSter> and had to re-lay the board
[17:54:16] <OndraSter> and do everything again
[17:54:23] <OndraSter> that was where XBoard project came up
[17:57:33] <Tom_itx> what is UPnP?
[17:57:41] <Tom_itx> in regard to wireless
[17:58:16] <OndraSter> automatic settings of port forwarding IIRC
[17:58:25] <OndraSter> or something with forwarding traffic on router
[17:59:24] <xata> just like i tried to connect 24c16 to two atmegas, so that one could write, and other could read to send info to lcd. not so needed feature, but i droped it because i got annoyed by bugs. now i am trying to make a controller for live performances, and synth is on suspend
[18:01:06] <xata> puredata + 8 pots on adc + 16 buttons on other ports = enough for good performance
[18:02:15] <xata> maybe i'll use multiplexers one day for moar pots and buttons, but the main point of concept is in simplicity and low cost
[18:03:47] <jadew> for anyone who used bus pirate: how do you work as a slave on it? I don't know how to implement that in my ghetto bus pirate since you can't really answer any queries from the master in a resonable time
[18:03:57] <xata> if i'll do this - it will cost ~15 without case
[18:04:55] <xata> * ~$15
[18:05:59] <xata> i even started a project on googlecode, hehe
[19:05:39] <ferdna> in this fuse:
[19:05:41] <ferdna> http://c.fixya.net/fixya20/uploads/Images/A25A428.jpg
[19:05:51] <ferdna> 32 is the voltage rated...
[19:05:59] <ferdna> however is 32 AC or DC?
[19:09:52] <R0b0t1> Well, what kind of circuit? I usually end up assuming DC.
[19:10:15] <R0b0t1> I've seen DC fuses used for AC power, as well, which actually isn't really a bright idea is it?
[19:10:24] <OndraSter> 32V peak
[19:10:32] <OndraSter> BUT
[19:10:33] <OndraSter> yes
[19:10:35] <OndraSter> wait
[19:10:41] <OndraSter> voltage on diode?
[19:10:53] <OndraSter> don't fuses fuse current?
[19:20:37] <ferdna> OndraSter, the max voltage rating.
[19:20:46] <ferdna> so will that be AC or DC?
[19:21:17] <OndraSter> peak voltage
[19:21:22] <OndraSter> I presume
[19:21:32] <OndraSter> (and I ment to say "voltage on fuse?")
[19:21:50] <OndraSter> well, either DC and thus RMS
[19:21:59] <OndraSter> or AC peak
[19:22:11] <OndraSter> I have never seen such fuse though
[19:22:20] <OndraSter> let alone fuse that reacts on VOLTAGE?!
[19:25:04] <ferdna> i need 500mA fuses
[19:25:22] <ferdna> but i dont know what voltage the max should be... if for ac or dc
[19:25:22] <ferdna> ...
[19:25:41] <ferdna> so i could order from digikey
[19:25:51] <ferdna> look:
[19:25:51] <ferdna> http://www.fixya.com/support/t340808-nintendo_ds_f2_blown
[19:28:20] <R0b0t1> OndraSter: Well, a 5A fuse responds differently to 5A 10V and 5A 100V...
[19:29:07] <ferdna> right
[19:29:15] <ferdna> so that is why i want to ge the right fuse
[19:29:23] <ferdna> the fuse is right where the AC connects
[19:29:28] <OndraSter> R0b0t1, yes
[19:29:38] <OndraSter> but ordinarily you are more interested in the peak A
[19:29:39] <ferdna> so i believe my fuse should be 30V AC max...
[19:29:57] <OndraSter> I've seen SMD fuses only as those white "boxes"
[19:30:03] <OndraSter> never as 1206 or 0805 SMD
[19:30:13] <OndraSter> those would be polyfuses
[19:31:26] <ferdna> these are 0603
[19:32:16] <ferdna> let me get a screen
[19:36:55] <ferdna> OndraSter, look:
[19:36:59] <ferdna> http://i.imgur.com/xX9LV.jpg
[19:37:14] <ferdna> should i select 32 on AC and DC?
[19:37:24] <ferdna> or should i go with a higher value on DC?
[19:43:47] <OndraSter> no idea mate at all, never seen this :)
[19:45:14] <Tom_itx> are you wanting a smd fuse?
[19:47:05] <ferdna> Tom_itx, yes
[19:47:28] <Tom_itx> F1226CT-ND
[19:47:39] <Tom_itx> i got some of those once
[19:47:48] <Tom_itx> you can replace the fuse that way
[19:48:05] <ferdna> Tom_itx, those are monsters
[19:48:05] <Tom_itx> http://www.digikey.com/product-search/en/circuit-protection/fuses/655421?k=F1226CT-ND
[19:48:11] <Tom_itx> ok
[19:48:12] <ferdna> they handle too much current
[19:48:40] <ferdna> Tom_itx, is there any way you can tell me what the 32 on top of the fuse of the picture i submitted means?
[19:48:49] <ferdna> http://www.fixya.com/support/t340808-nintendo_ds_f2_blown
[19:49:09] <ferdna> http://c.fixya.net/fixya20/uploads/Images/A25A428.jpg
[19:49:48] <Tom_itx> i'm not sure
[19:50:28] <ferdna> Tom_itx, http://www.digikey.com/product-search/en/circuit-protection/fuses/655421?k=fuse
[19:52:10] <OndraSter> Tom_itx, I have finally found a toaster oven
[19:52:11] <OndraSter> http://img06.allegroimg.pl/photos/oryginal/25/30/28/23/2530282307
[19:52:14] <OndraSter> $13 shipped :)
[19:52:31] <Tom_itx> you asked me about that one
[19:52:58] <OndraSter> really?
[19:53:00] <Tom_itx> you can use the timer for an on off switch
[19:53:01] <Tom_itx> yes
[19:53:07] <Tom_itx> that's what i do
[19:53:15] <Tom_itx> turn it all the way up
[19:53:17] <OndraSter> I thought you had it completely micro driven
[19:53:22] <Tom_itx> i do
[19:53:31] <Tom_itx> i just use the timer as an on off switch
[19:53:39] <OndraSter> ah
[19:53:52] <OndraSter> no standby clock? :(
[19:53:55] <ferdna> Tom_itx, http://i.imgur.com/F6mrk.jpg
[19:53:59] <Tom_itx> by turning the time way up so it never shuts off
[19:54:05] <ferdna> look those two fuses dont have an AC Max Rating..
[19:54:29] <Tom_itx> what's the fuse rated for?
[19:55:37] <ferdna> 0603 size, 500mA, fast blow fuse
[19:55:42] <ferdna> 32V
[19:55:48] <ferdna> but dont know if AC or DC
[19:56:04] <Tom_itx> it would probably be dc in that circuit
[19:56:34] <Tom_itx> that's not a 'Z3' is it?
[19:56:43] <ferdna> nop...
[19:56:47] <ferdna> 32 very clearly
[19:56:56] <Tom_itx> ok
[19:57:06] <ferdna> ok... going to order this ones then:
[19:57:06] <ferdna> http://www.digikey.com/product-detail/en/MFU0603FF00500P100/MFU0603.50CT-ND/1206527
[20:15:11] <jadew> lol, in "Terra Nova", they had a burnt chip (thumb nail size), so they took it to someone to fix it
[20:20:54] <k-man> what do i have to do to get an attiny85 to run at 8Mhz. I have the correct circuitry in place but I think I'm missing something with the fuses and or clock multipliers?
[20:21:11] <k-man> i cleared the ckdiv8 fuse but that seemed to make no difference
[20:21:14] <Casper> ckdiv8 ?
[20:21:28] <Tom_itx> k-man what the ghost said
[20:21:42] <Tom_itx> it is set by default
[20:22:09] <k-man> Casper, it definately seems like thats the problem, but as i said I cleared it (or at least attempted to, maybe i did it wrong?) but it still runs too slow
[20:22:19] <Tom_itx> also if you're using timers etc specify F_CPU
[20:22:20] <k-man> do i have to set a clock multiplier somewhere?
[20:22:32] <k-man> Tom_itx, yeah, i did specify that in my code
[20:24:18] <jadew> if you run it off of the internal clock and you remove ckdiv8, it will run at 8mhz
[20:27:09] <k-man> jadew, its got an external ceramic resonator
[20:27:32] <jadew> that still applies
[20:27:35] <k-man> its one of these attiny header boards: http://tinkerlog.com/2009/01/18/attiny-breadboard-headers/
[20:28:34] <k-man> here is my code: http://pastie.org/4415278
[20:29:31] <k-man> to my inexperienced eye it looks ok
[20:29:43] <jadew> it ddoes look ok
[20:29:54] <jadew> so what happens when you run it?
[20:30:04] <jadew> how do you know it's not running at 8Mhz?
[20:30:40] <k-man> it flashed the LED at around 1/10 hz
[20:30:48] <k-man> ie, on for 5s off for 5s
[20:31:03] <k-man> s/flashed/flashes
[20:31:47] <Tom_itx> what's the timer prescalar set to?
[20:31:54] <k-man> so i don't know its not running at 8Mhz, just thats my guess due to the flash frequency. I don't have a cro to test but I'm going to the hacker space on Tuesday night so i can test it then
[20:32:05] <jadew> what is the lfuse set to?
[20:32:14] <k-man> Tom_itx, good question, I don't know. I will read up on that
[20:32:32] <jadew> Tom_itx, he's not using a timer
[20:32:48] <Tom_itx> read the fuses
[20:32:53] <Tom_itx> ok
[20:32:54] <k-man> 0b0100010
[20:33:01] <k-man> thats the low fuse
[20:34:07] <jadew> you have ckddiv set
[20:34:12] <jadew> http://www.engbedded.com/fusecalc/
[20:34:15] <k-man> jadew, i do?
[20:34:25] <jadew> 0100010 translates to 0x22
[20:34:54] <jadew> if you put that in the low fuse text box it will show you that you have that thing set
[20:35:44] <CapnKernel> jadew: break it up into two nibbles: 0b0100010 -> 0b010 0010
[20:36:00] <CapnKernel> Give each a place value of 8421
[20:43:52] <OndraSter> CapnKernel, I always have a Q for you but you are never here
[20:43:57] <OndraSter> and whe nyou appear I meanwhile forget the Q
[20:44:13] <CapnKernel> I know what the question is.
[20:44:22] <OndraSter> hmm?
[20:44:30] <jadew> that's why he leaves when you're about to ask!
[20:44:36] <CapnKernel> "Why can't I remember the question when you're around?"
[20:45:03] <k-man> so on this attiny header thing, i think i effectively get 3 useable i/o pins, 2 are taken for power, and two for the crystal and 1 for the reset pin. so given there are 3 i/o pins, can i somehow multiplex reading 3 buttons outputting to turn LEDs on and off
[20:45:30] <jadew> lol k-man, yeah
[20:45:51] <jadew> that's why you usually run the 8 pins ones off of the internal rc
[20:46:01] <Tom_itx> well try a tiny10 some time
[20:46:05] <Casper> k-man: is there an ADC pin?
[20:46:17] <OndraSter> try a tiny4!
[20:46:18] <jadew> yeah, I think the 85 has one
[20:46:21] <OndraSter> ye
[20:46:30] <Casper> few resistor voltage divider
[20:46:31] <k-man> yeah, pin 1
[20:46:45] <Casper> a button on each junction, to your ADC pin
[20:46:53] <k-man> oh yeah
[20:47:04] <Casper> ex: R-R-R 1/3 2/3VCC would be your 2 buttons
[20:47:20] <OndraSter> interesting approach, Casper
[20:48:15] <Casper> many devices actually do it
[20:48:25] <k-man> what about toggling the pin between input and output, quickly scan the keys, then switch back to output and drive the LEDS?
[20:48:49] <OndraSter> and when you press the button the LED goes on?
[20:48:50] <Casper> like those which when you press a button and the button is dirty.... and it start to do weird things
[20:49:06] <Casper> there is some way around that
[20:49:27] <Casper> select the resistor in such a way that there will never be enought voltage for the led
[20:49:28] <Casper> but
[20:49:35] <Casper> it would turn it off when you press the button
[20:49:40] <jadew> Casper, damn, that makes sense now
[20:49:50] <Casper> however
[20:49:57] <Casper> there is also other ways
[20:50:33] <Casper> if only you had 4 pins...
[20:50:57] <Casper> you could have used some shift registers
[20:51:05] <Casper> bath time, bbl
[20:51:08] <k-man> Casper, yeah
[20:51:23] <OndraSter> I pushed maximum out of attiny13a
[20:51:25] <OndraSter> 12 LEDs
[20:51:26] <OndraSter> one ADC
[20:51:28] <OndraSter> 1 button
[20:51:47] <OndraSter> running off a coin cell
[20:52:10] <k-man> nice
[20:56:22] <jadew> damn, I didn't know atmega168 and 328 were the same size and had the same pinout as atmega8
[20:56:39] <OndraSter> do they have the same pinout?
[20:56:43] <jadew> the shop where I'm buying my stuff from has the wrong picture
[20:56:44] <jadew> yeah
[20:56:47] <OndraSter> oh
[20:56:53] <OndraSter> I thought that mega8 was smaller by few pins
[20:57:05] <OndraSter> oh wait
[20:57:08] <OndraSter> 328 isn't 40 DIP
[20:57:13] <jadew> nope, 28
[20:57:21] <OndraSter> ah
[20:57:23] <OndraSter> makes sense :)
[20:57:32] <k-man> damn i hate winzip
[20:57:36] <k-man> why do people use it?
[20:57:43] <jadew> k-man, they don't
[20:57:47] <OndraSter> nobody does
[20:57:53] <k-man> eagle's installer is in winzip
[20:58:00] <OndraSter> self extracting
[20:58:05] <k-man> yeah
[20:58:09] <OndraSter> at least that
[20:58:19] <jadew> windows can deal with zip files by itself and I think most people are using 7-zip nowdays
[20:58:41] <k-man> jadew, strange that eagle would pay for winzip
[20:58:44] <k-man> anyway
[20:59:01] <jadew> I'm sure the guys at eagle are earning a lot off of that program
[20:59:15] <jadew> enough to pay for winzip :P
[20:59:27] <OndraSter> yeah, because torrents are paid :D
[20:59:30] <OndraSter> jk
[20:59:32] <jadew> hehe
[20:59:48] <jadew> damn, I wish I knew about the 138 and 328 before I made my last order
[20:59:51] <jadew> it came in today :/
[21:00:27] <jadew> at least I don't have to worry about cutting features out of my ghetto bus pirate
[21:00:40] <jadew> I'll just upgrade next time I do the shopping
[21:00:53] <OndraSter> almost 4 o'clock
[21:00:53] <OndraSter> gn
[21:01:00] <jadew> night
[21:05:49] <k-man> this is the circuit diagram for the attiny header board I have: http://skitch.com/e-jasonblewis/emuyd/clipboard04
[21:06:43] <k-man> can i use pin 1 as an input switch rather than a reset switch?
[21:07:15] <jadew> yeah, if you don't plan to write any new code to it again
[21:07:24] <k-man> oh
[21:07:43] <k-man> but err.. doesn't the ISP programmer somehow reest it?
[21:07:58] <jadew> using the reset pin :)
[21:08:10] <k-man> jadew, ah... thats a problem then ;)
[22:26:47] <PlastyGrove> so with an atmega328 that has 32k, and I declare a global variable, where does it get stored? in the 2K SRAM that it has?
[22:27:28] <Casper> yes
[22:27:43] <Casper> is it really some constant? or is it true variable stuff?
[22:28:11] <PlastyGrove> a lot of constants, bit-fonts for about 36 characters :(
[22:28:40] <PlastyGrove> and maybe more for patterns and logos and stuff
[22:28:43] <PlastyGrove> for an LED display
[22:29:13] <PlastyGrove> dam, my code will never hit 32k, anyway I can use that space for storage?
[22:29:20] <Casper> is speed a major issue?
[22:29:43] <Casper> http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html
[22:29:50] <PlastyGrove> Casper: Unfortunately yes, using shift registers to do persistence of vision
[22:30:22] <Casper> if you can live with some slowdown, storing in flash might work
[22:30:42] <Casper> pgmspace could get usefull
[22:31:50] <PlastyGrove> hmm ... well, I see a lot of pgm_reads but no pgm_writes in teh link you sent
[22:32:30] <PlastyGrove> i'm guessing its' only for reading stuff from the flash mem at a particular location?
[22:34:48] <PlastyGrove> Also, I'm interested in knowing what's the rationale behind this design decision? I know there's another 1K EEPROM available as well, but that's dreadfully inadequate, just 3K for a program that takes 32K? I'd rather have it 16 and 16 :(
[22:37:17] <Casper> eeprom and flash is 2 different kind of memory
[22:38:54] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/abcminiuser/articles/progmem_basics_index.php
[22:40:31] <PlastyGrove> Tom_itx: Thanks for the link, detailed explanations :)
[22:41:38] <PlastyGrove> Casper: you mean because eeprom and flash work independent from each other? I just meant, worst case, I'd end writing a program to store some data in EEPROM that another program can use
[22:44:33] <Casper> PlastyGrove: apple and oranges
[22:44:48] <Casper> not only they work independently, but they are also of different type
[22:45:00] <Casper> and also different write endurance
[22:45:12] <Casper> speed, and addressing
[22:46:42] <PlastyGrove> Casper: Hmm, I see what you're saying
[22:46:59] <PlastyGrove> eeprom will probly have to read into flash first
[22:47:33] <PlastyGrove> so won't help my speed
[22:47:39] <PlastyGrove> or space
[22:51:21] <Casper> space yes, speed no way
[23:28:48] <ferdna> 100Mhz vs 150Mhz oscilloscope probes..
[23:28:55] <ferdna> should i go with the 150 ones?
[23:31:51] <Richard_Cavell> ferdna: Well do you need to measure anything that's close to that frequency?
[23:35:04] <ferdna> no, no... but i want to be prepared
[23:35:18] <ferdna> the 150mhz and the 100mhz... are a few dollars apart
[23:35:41] <ferdna> so i dont want to regret getting the 100mhz ones and then needing the 150mhz later on
[23:38:50] <PlastyGrove> very informative read on progmem, this is pretty much what I was looking for