#avr | Logs for 2012-01-05

Back
[07:14:32] <Bushman> ave
[09:51:53] <OndraSter_> huh, does SPM work when JTAGging?
[09:51:59] <OndraSter_> first time I did page erase, worked fine
[09:52:12] <OndraSter_> second time I tried page erase, the SPMCSR never clears
[09:52:22] <OndraSter_> SPMCR*
[09:52:36] <OndraSter_> SPMEN and PGERS bits stay in 1
[09:53:47] <OndraSter_> actually the first time the SPM is ran, it gets set
[09:53:51] <OndraSter_> and never flips back
[10:00:44] <Bushman> hmm...
[10:01:06] <Bushman> that indid sounds weird
[10:01:25] <OndraSter_> maybe..
[10:01:32] <OndraSter_> I used LDS instead of IN instruction
[10:01:47] <OndraSter_> and now JTAG won't connect... but I can modify FUSEs and flash in ISP mode... grr
[10:01:48] <Bushman> does anyone understands a word from what he said?
[10:01:59] <OndraSter_> :D
[10:02:12] <Bushman> ;]
[10:02:42] <Bushman> i'm glad i improved your mood, now you can go and debug it for some more time XD
[10:06:39] <Bushman> but seriously, you should doublecheck for compatibility
[10:06:49] <Bushman> maybe that's just it
[10:06:56] <OndraSter_> hah, the problem was really in the LDS vs IN instructions
[10:07:15] <OndraSter_> considering that there is the hack with +0x20 addresses in IN/OUT vs data space addressing
[10:07:21] <OndraSter_> it was reading wrong register
[10:07:23] <OndraSter_> :P
[10:08:17] <OndraSter_> either DDRB or something in memory, who knows (I don't)
[11:31:58] <nofxx> Recapitulating some avr-gcc macros here... lil doubt: PORTBx == PBx ?
[12:41:57] <OndraSter_> huh, I am sending some strings over uart (9600baud), the CPU is clocked on 1MHz, UBR value is 12
[12:42:04] <OndraSter_> but when I do it with auto-stepping through debug
[12:42:08] <OndraSter_> it sends the string fine
[12:42:13] <OndraSter_> when I let it go on "full speed"
[12:42:20] <OndraSter_> it transmits only one or two bytes :/
[12:42:39] <Kevin`> OndraSter_: are you checking that the transmitter is done transmitting before telling it to transmit the next byte?
[12:42:45] <OndraSter_> yes
[12:42:59] <Kevin`> without the typos? ;)
[12:43:05] <OndraSter_> yes
[12:43:09] <OndraSter_> (what typos?)
[12:43:39] <Kevin`> wow, that's pretty good. I always end up with at least a few typos or logic errors in a project
[12:43:51] <OndraSter_> :D
[12:44:16] <OndraSter_> I have written simple bootloader that allows flashing pretty much without knowing what I am doing.... now I ported it to smaller atmega and I am trying it out
[12:44:22] <OndraSter_> it is pure ASM
[12:44:26] <OndraSter_> it works
[12:44:31] <OndraSter_> but I have yet to try out the main flashing :P
[12:44:36] <OndraSter_> page erase works fine though
[12:54:45] <OndraSter_> guys, is the original JTAG ICE 3 worth it?
[12:54:49] <OndraSter_> I mean, it is $199!
[12:54:51] <OndraSter_> or $299?
[12:55:02] <Steffanx> 199
[12:55:24] <Steffanx> Not sure if it's really worth it
[12:55:34] <Steffanx> Depends on how many AVR's you want to use
[12:55:35] <OndraSter_> because mkii is $100 higher
[12:55:38] <OndraSter_> few
[12:55:48] <Steffanx> Oh, the ice 3 is probably even better/faster
[12:55:48] <OndraSter_> the thing is, I got JTAG ICE from ebay
[12:55:53] <OndraSter_> yeah
[12:55:59] <OndraSter_> it works with the atmega128a (my target)
[12:56:01] <OndraSter_> or should
[12:56:07] <OndraSter_> but I am trying it on atmega32 right now
[12:56:08] <Steffanx> The open source support is probably worse
[12:56:37] <OndraSter_> and it is driving me nuts. You have to fiddle with it every single time you want to use it
[12:56:44] <OndraSter_> like restart avr studio, re-connect the dongle etc
[12:56:55] <OndraSter_> I got cheap knockoff, but I am not sure if it is the problem
[12:58:10] <OndraSter_> the only last option is to get original JTAG ICE and use USB <> serial TTL levels converter
[12:58:18] <OndraSter_> I ain't trying to find RS232 on my board
[12:58:26] <OndraSter_> I know it _is_ there, it is in BIOS
[12:59:07] <Kevin`> OndraSter_: why won't the dragon work for you?
[12:59:12] <OndraSter_> hmmm dragon?
[12:59:13] <OndraSter_> how much?
[12:59:17] <Kevin`> $50
[12:59:20] <OndraSter_> hmm
[12:59:26] <Kevin`> works with everything, programming and debugging
[12:59:31] <Kevin`> well, everything 8/16 bit
[12:59:39] <amee2k> "every" everything?
[12:59:45] <amee2k> including dW?
[12:59:49] <Kevin`> yes, including dw
[12:59:53] <amee2k> nice
[12:59:54] <Kevin`> and the high voltage interfaces
[13:00:21] <OndraSter_> and can you connect it to your own device?
[13:00:56] <amee2k> if it works as an I2C adapter for the computer too, i'll order one
[13:02:04] <Kevin`> amee2k: sounds like you want a bus pirate
[13:02:10] <OndraSter_> $81 here
[13:02:24] <amee2k> not really
[13:02:48] <amee2k> before i blow money on a buspirate i build an i2c-tiny-usb
[13:02:58] <Kevin`> everyone should have a bus pirate though, it's the fastest way to make many things work
[13:03:12] <Kevin`> no writing your own software for some random common interface you need to use for a few minutes
[13:03:18] <amee2k> i already have flashed tiny45 with the firmware somewhere here because i played with it last summer
[13:03:19] <OndraSter_> avr dragon: "for devices with upto 32kB flash"
[13:03:26] <OndraSter_> yet I see in supported all the 128kB and such
[13:03:30] <Kevin`> OndraSter_: that's no longer a limitation
[13:03:32] <OndraSter_> ok
[13:04:18] <Kevin`> OndraSter_: the downside of the dragon is it's slower than the expensive devices and it doesn't have very robust electrical fault protection for itself (don't go connecting the io pins to -12v)
[13:04:26] <OndraSter_> haha
[13:04:29] <OndraSter_> -12V to IO pins
[13:04:31] <OndraSter_> you tried that?
[13:05:26] <Kevin`> well, +12v in my case. which is actually easier to do than you might think, since the device can generate it for HV programming. I managed to do it the stupid way though, by touching a wire on a power supply
[13:05:41] <OndraSter_> ouch
[13:06:30] <amee2k> Kevin`: what keeps putting me off about the bus pirate is that considering its theoretical features it can't possibly have adequately supported drivers for all the protocols
[13:06:47] <amee2k> so it would just move the fiddling from the hardware part of the interface i need to the software
[13:07:39] <Kevin`> support for jtag in $common_jtag_software_forget_names and bios rom chip programming in flashrom was enough for me
[13:08:20] <amee2k> i'm mainly interrested in dW and i2c, since i expect to be using these on upcoming projects
[13:10:28] <OndraSter_> so, how much would be shipping from Atmel store...
[13:10:29] <amee2k> but also all the other stuff they're advertising, like 1-wire, midi, ADC, frequency measurement, sniffer and what not
[13:10:56] <amee2k> and i haven't seen any actual drivers for any of these so far
[13:11:15] <karlp> still, the niceish thing is that once it's done once, it gets into the main body
[13:11:26] <karlp> I thought freq measurement and 1 wire were already in?
[13:11:43] <karlp> dW is a whole other ball game
[13:11:49] <amee2k> places selling them say so anyway
[13:12:19] <amee2k> as i said, i'm not worried about the hardware which i'm sure can do what they say
[13:12:33] <Kevin`> amee2k: the device's interface to the computer is an interactive console that you can use directly depending on your bandwidth needs
[13:12:42] <amee2k> but like all host computer based stuff it is useless without reasonably functional drivers
[13:12:44] <OndraSter_> so, is avr dragon worth it?
[13:13:01] <amee2k> o.O
[13:13:09] <OndraSter_> I AM CHEAP STUDENT! :D
[13:13:44] <amee2k> you're not serious, right?
[13:13:49] <OndraSter_> :)
[13:13:52] <Kevin`> OndraSter_: if you need/want debugging, yes. if you just want to programming common-range attiny/atmega devices, you might be ok with an isp-only programmer or that avrisp2 clone thing
[13:14:03] <Kevin`> OndraSter_: I recommend having one
[13:14:09] <OndraSter_> avrisp2 costs nearly the same :D
[13:14:16] <amee2k> or it at least has some other proper interface mode so i don't need to script some kind of crappy hardware shell
[13:14:20] <OndraSter_> is it just me, or is there no shipping information on atmel store
[13:14:20] <Kevin`> OndraSter_: keyword clone
[13:14:34] <OndraSter_> $17 is the clone
[13:14:39] <OndraSter_> I want debugging, yes
[13:14:50] <nofxx> If someone can have a look, trying PWM on Attiny... http://codepad.org/iE8Nwfx1
[13:14:53] <Kevin`> who's that guy in the channel that sells the clone? I forget :(
[13:15:02] <OndraSter_> Tom_itx is selling some programmers
[13:15:08] <Kevin`> yeah that's him
[13:15:26] <amee2k> or how am i supposed to keep up with most of the busses there when typing on a terminal
[13:15:39] <Kevin`> nofxx: is there some reason you aren't doing the pwm entirely in hardware using the timer compare outputs?
[13:15:54] <nofxx> Kevin`: lack of knowledge
[13:16:23] <Kevin`> in that case it turns into set a bunch of registers; cpu_sleep_mode_forever;
[13:16:51] <karlp> I recommend leaving avr and moving to things with onboard standardized debug modules.
[13:17:02] <karlp> but if you want debugging beyond prints and leds, then yes, the dragon is a good deal
[13:17:41] <Kevin`> oh I see, you are changing the pulse width. I guess you can't sleep forever then, just in-between new widths
[13:19:23] <nofxx> Kevin`: Just to make sure I got this right... I got 2 timers on the tiny TCCR0A and B. I use one for the ISR (still to find out why use it instead of just the main loop, save batt some kinda of sleep?). And the other one I use to set a pwm on any pin I want. Is that correct?
[13:20:13] <OndraSter_> okay, does anybody know the shipping from atmel's store to europe? I can't seem to find it o_O
[13:20:26] <Kevin`> nofxx: indeed you can save power, but you can also get exact timing using it, instead of having to count cycles
[13:20:51] <Kevin`> nofxx: you shouldn't be using _delay_* if you want that efficiency of course, needs to be event driven for that stuff too
[13:21:03] <Kevin`> 4ms is a LOT of cpu cycles
[13:21:42] <karlp> OndraSter_: why not get it from here instead: http://eu.mouser.com/ProductDetail/Atmel/ATAVRDRAGON/?qs=sGAEpiMZZMuqBwn8WqcFUrJpNfHeJ8cZ%252bcBP4YnA8%252bs%3d
[13:21:48] <karlp> shipping is then as fast as you pay for
[13:22:17] <OndraSter_> hmm
[13:22:21] <OndraSter_> I mean shipping $$
[13:22:57] <nofxx> Kevin`: yeah, delay + ISR was bothering me ... I just can't see the link... where I say like PB0 should be the OCR0x value
[13:23:24] <OndraSter_> nvm
[13:23:25] <OndraSter_> found it
[13:23:33] <nofxx> plain simple.. no fancy fade loops, just set PB0 50%, how that goes?
[13:23:39] <OndraSter_> 40 EUR
[13:23:40] <OndraSter_> shipping
[13:23:41] <OndraSter_> lol
[13:23:49] <OndraSter_> I have it cheaper to get it locally than mouser
[13:24:09] <Kevin`> nofxx: pb0 means pin0 on port b, and actually will just resolve to 0
[13:24:24] <Kevin`> nofxx: what that line is doing is setting those two pins as outputs
[13:24:57] <OndraSter_> I have it better to order from farnell
[13:25:01] <OndraSter_> shipping is about 4€
[13:25:07] <nofxx> Kevin`: yup sorry, meant "set pin x to 50%"
[13:25:09] <Kevin`> nofxx: if you want 50% output set the compare value to be half of the top value
[13:25:13] * amee2k <3 farnell
[13:25:26] <amee2k> digikey has better prices for some stuff, but shipping is 18EUR
[13:25:31] * amee2k facepalms repeatedly
[13:26:17] <Kevin`> nofxx: alternately of course, have it toggle the pin instead of set/unset, and it will always be 50% but at more variable frequencies
[13:30:53] <OndraSter_> amee2k, where are you from?
[13:31:06] <amee2k> germany
[13:31:12] <OndraSter_> ah right
[13:31:15] <OndraSter_> a lot of Germans here
[13:31:40] <amee2k> seems like digi ships exclusively from their site in minnesota, us
[13:31:57] <amee2k> and above all i heard per air mail
[13:33:06] <amee2k> so except for wider product range in some areas, there is no real advantage in ordering from them unless i can get over the free shipping limit
[13:33:41] <amee2k> which i think i've only managed once on my farnell orders so far, and i'm already collecting as much stuff as i can for these
[13:33:47] <amee2k> i simply don't need that much stuff >_<
[13:50:14] <OndraSter_> hmm
[13:50:26] <OndraSter_> I can order either directly from farnell (should be 5€ shipping through UPS)
[13:50:41] <OndraSter_> or through some czech website which is direct sender of this stuff from farnell
[13:50:43] <OndraSter_> about 4€ :D
[13:54:04] <amee2k> i usually order from farnell directly with my student ID
[13:54:48] <amee2k> looks like they accept them generally, or at least as long as it says something technical as the degree course
[13:56:38] <amee2k> they have some company in berlin as german retailer but they only have like 20% of the products that farnell has, and sometimes at up to twice the price
[13:58:31] <amee2k> since i've never ordered from digikey i don't know what kind of ID they need from you
[14:24:10] <OndraSter_> avr dragon ordered
[14:34:18] <Kevin`> amee2k: why would farnell need an id? don't they just want money and a shipping address?
[14:36:08] <amee2k> Kevin`: this is germany, remember?
[14:36:22] <amee2k> thats like the european texas or something
[14:37:25] <amee2k> they're wholesale and require proof that you're ordering on behalf of a company, or are a freelancer, retailer or student
[14:54:57] <eatyourguitar> I'm a complete noob to AVR. I want to compile and program the attiny13 but I need to use the reset pin for as an input. I know I can only program the chip once. so my questions is this... can I use the reset pin if I have RSTDISBL=0
[15:04:38] <OndraSter_> if the reset pin is set as IO pin, you can not use it as reset anymore
[15:06:45] <RikusW> and cannot use ISP as well...
[15:08:08] <OndraSter_> yap
[15:08:14] <OndraSter_> only high voltage serial programming
[15:08:21] <OndraSter_> = not that fun, if you have it in target board
[15:08:23] <OndraSter_> :P
[15:08:35] <OndraSter_> I thought about making some SIMPLE SMALL bootloader that would fit 100 - 150 bytes
[15:08:38] <OndraSter_> for attiny13s
[15:08:49] <OndraSter_> but
[15:08:57] <OndraSter_> attiny = no hardware SPI, I2C, UART, ...
[15:09:05] <OndraSter_> (except hardware SPI for flashing)
[15:09:27] <RikusW> or hvpp
[15:09:39] <RikusW> hvsp for attiny
[15:09:39] <OndraSter_> hvpp won't work on attiny, hvsp only
[15:09:42] <OndraSter_> yap
[15:09:51] <OndraSter_> but hvpp = bad idea, when it is already in target project board
[15:09:53] <OndraSter_> :P
[15:10:03] <RikusW> i did that once
[15:10:24] <RikusW> some idiot disabled jtag and spi fuses.....
[15:10:30] <OndraSter_> hehe
[15:10:38] <RikusW> there was no other way and 40 boards like that
[15:10:40] <RikusW> m128
[15:10:45] <OndraSter_> wow
[15:10:51] <RikusW> only just managed to make the connections
[15:11:21] <OndraSter_> I disable JTAG, when I am finished, through JTD bit in MCUCSR right after boot
[15:11:30] <OndraSter_> when I am finished with the project, in last version
[15:11:39] <OndraSter_> and keep SPI open
[15:11:49] <OndraSter_> as... working
[15:11:53] <RikusW> jtag do need reset then JTD is set....
[15:11:58] <OndraSter_> I know
[15:12:00] <RikusW> otherwise it doesn't
[15:12:03] <OndraSter_> I know
[15:12:10] <OndraSter_> but if you can use JTAG, you have bigger chip :)
[15:12:28] <kall5> I'm having a really weird problem. Everything works just fine, but when I try to print a string to UART (that's not in PROGMEM) the output gets corrupted. Any ideas? (avr-gcc, atmega168)
[15:12:29] <RikusW> I have a jtag mki clone
[15:12:36] <RikusW> want it ?
[15:12:43] <OndraSter_> have one, it is crap
[15:12:59] <OndraSter_> kall5, wrong speed settings?
[15:13:02] <RikusW> mine fit on any m8 or m328...
[15:13:10] <RikusW> open source too ;)
[15:13:16] <OndraSter_> I used it on m32
[15:13:16] <kall5> OndraSter_: maybe, but PROGMEM-strings work just fine.
[15:13:42] <OndraSter_> oh kall5 ... try debugging and see, if they are actually even loaded correctly into the UDR register
[15:13:51] <RikusW> OndraSter_: in AS4 or on Linux + avarice ?
[15:13:57] <OndraSter_> in AS4
[15:14:02] <OndraSter_> the thing is
[15:14:06] <kall5> yeah, will try that, thanks! just not used to !avrstudio setup..
[15:14:07] <OndraSter_> it sometimes didn't connect
[15:14:22] <OndraSter_> sometimes it couldn't do OCD, just download code and change FUSEs
[15:14:46] <RikusW> tried lowering the jtag clock ?
[15:14:47] <OndraSter_> and in the end the power lines got busted (NO idea how) and it keeps saying (if it even connects!) that the power is not 1.7V or higher, but 0.0V :P
[15:14:51] <RikusW> to say 500kHz ?
[15:14:57] <OndraSter_> nope
[15:15:02] <OndraSter_> already ordered AVR Dragon meanwhile
[15:15:07] <OndraSter_> I want AVR Studio 5 support anyway
[15:15:15] * RikusW have one, it works nicely
[15:15:54] <OndraSter_> $49 for avr dragon... probably worth it
[15:16:00] <OndraSter_> I need debugWire for attiny13a anyway :P
[15:16:09] <OndraSter_> I GOTTA CATCH 'EM ALL!
[15:16:37] <RikusW> just don't set DWEN + RSTDSBL ;)
[15:17:23] <RikusW> http://www.ruemohr.org/docs/debugwire.html
[15:17:48] <OndraSter_> I've read that many times
[15:17:51] <RikusW> will probably try implementing it sometime
[15:17:57] <OndraSter_> but it is easier for me just to buy avr dragon for $49
[15:18:05] <RikusW> it is
[15:18:22] <OndraSter_> mostly it is faster :P
[15:18:35] <RikusW> actually the pc side sw would be the bigger part of the work...
[15:18:39] <OndraSter_> you still need 2nd part - have your intermediate device communicate with AVR studio :P
[15:18:42] <OndraSter_> oh, custom app
[15:18:51] <RikusW> yes...
[15:19:05] <RikusW> jtagmkii protocol is too complicated...
[15:19:25] <RikusW> and resource hungry for the jtag box...
[15:20:40] <RikusW> OndraSter_: once you have a dragon you can actually mess around with a uart + dw, since you can easily turn it off again...
[15:20:58] <OndraSter_> turn off the dW on the attiny?
[15:21:01] <OndraSter_> why would I do that :P
[15:21:39] <RikusW> once you're done debugging
[15:22:04] <OndraSter_> well I will need just three pins in the end anyway for my project
[15:22:08] <OndraSter_> four maybe
[15:22:11] <OndraSter_> yap, four
[15:22:33] <RikusW> dw cause tiny not to enter sleep mode...
[15:22:41] <OndraSter_> hmm
[15:22:44] <OndraSter_> dang
[15:22:46] <OndraSter_> that's nasty
[15:22:52] <RikusW> so if power consumption is a concern turn it off once done debugging
[15:23:09] <OndraSter_> yeah, power consumption is concern
[15:23:15] <RikusW> or it does enter sleep mode afaik but its not really off...
[15:23:16] <OndraSter_> (one or two 3.7V batteries in parallel)
[15:23:46] <RikusW> DWEN cause some stuff like timers to be always on
[15:43:33] <asteve> what programmer should I get?
[15:44:49] <kall5> as soon as I declare "const * char s = "bla"" and compile without optimizations, there is only garbage printed.
[15:45:01] <kall5> wouldn't that point problems with the .data section?
[15:45:16] <kall5> "bla" is included in the .hex being programmed.
[15:45:34] <OndraSter_> asteve, that depends
[15:45:36] <RikusW> "bla" would be in flash
[15:45:37] <OndraSter_> what do you intend to do
[15:45:43] <RikusW> copied to ram probably
[15:45:52] <OndraSter_> what do you intent to do (flash, debug)
[15:46:02] <asteve> OndraSter_: burn my code onto the chip :); i don't know if i need a debugger
[15:46:08] <OndraSter_> well, neither do we
[15:46:12] <asteve> is there two stages of burning for the atmega?
[15:46:21] <OndraSter_> ? one for burning and the other one...?
[15:46:41] <asteve> two memory types*; can you burn to persistent and non-persistent memory?
[15:47:01] <OndraSter_> you can not write to RAM
[15:47:07] <OndraSter_> as in through ISP
[15:47:13] <RikusW> only flash and eeprom
[15:47:23] <RikusW> or a bootloader
[15:48:35] <asteve> i used to use a USB programmer that burned to flash, I don't remember its name
[15:48:43] <OndraSter_> was it some clone or original?
[15:48:55] <asteve> i'm not sure, it was in a class
[15:49:13] <asteve> i know it had a debugger that i never used
[15:49:27] <RikusW> avrdragon ?
[15:49:58] <asteve> it used JTAG
[15:50:09] <OndraSter_> avrdragon has JTAG
[15:50:13] <RikusW> jtagice ?
[15:50:59] <asteve> RikusW: that looks like it
[15:52:23] <asteve> hmm, $299 is incredibly pricey
[15:53:02] <RikusW> dragon is $50
[15:53:15] <bram1> pffff.... and another western digital disk bites the dust
[15:53:32] <Tom_itx> so stop throwing em across the room
[15:53:32] <RikusW> ssd ?
[15:53:42] <bram1> 1TB5 hdd
[15:53:57] <bram1> three last year, and now the first of 2012
[15:54:08] <OndraSter_> my WD Green 2TB is working for a year now just fine
[15:54:29] <bram1> i've got twelve of them in raid5
[15:54:37] <OndraSter_> wow
[15:55:02] <bram1> if mttbf is 4 years, then statistics say i should replace one every 4 months...
[15:56:22] <asteve> has atmel stopped making the smaller 168 chips?
[15:57:08] <Tom_itx> not that i'm aware of
[15:57:16] <Tom_itx> what do you mean 'smaller'?
[15:57:54] <asteve> i can't seem to find them on the site, does the dragon support the 168 series?
[15:58:01] <Tom_itx> yup
[15:58:07] <Tom_itx> woops
[15:59:06] <Tom_itx> i forget.. is the mega168 debugwire or jtag?
[15:59:18] <asteve> http://www.atmel.com/dyn/products/product_card.asp?part_id=3303&category_id=163&family_id=607&subfamily_id=760
[15:59:44] <asteve> the megaAVR was throwing me off
[15:59:55] <RikusW> m168 got dw
[16:00:29] <Tom_itx> dragon may not do debugwire does it?
[16:00:33] <Tom_itx> i don't know
[16:01:14] <RikusW> it does
[16:01:17] <asteve> does the 328 do jtag?
[16:01:22] <RikusW> and supports m168 it seems
[16:01:26] <RikusW> dw too
[16:01:27] <Tom_itx> it's the same series
[16:01:34] <Tom_itx> 48 88 168 328
[16:01:54] <RikusW> m164/324/644 does jtag
[16:02:02] <Tom_itx> 168p is debugwire
[16:02:03] <RikusW> m324a is quite cheap
[16:02:07] <Tom_itx> so i bet they all are
[16:02:11] <jadew> hey, any idea what kind of interface I need to build to use with usbtiny? do I just wire the miso, mosi, etc to the right pins or there's something else involved there?
[16:02:13] <RikusW> cheaper than m328 actually over here
[16:02:36] <Tom_itx> jadew basically yes
[16:02:41] <jadew> neat
[16:02:42] <Tom_itx> you could use a buffer chip
[16:02:51] <RikusW> miso->miso, no crossover...
[16:02:54] <Tom_itx> i used one
[16:03:00] <jadew> why? there's alredy one on the main pcb
[16:04:00] <jadew> RikusW, yeah, I figured
[16:04:17] <jadew> since the switch is done before the buffer I noticed
[16:04:21] <Rickta59> http://hlt.media.mit.edu/?p=1706 jadew
[16:05:48] <asteve> is there an avr studio equivalent for OSX?
[16:06:01] <jadew> do I really need the cap?
[16:06:17] <Kevin`> asteve: it's possible to use a standard c ide along with the gcc compiler suite for it
[16:06:18] <jadew> there's one on the main board and I'm using the power from the USB to power up the target
[16:06:20] <jadew> so that should do it
[16:06:23] <Rickta59> on the arduino? I think that is just to prevent the reset from happening
[16:06:43] <RikusW> jadew: it does work without extra caps...
[16:07:08] <jadew> cool
[16:07:30] <jadew> thanks a lot
[16:07:40] <Kevin`> it looks really strange that they put a large cap on reset
[16:08:10] <Kevin`> especially since an arduino is designed to run code when you turn it on anyway, right?
[16:08:21] <Tom_itx> it's a tricky business, electronics is...
[16:08:25] <asteve> Kevin`: that's to stop the serial reset from happening
[16:08:39] <RikusW> Kevin`: that cap is for the bootloader
[16:08:48] <jadew> another question, I'm planning to put a button on the target board, that will switch power off for a bit, so I can reset the target controller, should I put it on gnd or vcc to make sure it doesn't get powered from other pins?
[16:09:01] <Kevin`> astev, RikusW why would serial reset happen?
[16:09:02] <Tom_itx> switch vcc
[16:09:02] <RikusW> it is to make the serial line reset the arduino...
[16:09:02] <jadew> I noticed on my getto programmer that even with the power cut off I can still write the damn thing
[16:09:11] <Tom_itx> don't switch gnd
[16:09:14] <RikusW> Kevin`: serial control signal
[16:09:17] <jadew> ok
[16:09:24] <jadew> thanks Tom_itx
[16:09:36] <asteve> can i use an arduino to program an ATmega168?
[16:09:38] <Kevin`> I don't get it. why would you reset the board unless you want to reset it?
[16:09:42] <Kevin`> asteve: sure
[16:10:15] <RikusW> DTR line
[16:10:51] <RikusW> asteve: there is an arduino ISP app, but I couldn't get it to work on my arduino clone....
[16:11:10] <RikusW> Kevin`: to let it enter bootloader mode
[16:11:20] <RikusW> and then it timeouts and go to the app
[16:11:29] <jadew> ah and since we're on the topic, wth is arduino?
[16:12:07] <asteve> jadew: easy uC'ing putting a new ide/api around the atmega
[16:12:11] <OndraSter_> arduino is atmega-based simple development board
[16:12:18] <Kevin`> jadew: arduino is a microcontroller prototyping board with a custom minimalistic ide and easy software libraries
[16:12:23] <jadew> I'm a bit confused because until a few days ago I thought it's a different brand of controllers, then I learned it's a software layer, yet people talk about arduino programmers
[16:12:42] <OndraSter_> ye, there is program for arduino that will make arduino look and work like if it was AVR ISP
[16:12:44] <RikusW> arduino go a bootloader on the avr
[16:12:53] <RikusW> stk500 v1 type
[16:12:58] <RikusW> more or less
[16:13:21] <Kevin`> jadew: right now people are talking about using the physical arduino hardware as a programmer dongle for other chips
[16:13:24] <jadew> ok, so it's a software layer + dev board
[16:15:26] <jadew> why are people using it, instead of just doing it the direct way?
[16:16:30] <RikusW> its supposedly simpler
[16:16:37] <RikusW> there is high level libs for it
[16:16:53] <RikusW> but wiring is inefficient...
[16:17:19] <RikusW> wiring is used to access io pins by pin number
[16:17:33] <jadew> I see
[16:18:14] <jadew> I saw one at a friend a while ago and I was left with the impression that it's just an expensive toy
[16:18:15] <asteve> if you're doing small simple things it's a great idea
[16:18:41] <asteve> PWM is as easy as "analogWrite(pin_number, value)
[16:18:43] <asteve> "
[16:19:34] <jadew> wouldn't use a library just for that
[16:20:07] <jadew> I mean, it doesn't sounds like a good idea when you're dealing with controllers, small space to put your stuff in
[16:20:12] <Kevin`> there's libraries for lots of other stuff people commonly do too
[16:20:50] <Kevin`> jadew: you just get a bigger controller. what becomes more of an issue is when you need very short response time and hard real-time
[16:21:24] <Kevin`> or efficient bit twiddling and similar
[16:21:35] <asteve> or if you want to do two things at once; you're brought down to the interrupt/timer level and you're now constrained to using libraries that you can't change
[16:21:37] <jadew> well, I noticed it's using c++ so I guess you can just go asm {
[16:21:48] <Kevin`> although you can use normal avr io operations too, or inline asm, in arduino, if you are that way
[16:22:01] <Kevin`> but at that point, you are probably not using it to start with either, because you just never used it
[16:22:31] <asteve> and they've wired the pins to be very limiting
[16:24:40] <Kevin`> I wonder what's faster, arduino or microsoft's c# stuff
[16:25:15] <RikusW> C# is you have a 3GHz pc ;)
[16:25:28] <Kevin`> the latter kind of scares me, since you have a hal layer programmed by whever made the board that you don't control
[16:25:41] <jadew> you need a lot of ram for C# but in my experience c# is very well optimized
[16:25:45] <Kevin`> RikusW: I mean the microcontroller stuff that uses it. apparently rather popular with some people
[16:25:59] <jadew> you need to know what you're doing to obtain the same performance from c++, that you get with c# out of the box
[16:26:13] <RikusW> probably arduino, since its compiled to native code
[16:30:37] <Kevin`> ignoring of course the fact that the c# microcontrollers are going to have an arm cpu core running at 100mhz or so vs 16mhz, since that doesn't count for anything ;)
[16:30:53] <Kevin`> I want to see what arduino does for their planned arm board
[16:31:40] <jadew> Kevin`, was talking about the same hardware, don't really know what happens in the microcontroller world
[16:31:57] <jadew> especially since it's probably not running the microsoft framework
[16:33:08] <Kevin`> it's running something microsoft-sanctioned, since it's part of some of microsoft's big pushes. of course the software itself is written/customized by whoever makes the hardware and released in binary form, in true microsoft style
[16:33:46] <Kevin`> I don't see how that can work for realtime
[16:34:01] <Kevin`> but maybe it just doesn't have to, not intended to, like a desktop cpu doesn't
[16:34:48] <jadew> the difference between desktop and controller is that on the desktop you get to do true IO only with kernel mode drivers
[16:35:09] <jadew> so c#, c++ it still has to go trough a second layer, no matter what you do
[16:35:22] <Kevin`> on desktop the bios can interrupt execution for an undefined period of time at any time, and you can't prevent it
[16:35:36] <jadew> while on microcontrollers c# will deffinitely go trough an additional layer, so you can't compete there with asm or even c
[16:36:13] <Kevin`> even if you write kernel mode code and run it without the os, you can't do hard realtime on a common pc
[16:36:32] <Kevin`> plus the fact that it doesn't really have very much useful io for it
[16:36:34] <Kevin`> ;)
[16:36:53] <jadew> well, you can actually do realtime IO on a pc
[16:37:15] <jadew> in unprotected mode, you can just push bytes to the right port
[16:37:19] <jadew> which is mapped from the BIOS
[16:37:26] <Kevin`> I know that
[16:37:29] <jadew> that's how the OS is doing it too
[16:37:34] <Kevin`> but it's not deterministic
[16:38:02] <Kevin`> and the useful ports are basically gone now anyway
[16:38:08] <jadew> yeah
[16:38:09] <grummund> if it's not deterministic then it's not real time :)
[16:38:51] <Kevin`> most pc controlled stuff is basically clocked from the pc, so if the pc is interrupted for a few ms, the process just stops for a few ms too, no damage
[16:39:57] <Kevin`> stuff that isn't, has it's own external controller or is very lax in timing requirements
[16:40:21] <grummund> a lot of bad things can happen in a few ms
[16:41:16] <Kevin`> grummund: of course, but that kind of depends on what you are doing. having a cnc head stop in place isn't exactly bad
[16:42:07] <grummund> hmm, might be if it overshoots 'cos it didn't have a chance to ramp down the speed
[16:42:14] <jadew> damn it, just went trough the garbage, hoping to find the pins I threw out last night
[16:42:43] <grummund> note /me is just playing devils advocate here :)
[16:43:08] <jadew> damn it, realized I threw some other thing out that would have been extra useful
[16:43:13] <Kevin`> oh sure, if you run it as fast as is possible rather than stepping it.. don't use a pc parallel port ;p
[16:50:20] <grummund> Kevin`: Let's say you have a stepper motor that needs to ramp up 300rpm and back to 0rpm, four times per second, sample ADC at 2Msa/s, run a PID loop to regulate, and serve a serial port - simultaneously without skipping a step, or dropping bytes.
[16:52:12] <Kevin`> grummund: yeah, that's not something you do on a pc
[16:52:58] <OndraSter_> gn
[16:53:13] <Kevin`> also, it's kind of lucky that there's only one non-time-depent event there (uart). that kind of thing could get messy on anything
[16:53:22] <Kevin`> dependent*
[16:53:59] <grummund> "non-time-dependent" ... you mean asynchronous?
[16:54:47] <Kevin`> all of the other events you mentioned mentioned will always occur at the same rate and predictable/controllable if necessary times
[16:55:37] <grummund> yep sure. it was "easy" of course :)
[16:58:01] <grummund> anyway i should read scroll back before jumping in with stuff...
[17:13:16] <tomatto_> made someone frequency music analysator?
[17:13:53] <tomatto_> or 3 level music equalizer ?
[17:20:50] <Kevin`> i've seen a few projects for those floating around
[17:21:02] <Kevin`> people like to make pretty displays with them
[17:32:53] <tomatto_> i want to do color music. like on party, lights controlled by sound via atmega8
[17:33:46] <Steffanx> Good luck tomatto_
[17:43:56] <tomatto_> SterNiX: any help or existing projects about you know?
[17:59:42] <tomatto_> any help or existing projects about you know?
[18:19:45] <jadew> ok, it worked just fine routing the wires
[18:20:19] <jadew> spent like $200 to build it lol
[18:20:45] <jadew> but I wanted new tools, to get it right
[18:39:50] <of2vil> hello, i've got an mini-at board from mikroelectronica (http://www.mikroe.com/eng/products/view/649/mini-at-board/) containing an atmega328 and i want to use it with avrdude on linux - can someone tell me what would be the correct programmer to pass with the -c argument to avrdude?
[18:42:22] <ftc> of2vil: just run avrdude -c and it lists all the programmers it supports
[18:43:07] <of2vil> ftc: ah ok, great :) got it
[18:43:40] <ftc> er -c with some gibberish after it
[18:43:46] <ftc> avrdude -c lkdsafha
[18:43:58] <timemage> of2vil, the manual for the thing seems to indicate that the bootloader zip file contains an avrdude.conf file. is that relevant?
[18:45:07] <of2vil> timemage: not at the moment, but i guess i can use stk500v1
[18:45:21] <timemage> of2vil, yeah, actually that's mentioned on the next page =)
[18:45:39] <timemage> of2vil, page 9
[18:46:53] <of2vil> oh right, i must admit that i totally skipped those pages since it looked like a windows program :X
[18:47:30] <timemage> of2vil, heh.
[19:11:22] <Kevin`> of2vil: that's probably using something similar or identical to arduino's bootloader btw
[19:12:08] <Kevin`> (so you could just tell avrdude it's an arduino)
[20:00:54] <of2vil> may i ask another question? i am running into the problem now that avrdude fails with "stk500_recv(): programmer is not responding" - it worked one time without a problem, but thats it - and reseting it or using another usb port didn't help either
[20:02:36] <pepsi> who lives where?
[20:02:37] <pepsi> anyone in illinois?
[20:02:50] <Tom_itx> i'm not
[20:03:11] <Valen> i am
[20:03:11] <pepsi> i have job(s) available in illinois
[20:03:15] <Valen> oh wait a bit outside it
[20:03:17] <Valen> australia
[20:03:25] <pepsi> that's not illinois
[20:03:43] <Valen> cmon they are both close to the middle of nowhere
[20:03:44] <Valen> ;-P
[20:03:59] <pepsi> 20 miles outside of chicago
[20:04:04] <pepsi> thats not quite the middle of nowhere
[20:46:06] <Tom_itx> what eagle lib has ethernet plugs?
[21:13:25] <inflex> I suppose, perhaps like USB ones, they're all different?
[21:14:06] <rue_house> !seen abcminiuser
[21:14:06] <tobbor> abcminiuser was last seen in #avr on Jan 03 16:17 2012
[21:14:24] <Tom_itx> well i wasn't able to find any
[21:14:58] <Tom_itx> rue_house he's on his way North
[21:15:11] <rue_house> west?
[21:15:17] <rue_house> or east?
[21:15:24] <Tom_itx> Norway\
[21:15:41] <rue_house> damn, wrong continent
[21:16:04] <rue_house> the audio usb demo isn't recognized
[21:16:35] <Tom_itx> did you generate the help?
[21:16:44] <Tom_itx> it might tell you something
[21:17:00] <rue_house> hmm
[21:17:15] <Tom_itx> you can 'make all' from the main directory
[21:17:28] <Tom_itx> and make all doxygen or some such thing
[21:17:35] <Tom_itx> i forget
[21:18:06] <rue_house> I had to mod the makefile to get it to 32u4
[21:18:13] <Tom_itx> yeah
[21:18:14] <rue_house> but there ... OH, oops
[21:18:17] <rue_house> crystal freq...
[21:18:19] <rue_house> heheh
[21:18:21] <Tom_itx> that too
[21:18:27] <Tom_itx> that should be about it
[21:18:41] <Tom_itx> sometimes he puts compile switched in em
[21:19:07] <rue_house> hey, is the u4 board you sent me aleady using external crystal?
[21:19:13] <Tom_itx> yes
[21:19:17] <rue_house> ok
[21:19:23] <rue_house> can they do usb on internal?
[21:19:32] <Tom_itx> i don't think so
[21:19:35] <Tom_itx> i've never seen it done
[21:19:42] <Tom_itx> but feel free to try
[21:21:46] <rue_house> haha! that was it, crystal setting
[21:21:50] <rue_house> cooooool
[21:22:12] <Tom_itx> havin fun?
[21:22:20] <rue_house> sure
[21:22:29] <rue_house> I'm totally burned out from work
[21:22:41] <rue_house> atleast I still have a little perspective left
[21:23:10] * inflex has nothing left in him
[21:23:35] <Tom_itx> what did you build? the audio output host?
[21:23:44] <rue_house> the device
[21:23:59] <rue_house> gonna make myself a usb sound card
[21:24:08] <Tom_itx> which dir?
[21:24:14] <inflex> which chip are you using rue_house ?
[21:24:17] <Tom_itx> oh nevermind
[21:24:20] <rue_house> zippo:/files/programming/src/LUFA-111009/Demos/Device/ClassDriver/AudioOutput#
[21:24:21] <Tom_itx> U4
[21:24:26] <rue_house> atmega32u4 or u2
[21:24:29] <rue_house> u4 for now
[21:25:01] <rue_house> I'm havin dac problems
[21:25:21] <rue_house> I wanted a true 16bit dac, but it seems that even the ones from the cd players are hybrid pwm
[21:25:36] <rue_house> if I'm gonna use pwm, I might as well use the pwm dirrect from the avr
[21:25:46] <rue_house> so I need a filter
[21:26:10] <rue_house> and I dont have it in me right now to work out a suitable lowpass
[21:26:16] <Tom_itx> did you see the stereo mono switches in the makefile?
[21:26:25] <Tom_itx> or portc out
[21:26:33] <Valen> rue_house: use some programmable resistors perhaps?
[21:26:34] <rue_house> yes, and I seen the code in the avr
[21:26:40] <Valen> or an AVR with a bunch of resistors hanging off it?
[21:27:19] <rue_house> Valen, do you know how much a 16bit dac costs? its stupid, for the same amount you can buy R-2R resistor ladders (about $30)
[21:27:28] <rue_house> I wanted to make this small
[21:27:46] <rue_house> I was looking at assembling a 3d smt resistor block, but I cant get that descently small either
[21:28:04] <rue_house> I can make a R-2R smt in a DIP32 :/
[21:28:11] <rue_house> thats 1 channel, no buffer amp
[21:28:32] <Valen> this had better not be for audio ;-P
[21:29:07] <rue_house> it is
[21:29:21] <rue_house> I bought a $25 usb audio stick and it SUCKS
[21:35:57] <inflex> I've seen some nice monolithic USB-> audio chips
[21:38:00] <inflex> like the PCM27xx and 29xx
[21:39:30] <rue_house> nope, I'm using a mega32u
[21:39:36] <eatyourguitar> I got some murata R2R in SIP on mouser
[21:39:56] <eatyourguitar> pretty cheap actually
[21:40:01] <rue_house> I know, ,by the time you make 4 channels of 16 bit, your paying the same as a 4 ch 16 bit dac
[21:40:16] <rue_house> you have to use the 6 pin ones, and gang 4 to make 16 bits
[21:40:21] <eatyourguitar> pretty close price wise
[21:40:33] <eatyourguitar> the R2R is a bit cheaper
[21:40:38] <rue_house> yea, I'm trying to do the dac for less than $30
[21:41:10] <eatyourguitar> then maybe SMD and etch the board in your basement
[21:41:10] <rue_house> at this rate, I'll just use 74ls595 and use thruhold resistors I already have
[21:41:37] <rue_house> smt I can make a R-2R 16 bit as small as a dip32
[21:41:57] <rue_house> 1 channel :/
[21:42:04] <eatyourguitar> but the price is pretty good right?
[21:42:33] <rue_house> yea, I already have almost everything
[21:42:50] <eatyourguitar> smd resistors are cheaper I think
[21:43:01] <rue_house> actaully, I have a pile of serial to parallel converters from inkjet printer drivers
[21:43:11] <rue_house> I already have the thruhole ones
[21:43:47] <rue_house> This sound device does not have any controls.
[21:43:59] <rue_house> interesting, alsa has no volume control method
[21:44:21] <rue_house> I suppose alsa cant just use a software volume control
[21:45:29] <eatyourguitar> software volume control has its problems
[21:45:36] <eatyourguitar> for sound quality
[21:45:50] <rue_house> ont eh pc side?
[21:45:55] <rue_house> shouldn't
[21:46:08] <rue_house> scaling a packet of audio destined for a usb device should be dead easy
[21:46:25] <eatyourguitar> oh I thought you were talking about build stuff with dac's
[21:46:51] <rue_house> well, the lufa demo dosn't have a volume control, thats fair enough
[21:47:08] <eatyourguitar> I dont know what lufa is
[21:47:08] <rue_house> would't want to burden an avr with that
[21:47:23] <rue_house> uh, its THE usb stuff for avr
[21:47:56] <Tom_itx> http://www.fourwalledcubicle.com/LUFA.php
[21:48:03] <eatyourguitar> I'm just starting to make the switch from arduino to AVRstudio
[21:48:15] <eatyourguitar> this is all new to me but I want to learn
[21:48:20] <Tom_itx> studio 4 i hope
[21:49:19] <eatyourguitar> I might mess around with some free options first
[21:49:40] <rue_house> hmm the other option is to put my own volume on the analog side of the device
[21:49:48] <eatyourguitar> like the arduino ans an ISP programmer with AVR dude
[21:50:04] <rue_house> I could use an 8 bit dac, with the ref as the incomming audio and the output as the audio out
[21:50:28] <rue_house> this is getting big