#avr | Logs for 2015-05-15

Back
[00:09:22] <idiot2> N1njaneer, ahm i see now how it was done
[00:09:40] <idiot2> reading ieee 1394a-2000 standard
[00:10:31] <idiot2> so they did half duplex rxtx, data on one twisted pair and strobe on the other
[00:11:06] <idiot2> basically this is why it is not cool at high data rates
[00:11:36] <idiot2> but still very good upto 1Mbps
[00:14:58] <N1njaneer> USB is twisted pair differential, and is quite fast :)
[00:18:20] <idiot2> N1njaneer, ieee 1394b is almost the same as usb
[00:19:22] <idiot2> 1394a is used on spacecraft and aeroplane bus
[01:19:24] <rue_bed> ooh, its more than just a useless apple standard?
[01:22:30] * Casper throws rue_bed a sleep pill
[01:22:52] <rue_bed> evil cycle
[01:23:02] <rue_bed> sleep pills at night and coffee in the morning
[01:23:14] <rue_bed> its not a good way to live
[01:24:12] <rue_bed> idiot2, wait, 1394 is half duplex!?
[01:24:30] <rue_bed> I thoguht its 6 pins
[01:27:10] <Casper> nite, pills in, let's hope I'll sleep...
[01:27:15] <Casper> 2am... still not tired... grrr
[01:35:29] <theBear> hmmm.... so i been playing with my first ever native usb-capable avr recently... starting to get a grip on things.... seems "good" information is a lot harder to find since arduino hit the scene (i had a LONG break from active dev/playing) but i'm kinda fascinated/interested by a few thigns i've seen.... for example http://mitchtech.net/arduino-usb-hid-keyboard/ (not lufa note/link, but the arduino-usbserial/(i think) http://hunt.net.nz/users/darran/webl
[01:35:29] <theBear> og/b3029/Arduino_UNO_Keyboard_HID_version_03.html bootloader "firmwares") ... unless it's some sneaky arduino lib stuff going on that i don't understand at all (i'm against arduino for all kinds of good reasons if yer not aware :-) ) it seems like the bootloader is somehow handling the usb side of things, and allowing simple access to them by "emulating" simple serial/printf style functions ?
[01:39:16] <theBear> maybe i need to refresh my understanding of how bootloader passes to "real" program and the mechanism will become obvious ?
[02:02:19] <theBear> on a different note, LUFA is kinda awesome once you get the idea of how to approach/use it properly... heck, not kinda, it's "completely awesome and a half" ! again for those who don't know, lufa didn't exist last time i programmed/played with an avr, and i suspect that even usb-capable avrs didn't yet exist, and that ivan hadn't yet shocked the world by doing softusb on an avr :-)
[04:33:10] <Xark> theBear: I believe that runs on the tiny 2nd AVR processor on the Arduino Uno (ATmega16u2) that normally handles serial (like a FTDI would). Then instead of forwarding serial data to main Arduino 328, it forwards HID data.
[04:37:18] <theBear> ahhhhhh.... that'd explain everything, and (not the lib-trickery i was assuming) i think still qualifies as arduino stuff i don't understand <grin> this is one of the many examples of why i'm against the arduino thing in general... they don't encourage understanding wtf is going on even at a broad level (like avr1 vs avr2, on one or maybe a few specific model/boards) and thru this both create ignorant users AND confuse the hell outta people like me
[04:37:49] <Xark> Nothing very tricky in Arduino. All pretty basic. :)
[04:38:19] <LeoNerd> It's just layers of annoying obfuscation, I find
[04:38:37] <LeoNerd> I bought myself a Micro Pro board, because that gives me a 32U4 on a breakout much cheaper than any other method.
[04:38:41] <Xark> Well, all the source is right there for everyone who downloads IDE (but I agree few read it). :)
[04:38:55] <LeoNerd> But whereas my £18 Adafruit 32U4 is nicely labeled with the REAL PIN NAMES like B0 B1 B2 etc..., the Micro Pro isn't
[04:39:13] <LeoNerd> It took me quite a bit of cross-referencing against schematics, to be able to draw a diagram that actually labels the pins
[04:39:39] <LeoNerd> (And now having done that I discover they've thrown away two PCINT-capable pins :( One is "wasted" on the TX LED and one literally isn't connected)
[04:39:47] <Xark> LeoNerd: And tough luck if you needed XCK (external serial clock - like for PS/2 keyboard), used as RX LED on Micro. :)
[04:39:56] <LeoNerd> Yah..
[04:40:34] <LeoNerd> Well, fortunately for me I just need USB, 4 PCINT-driven buttons, 4 LED outputs, 2 INT-capable inputs and 2 bitbanging GPIO outputs... That justabout fits on the pins I have left
[04:40:41] <LeoNerd> The only reason I'm using this board is I want USB HID
[04:42:10] * Xark links https://40.media.tumblr.com/cdadca4e95808b376de52a88a5468367/tumblr_mi61oww6cu1s5t695o1_1280.png <- decent chart
[04:42:32] <LeoNerd> That's a Micro not-pro
[04:42:54] <Xark> ahh, micro pro....that a sparkfun board?
[04:42:57] <LeoNerd> Yah
[04:43:02] <LeoNerd> It's missing quite a few pins
[04:43:13] <Xark> Okay. Everybody calls it Pro Micro so you confused me. :)
[04:43:22] <LeoNerd> PB0 PB7 PE6 PF0 PF1 are literally missing
[04:44:00] <Xark> Oh... I see the Pro Micro is like the Micro Pro with a USB AVR. :)
[04:44:14] <LeoNerd> Hm? Oh..
[04:44:27] <Xark> Er, Pro Mini
[04:44:42] <LeoNerd> Ahyes.. Mini != Micro
[04:44:48] <LeoNerd> Toooootally different. That's another thing that annoys me
[04:45:12] <Xark> Nevermind confused. 328p vs 32u4
[04:45:23] <LeoNerd> There's a Mini Pro, there's a Nano which is /bigger/ than a Mini Pro, and there's a Micro which is also larger than a Mini but abuot the same size as a Nano, and powered by 32U4 rather than 328
[04:45:41] <LeoNerd> And then there's a Micro Pro which is like a Micro because it has a 32U4, but is pinwise identical to a Mini Pro
[04:45:52] <LeoNerd> Yeah - not at /all/ confusing is it?
[04:46:20] <Xark> Yeah, a bit confusing. :)
[04:46:22] <LeoNerd> "pinwise identical" meaning: they totally mangle the board layout just so they can put all the PWM-capable pins in the same places
[04:46:42] <Xark> And then slow the code down with run-time lookup tables to re-map pins. :)
[04:46:59] <LeoNerd> Mmmhm
[04:47:07] <LeoNerd> Well, I don't go anywhere near that myself...
[04:47:07] * Xark links a little test http://pastebin.com/dSRSxgax
[04:47:41] <LeoNerd> I use the boards because they're convenient and cheap, sometimes I leave the bootloader on if it's going in a project that's USB or serial accessible, but otherwise I run plain C code on it
[04:48:09] <LeoNerd> Except in my 32U4 currently, where I don't really have time to look at USB HID so I'm using a weird hybrid of Arduino managing USB and my C managing everything else
[04:49:17] <LeoNerd> Surprised how well it works, though
[04:49:21] <Xark> Yeah. I rarely call the library routines, but use the toolchain.
[04:49:46] <LeoNerd> At least with inotool, you can just throw a bunch of .c files at it with plain <avr/io.h>-based code, and mix in a single .ino file with the C++ish code to manage USB, and all seems to run quite well
[04:59:57] <theBear> one day soon when i'm not busy next door i gonna quiz yer about this -fstandalone thing i noticed/stumbled on too... could be something to do with the noticable differences between various toolchain/gcc vers (i generally build my own, tho my os has an awesome framework and tool to make it all fairly trivial,) or being outta practice and not remembering which standard avr-lib or generic c-lib stuff to include, but without that compiler flag trying to use t
[04:59:57] <theBear> hings like _delay_blah functions from avrlib <util/delay> or something generic/fairly standard like that, just causes all kinds of build/function-related errors
[05:16:45] <twnqx> http://www.digikey.de/product-detail/de/DB9-USB-M/768-1064-ND/2330156
[05:16:52] <twnqx> ftdi is building... strange... things
[05:17:17] <twnqx> (even though it makes perfect sense, from some point of view)
[05:21:19] <LeoNerd> Ooooh... Is that a USB-CDC adapter built into a DB9 socket?
[09:04:23] <twnqx> LeoNerd: sorry, was at the gym. yeah, looks like just that :D
[09:51:12] <LeoNerd> Gah.. further annoyance of this 32U4 chip. UART, I2C, interrupts: pick any two.
[09:51:19] <LeoNerd> SPI port, PCints. Pick one
[09:51:49] <LeoNerd> Made worse by the fact that the Arduino Micro Pro doesn't make the PB7 pin available at all, it just totally ignores it. So that's another PCint-capable pin wasted
[09:54:17] <specing> just go for stm32
[10:02:33] <LeoNerd> Well, a) I've bought this now, b) I have it sat in front of me, c) The code works, d) It must be finished by end of the weekend
[10:02:34] <LeoNerd> :P
[10:43:40] <STS_Patrik> When i call wdt_reset(); my int main() loops, why is that? using AS6 & AT90CAN128 with function from #include <avr/wdt.h>
[12:40:14] <idiot2> hi
[12:41:37] <idiot2> rue_bed, the original ieee 1394a is half duplex, but is asynchronous, self clocked, and has good jitter stability
[12:44:23] <idiot2> rue_bed, http://bbs.dianyuan.com/bbs/u/34/1129079742.pdf ;) 1394a std
[12:44:35] <idiot2> ftp://ftp.elet.polimi.it/users/Flaminio.Borgonovo/RETI/Materiale/1394b.pdf
[12:49:47] <idiot2> so 1394a is the original firewire / spacewire design, and used on aircraft buses too, 1394b is something like the usb crap
[15:22:46] <EI24> Hi, should i be cautious about enabling the global interrupt bit? Is it generally safe to have it enabled through out the a large program?
[15:26:32] <LeoNerd> Depends entirely what your general system design looks like
[15:26:47] <LeoNerd> I have a fairly standard two-level eventloop-type system I usually use
[15:27:01] <LeoNerd> That runs with I most of the time, except a few critcal regions
[15:28:44] <EI24> LeoNerd: ah ok, then ill have it on. Otherwise i have to toggle it each time my timer is called
[16:28:49] <LeoNerd> So....
[16:29:27] <LeoNerd> If I do the SUBI/SBCI pair to decrement a pair of registers that hold a 16bit value.... how do I test for equality with zero?
[16:29:32] <LeoNerd> I can't just use the Z flag alone, can I?
[16:30:08] <LeoNerd> Ohwait, yes I can :) cooool
[16:37:15] <idiot2> eichiro, yes, the interrupt table must be populated before attempting to enable interrupts
[16:37:31] <idiot2> EI24 ----
[16:38:02] <idiot2> LeoNerd,
[16:38:15] <idiot2> http://bbs.dianyuan.com/bbs/u/34/1129079742.pdf 1394a std
[16:38:44] <idiot2> there is some c code too
[16:40:03] <LeoNerd> idiot2: mm?
[16:40:43] <idiot2> some reading ;>
[18:44:15] <phinxy> If i ordered capacitors from Hifi Collective co.uk and they sey the caps are genuine, how do i know? :p
[18:44:52] <Lambda_Aurigae> if they don't melt or blow up and they work then good enough.
[18:46:07] <tpw_rules> Lambda_Aurigae: that sounds like a place that sells the $600 caps that aren't any different than a 37c digikey special
[18:46:46] <tpw_rules> phinxy: buy a fullness meter?
[18:46:47] <Lambda_Aurigae> probably.
[18:47:13] <tpw_rules> my fluke has fullness, expression, and flow built into its cap tester
[18:48:30] <phinxy> What fluke model ?:)
[18:50:14] <phinxy> I want to upgrade the obviously cheap capactiors in my USB DAC and i was stupid enough to buy "audio grade" capactiors..
[18:51:47] <Lambda_Aurigae> that's like buying audio grade CDR disks for archiving your important records.
[18:52:06] <phinxy> If you were to buy a 50V 100uF capacitor for a DAC, what would you buy to ensure good quality?
[18:52:50] <Lambda_Aurigae> no clue..never paid attention to brands of caps.
[20:04:46] <rue_house> I'd go with low ESR, and
[20:04:59] <rue_house> high temp ratings
[22:07:17] <Mr_Sheesh> Question on performance; I've had a friend suggesting 32u4's saying they are higher performance than a 328p; Anyone used both & compared their performance? Trying to find a comparison, not sure there'd be that much difference but could learn something :)
[22:12:14] <Casper> Mr_Sheesh: easy
[22:12:17] <Casper> check the opcode list
[22:12:32] <Casper> they have the list AND the cycle required per opcode
[22:12:37] <Casper> see if there is any difference
[22:12:46] <Casper> chance is that it's minimal, if any
[22:14:14] <Mr_Sheesh> I know the 32U4 has more goodies, haven't looked at it yet tho. I was imagining 10% faster maybe? More cost too, I don't need all the pins, first project I've needed a huge run later on so leaning 328p as $1.50 cheaper. (RF mesh thing with a hundred nodes per install & cost will be an issue...)
[22:14:49] <Mr_Sheesh> USB is nice, might use 32u4 on one other project just for that as it'll be USB attached
[22:16:00] <Mr_Sheesh> Its just that both are same opcodes basically & 1 clock/instr. so hard to have lots more performance at same clock speed :)
[22:19:29] <Xark> Mr_Sheesh: No, 32U4 is AFAIK identical cycle times etc. It does have 2.5KB of RAM vs 2K though. Also if you are using USB, then the USB interrupts will have a cost.
[22:20:21] <Mr_Sheesh> Good point; Less than bit-banging USB tho; Better to use another processor than bit bang really? Hmmm
[22:20:47] <Xark> Mr_Sheesh: I am not saying they are a bit deal, but they must have some cost.
[22:20:56] * Xark has to disable USB when bit-banging video...
[22:21:03] <Xark> big*
[22:21:23] <Mr_Sheesh> This thing needs to talk with a pc a little but not lots, might use bluetooth instead - enough to do it
[22:21:43] <Mr_Sheesh> yeah video = more work :)
[22:23:05] <Mr_Sheesh> Some put in an external 40-50MHz clock, overclock their AVR, for video etc. Fortunately my stuff is mostly very slow, just has to be very very reliable.
[22:23:14] <Xark> It means I don't do video development on USB parts (since UART still works). :)
[22:23:38] <Mr_Sheesh> Makes sense :)
[22:24:33] <Xark> Naw, I am just using stock 16MHz and careful coding. I got a ~1MHz 6502 emulator while bit-banging video -> https://imgur.com/8l5f82F
[22:25:15] <Mr_Sheesh> Nince tho 6502 cpus arent all that costly? -grins- LOL
[22:25:49] <Xark> Mr_Sheesh: Yeah. Video is ~80% of CPU. So probably 2 or 3MHz equivalent with screen blanked.
[22:26:36] <Xark> Something like 12 cycles for NOP (or 13 for load immediate etc.).
[22:26:45] <Xark> (AVR cycles)
[22:27:21] <Mr_Sheesh> Zoomish. I remember 8008 processors, MOT pissed me off (they wouldn't talk to mere students) tho eventually they figured out how much that cost them & fixed that.
[22:28:10] <Mr_Sheesh> Now make the whole thing do that isochronously, you'll go nuts :p
[22:28:13] <Xark> I started with 6502.
[22:28:40] * Xark does have a gutted Altair case though - one of these days I'll put an AVR or something in it to blink the LEDs and read the switches. :)
[22:29:27] <Xark> 8008 sounds a bit "rough". 8080 seems much nicer. :)
[22:29:58] <Mr_Sheesh> Better than the 4004 was! I liked the Z80 even more tho :)
[22:30:39] <Xark> I never cared for confusing Z-80 mnemonics. LD, wait...this is a store? :)
[22:30:48] <Mr_Sheesh> My mother still has her 12MHz Z80 (D? IDK) with 2 1.2MB 8" floppies :) Pretty wood case
[22:30:58] <Mr_Sheesh> Yeah there IS that
[22:31:45] * Xark has a 8MHz Z-80 in a metallic baggy in front if him - someday destined for a breadboard. :)
[22:33:13] <Mr_Sheesh> Fun :) I've had embedded contracts w/ z80s in there, one had an 80c186 too, talking together in dual port ram, that one was a fun but tough one :) Z80s work well :)
[22:35:27] <Xark> Other than a tiny bit on TRS-80, I never really used "80" chips of any flavor until 32-bit 386 (and Linux). I went from 6502 to 68000 mostly (with a bit of work on 6809, TMS9900, 8048 etc.)
[22:37:43] <Mr_Sheesh> I did mainframes but had the z80 at home, eventually went to an 8086 (compaq), then on up the x86 chain; Have done 6502ish uCs on embedded stuff, among others :)
[22:38:06] <Mr_Sheesh> still have too many of the old machines, long story
[22:38:16] <Xark> Mr_Sheesh: I see. I followed the "hot" game machines. :)
[22:38:25] <Mr_Sheesh> aaah :)