#avr | Logs for 2015-06-12

Back
[04:45:55] * LeoNerd idly muses on an interesting idea for an almost arbitrarily-large-scalable expansion bus
[04:46:24] <LeoNerd> 3 SPI lines (MOSI, MISO, SCK) with no SS lines; instead use an I2C bus connected to a bunch of little I2C GPO chips to drive SSes
[04:46:35] <LeoNerd> So 5 lines plus power gives you a lot
[05:00:39] <Jartza> gpo?
[05:02:30] <dunz0r> LeoNerd: Couldn't you just use I²C in that case?
[05:02:35] <Jartza> like gpio but without input?
[05:02:45] <Jartza> dunz0r: i2c is slow
[05:03:08] <dunz0r> It'll be the speed of I²C if you're using it for SS anyway, won't it?
[05:03:30] <dunz0r> Oh, never mind. Just the switching speed will be, the dataspeed will be SPI of course. Silly me :)
[05:03:39] <Jartza> :)
[05:11:05] <LeoNerd> Yah; I2C is much slowness... good enough for SS lines though
[05:12:49] <Jartza> LeoNerd: although spi slaves often need a way to inform master that they have something to say
[05:13:00] <Jartza> how to mux irq lines back?
[05:13:09] <LeoNerd> Ahyes; add an opencollector IRQ line
[05:13:26] <LeoNerd> Or use GPIO chips
[05:14:05] <LeoNerd> Oooh, maybe that's it, Each slave gets two GPIO pins; one SS, one IRQ. Those I2C GPIO chips can do pinchange ints
[05:14:21] <Jartza> yea
[05:14:26] <Jartza> something like tha
[05:14:46] <Jartza> and actually that's almost how we handle the comms in current project :)
[05:15:11] <Jartza> although we don't use i2c, but spi gpio "extender" :)
[05:16:01] <LeoNerd> Oh? Which one?
[05:16:21] <LeoNerd> I;ve yet to find an SPI GPIO extender that I like
[05:16:55] <Jartza> it was maxim, but can't now remember the part number
[05:17:24] <LeoNerd> Microchip have some; the MCP23S17, but they aren't *really* SPI
[05:17:40] <LeoNerd> They are I2C with an SPI-attached SR.
[05:17:52] <Jartza> heh
[05:18:28] <LeoNerd> So the chip still has address pins, and you still start each *SPI* transaction with a byte containing the slave address, shifted up one bit, and a R/W bit
[05:18:54] <LeoNerd> So for example it doesn;t take advantage of SPI's ability to do write-while-read
[05:19:09] <LeoNerd> Which would be lovely on an IO port
[05:19:10] <Jartza> d'oh
[05:19:32] <Jartza> we need DMA in our SPI
[05:20:05] <Jartza> we talk to displays and other cpus
[05:20:11] <LeoNerd> Oooh, well aren't *we* fancy :P
[05:20:30] <Jartza> I guess that kind of schema would break dma badly
[05:20:44] <LeoNerd> Yah; likely
[05:21:24] <Jartza> the switching isn't done that often and isn't _that_ time critical though, I'm wondering if i2c would suffice
[05:21:35] <Jartza> or, most probably it would
[05:22:00] <LeoNerd> Oh actually, thinking about it it's probably not ideal. Because of those I2C-attached SS lines, there's an I2C's worth of latency to the start and end of every SPI transaction
[05:22:20] <Jartza> true
[05:22:30] <Jartza> not ideal, but might still work
[05:22:35] <LeoNerd> Fast bamdwidth for big bulk transfers, but little commamds and queries are practically at I2C speed
[05:23:01] <LeoNerd> Maybe just stick a 74xx595 on the SPI bus to drive SS lines
[05:23:23] <LeoNerd> Then master gets SS on that, plus its OE pin
[05:24:15] <LeoNerd> Oooh I quite like this
[05:25:10] <LeoNerd> It lets you chain expansion modules and address them by physical location
[05:25:22] <Jartza> oh
[05:25:31] * LeoNerd wonders if such a thing as a 74HS1G595 exists
[05:25:38] <Jartza> :)
[05:25:43] <Jartza> me too :D
[05:25:44] <LeoNerd> Maybe in a little SOT-23-6
[05:25:59] <Jartza> how about in wlcsp? :)
[05:25:59] <LeoNerd> Ohwait, needs 8 pins
[05:26:30] <LeoNerd> VCC GND DI DO SCK SS Qn OE
[05:28:53] <Jartza> I think 595 is too slow
[05:29:07] <LeoNerd> 10MHz
[05:29:20] <Jartza> yea, too slow
[05:29:35] <Jartza> and slower with lower voltages
[05:32:30] <LeoNerd> But it's only SS don't forget
[05:32:37] <hypermagic> hi
[05:32:48] <Jartza> LeoNerd: ah, true. already forgot :D
[05:32:49] <Jartza> silly me
[05:33:00] <hypermagic> anybody know when will Amulet CPU equipped devices be available ?
[05:33:48] <Jartza> 1993
[05:33:49] <Jartza> ?
[05:36:28] <Jartza> 13:10 < hypermagic> anybody know when will Amulet CPU equipped devices be
[05:36:33] <Jartza> oops
[05:37:03] <hypermagic> <Tom_itx> do you tie the unused inputs to GND or leave them floating? - i activate weak pullup ;>
[05:37:47] <Jartza> argh. I hate putty
[05:40:46] <hypermagic> https://en.wikipedia.org/wiki/AMULET_microprocessor
[05:41:05] <hypermagic> there was already Amulet 3 in 2000 ...
[05:42:14] <hypermagic> http://www.hotchips.org/wp-content/uploads/hc_archives/hc05/3_Tue/HC05.S7/HC05.7.1-Furber-Manchester-AMULET1.pdf
[05:42:30] <hypermagic> atmel probably dont want to comment why sell crap instead of good
[05:43:38] <Xark> Jartza: Putty sucks, I suggest trying Tera Term. Like 10x faster too (if transferring files over SCP/SFTP, for example).
[05:44:12] <hypermagic> and 2000 was only 15 years ago... you know quite leading edge technology
[05:44:13] <Xark> (and less buggy - Putty has horrible selection bug that will crash client [and hasn't been updated in ages])
[05:53:38] <Jartza> well, for starters I disabled the right-click and middle-click paste
[05:54:15] <Jartza> Xark: ahh, this is strictly controlled environment and I can't really install anything that IT-department accepts :P
[05:54:22] <Jartza> as this is customer machine
[05:54:39] <Xark> Jartza: Okay, well, tell your IT department to get a clue and approve Tera Term. Putty is crap. :)
[05:54:54] <Xark> Jartza: Or pay for SecureCRT or something...
[05:55:26] <Jartza> Xark: not "my" IT department either :)
[05:55:55] <Jartza> I'm just developing sw for the customer, and I've learned to live with what they give me :)
[05:55:56] <Xark> Jartza: The one forcing crap on you. :)
[05:56:21] <Jartza> sure, I've made a lot of suggestions, but in big corporations usually those suggestions are like farting in the wind.
[05:56:34] <Jartza> smells bad downwind for a while, but nobody else notices.
[05:56:35] <Xark> Jartza: Okay. Enjoy. :)
[05:57:20] <Jartza> luckily I don't need to se putty for anything else than getting to irc :D
[05:57:46] <Jartza> luckily I don't have to use windows outside customer projects either
[07:48:03] <szwetsloot> Hello guys
[07:48:17] <szwetsloot> Does anyone here have experience programming an atmega2560 chip with avrdude?
[07:49:59] <Xark> szwetsloot: Works well enough from Arduino IDE.
[07:50:10] <Tom_itx> it's pretty easy
[07:50:21] <szwetsloot> Clark: Yeah, it does. But I am trying to set the fuses and that doesn't work
[07:50:42] <szwetsloot> Clark: I am using this string: "C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude" -c arduinoisp -p atmega2560 -v -C "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -U lfuse:r:low_fuse_val.hex
[07:50:51] <szwetsloot> Clark: results in this: http://pastebin.com/Fgb69MrB
[07:50:54] <Xark> szwetsloot: So you mean ISP program? What programmer?
[07:51:11] <szwetsloot> arduinoISP
[07:51:11] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/how_to/atmega168/using_avrdude_index.php
[07:51:17] <Tom_itx> that works
[07:51:19] <inflex> lo there Tom_itx
[07:51:22] <Tom_itx> change the programmer
[07:51:25] <Tom_itx> hey inflex
[07:51:35] <Tom_itx> fix him up ^^ i'm out the door...
[07:51:41] <inflex> Tom_itx: been a while, as usual, again...
[07:51:41] <Xark> szwetsloot: Hmm, I believe USBTiny doesn't work with 2560 (>64K word flash or something).
[07:52:07] <Tom_itx> yeah i agree with that
[07:52:22] <szwetsloot> Tom_itx: Can you send me that link again? client resetted for some reason
[07:52:34] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/how_to/atmega168/using_avrdude_index.php
[07:52:42] <Tom_itx> it may not work with that programmer though
[07:52:48] <Tom_itx> to much memory
[07:53:07] <szwetsloot> Ah, and the fuse bits are in the second half of the memory?
[07:53:29] <Tom_itx> no idea, i didn't read the data sheet either :D
[07:53:45] <szwetsloot> Haha okay
[07:53:54] <szwetsloot> What programmer do you suggest I use?
[07:53:59] <Tom_itx> mine
[07:54:07] <Tom_itx> of course :)
[07:54:20] <szwetsloot> How much does it cost?
[07:54:25] <Xark> Tom_itx: Is yours still available? I didn't see a purchase link on your site?
[07:54:37] <Tom_itx> i took that part down
[07:54:40] <szwetsloot> And you should probably add a female port on the other side, makes connecting easier ;)
[07:54:41] <Tom_itx> i still have them
[07:54:54] <Tom_itx> http://tom-itx.no-ip.biz:81/~webpage/boards/USBTiny_Mkii/USBTiny_Mkii_index.php
[07:54:56] <Tom_itx> szwetsloot
[07:55:12] <Tom_itx> gotta run
[07:55:39] <Xark> Tom_itx: Okay, TTYL
[07:55:40] <szwetsloot> Okay
[07:55:47] <szwetsloot> C you
[07:56:05] <szwetsloot> is it possible to program the second half using an arduino mega as ISP?
[07:58:24] <Xark> szwetsloot: This may be of use -> http://www.gammon.com.au/bootloader
[08:01:25] <szwetsloot> Clark: Thanks, I'll try that.
[08:02:26] <Xark> xzwetsloot: Great. :)
[08:11:53] <szwetsloot> Clark: It does connect, however I get stk500_getsync() attempt ... of 10: not in sync: resp=0x03
[08:12:24] <szwetsloot> http://pastebin.com/y7t07Za1
[08:12:43] <szwetsloot> Do I have to change the baudrate in the boards.txt?
[08:17:38] <hypermagic> hi
[08:17:53] <hypermagic> <Tom_itx> do you tie the unused inputs to GND or leave them floating? - i activate weak pullup ;>
[08:18:00] <LeoNerd> TIE ALL THE THINGS
[08:18:05] <LeoNerd> ... wait.er.. That came out wrong
[08:19:38] <hypermagic> you like to tie them girls up ? ;)
[08:25:51] <Valen> wait what's going on?
[08:27:08] <szwetsloot> Can someone help me with avrdude?
[08:27:20] <szwetsloot> I am getting an error that I do not know how to fix and Clark seems to have left
[08:27:31] <szwetsloot> Am currently getting this: http://pastebin.com/y7t07Za1
[08:29:47] <szwetsloot> Does anyone know why it would not respond?
[08:30:25] <LeoNerd> Eh; could be anything
[08:30:37] <LeoNerd> Wrong port, wrong driver.. wrong -c option... faulty hardware...
[08:30:48] <LeoNerd> Basically that just means "I couldn't get back a response that I recognise"
[08:31:29] <szwetsloot> What is standard procedure for debugging that?
[08:31:46] <szwetsloot> I have it to work with an ArduinoISP, but I need to acces the full 256kb memory to set the fuses
[08:31:59] <LeoNerd> Personally I'd probably start by sticking a logic probe on the programmer's UART lines and see what was being said
[08:32:28] <szwetsloot> And lacking a logic probe?
[08:33:01] <LeoNerd> Heh.. whoknows. I can't imagine not having one... it's far too essential for this kind of basic debugging
[08:33:34] <szwetsloot> Okay
[08:34:04] <LeoNerd> I got myself a cheap (£14) Saleae clone about a year ago. Nice little thing.
[08:34:30] <LeoNerd> 8 channels, USB. Physically tiny. Doesn't *really* cope much faster than about 2Ms/sec, but that's usually sufficient for the things I work on
[08:34:35] <LeoNerd> Sometimes 4 on a good day
[08:35:24] <szwetsloot> Okay, I'll look for one of those
[08:35:49] <LeoNerd> They're seriously handy. I can't imagine doing any sort of digital electronics hackery without having it to hand
[09:23:05] <vsync_> LeoNerd: yeah that thing works pretty fine :)
[09:23:48] <LeoNerd> "that thing"?
[09:24:34] <szwetsloot> Is there no way to edit fuse bits using the arduinoISP?
[09:24:43] <LeoNerd> Mmm?
[09:24:53] <szwetsloot> Connection through that one works perfectly, but writing the bits gives errors
[10:00:32] <vsync_> LeoNerd: the saleae clone
[10:01:06] <LeoNerd> Ah. Yah: )
[10:01:18] <LeoNerd> Though I think I'm gonna get myself a real one sometime.. a Logic16 - 16 A/D channels :)
[10:01:40] <vsync_> sometimes the saleae software does weird hangs but, that's just software. complaining about software is a tricky business at freenode, a lot of bench engineers and other failures will be fast to claim how they'd write the software better themselves, in a matter of hours or a few days tops
[10:01:46] <LeoNerd> A couple of times I've ended up using all 8 channels of this thing and wondered "What do I have to drop to get something else"
[10:01:48] <vsync_> ...but they're just too lazy to do it
[10:02:06] <vsync_> LeoNerd: yeah, same. but I don't get why you'd need analog too
[10:02:16] <LeoNerd> A couple of channels might be nice
[10:02:20] <vsync_> that's some heavy signalling shit you're gonna do then :p
[10:02:38] <LeoNerd> Can be helpful to see the analog shape of a "digital" signal
[10:02:55] <vsync_> hum... well, _can_
[10:02:58] <LeoNerd> E.g. I recently had a problem where an interrupt didn't fire on "pin change" simply because the edge was too slow
[10:03:09] <LeoNerd> logic analyser of course didn't see the slowness of that rising edge
[10:03:39] <vsync_> how fast are the analog inputs then?
[10:04:00] <vsync_> wouldn't hold my hopes high tbh :p
[10:04:00] <LeoNerd> Dunno.. something vaguely reasonable
[10:04:31] <vsync_> though if it's just because you wanna see digital bus edges and so on... then anything should be more than fine, ha
[10:07:48] <vsync_> that came out wrong, i meant if you're working with frequencies that the clone could do so...
[10:49:53] <sebus> Tom_itx tx/rx/rts/cts are used
[10:51:04] <sebus> but anyway, problem solved. I've bought fake chips.
[10:53:49] <Tom_itx> woops
[10:54:18] * Tom_itx changes WormFood fo Wormfeud
[11:10:05] <WormFood> hi Tom_itx
[11:46:46] <chasmo77> I suspect my avrone is stuck in debugwire mode: there's a 60Hz square wave emitted on RST!?; Atmel tech support not being helpful at the moment. Am I right?
[11:47:16] <chasmo77> ... RST on ISP interface
[12:06:58] <LeoNerd> Ooh... another SO-sized USB-UART bridge chip. A CH340G
[12:09:55] <sebus> LeoNerd I saw sort of them on arduino clones
[13:21:18] <DanFrederiksen> pcb porn https://www.flickr.com/photos/theo_kamecke/with/3496831683/
[13:41:54] <sebus> Nice :o
[15:10:48] <Steffanx> no leds DanFrederiksen :(