#avr | Logs for 2014-10-06

Back
[04:19:26] <RikusW> megal0maniac: are you around ?
[04:26:18] <RikusW> Tom_itx: https://sites.google.com/site/megau2s/home/supporting-software source for my U2S in the FW4 file
[05:29:14] <Lambda_Aurigae> morning all.
[05:30:14] <LeoNerd> hello
[05:30:41] <Lambda_Aurigae> orba, what programmer hardware do you have?
[05:30:54] <Lambda_Aurigae> hi LeoNerd
[05:33:13] <RikusW> Hi LeoNerd
[05:33:38] <RikusW> see above for the fill STK500 source
[05:33:38] <RikusW> *full
[05:36:06] <LeoNerd> RikusW: Oooh... Hmm. OK. I could take a look, though I like the idea of a cleanroom impl. at present
[06:01:58] <Lambda_Aurigae> http://www.computerhistory.org/_static/atchm/early-digital-research-cpm-source-code/
[06:02:09] <Lambda_Aurigae> anybody up to porting CP/M to the AVR?
[06:03:28] <Mr_Sheesh> You could look at ZCPR4 also as it's open source too
[06:03:36] <Mr_Sheesh> Which AVR would you target it at?
[06:04:07] <Mr_Sheesh> (Late for me tonight, 3:45amish, I'd best go sleep...) Curious tho as I grew up with CP/M then ZCPR3
[06:07:08] <Lambda_Aurigae> I would start with the atmega1284p
[06:07:31] <Lambda_Aurigae> faster, more program space, and more ram than the original cp/m machines.
[06:08:00] <Lambda_Aurigae> there is source for several versions on three along with lots of manuals.
[06:08:25] <Mr_Sheesh> Friend likes that ATMega32U4 a lot but the 1284 could do, hmmm :) Well, all for tonight for me
[06:08:45] <Lambda_Aurigae> atmega1284p has 16K of sram.
[06:08:52] <Lambda_Aurigae> lots of room to play..
[06:09:03] <Lambda_Aurigae> then could back it down to something else,,,even something with USB
[06:12:17] <Lambda_Aurigae> http://nesssoftware.com/home/mwc/XYBASIC.php
[06:12:19] <Lambda_Aurigae> oooooo
[06:12:20] <Lambda_Aurigae> hehe
[06:14:30] <Mr_Sheesh> atmega32u4 has USB, that's a thought. Anyways - Night :)
[08:06:42] <RikusW> new AVR site -> http://danyk.cz/index_en.html
[08:06:58] <RikusW> well once you get past the crazy HV stuff
[08:08:04] <Lambda_Aurigae> not really new
[08:08:08] <Lambda_Aurigae> that's been around a long time.
[08:08:14] <Lambda_Aurigae> and still uses parallel port programmer.
[08:08:18] * RikusW just found it
[08:12:38] <theBear> i still use parport programmer, the rifraf special, got a problem with that ?
[08:13:03] <Lambda_Aurigae> nope.
[08:13:08] <Lambda_Aurigae> I still use my first one too.
[08:13:12] <Lambda_Aurigae> it just works.
[08:14:02] <Lambda_Aurigae> even on this new computer..found out it had both parallel and serial ports after I put it together then had to find an adapter cable thingie.
[09:05:10] <LeoNerd> What does anyone rate my chances of being able to replace the timing crystal on a Nano board, vs. just building up a new one with a 328 on a board directly..?
[09:05:26] <LeoNerd> I'd like to talk 11520baud serial, but the 16MHz crystal makes that hard
[09:05:32] <LeoNerd> a 14.{mumble} is what I want
[09:06:32] <Lambda_Aurigae> no clue about the nano board.
[09:06:40] <Lambda_Aurigae> is it surface mount or through hole?
[09:07:32] <LeoNerd> Oh. hmm. I forget offhand.
[09:07:36] <LeoNerd> I don't have it in front of me
[09:08:45] <Lambda_Aurigae> well, from the picture on the ardweeny site, it's a through hole.
[09:08:51] <Lambda_Aurigae> so should be easy to desolder and replace.
[09:09:18] <Lambda_Aurigae> hmm.
[09:09:19] <Lambda_Aurigae> wait.
[09:09:24] <Lambda_Aurigae> different pic there.
[09:09:31] <Lambda_Aurigae> nope..it's surface mount.
[09:09:44] <LeoNerd> Hmm.. 3.7% error, at 16MHz/115.2kbaud
[09:10:00] <Lambda_Aurigae> depends on how good the uart is at the other end.
[09:10:20] <LeoNerd> The onboard FTDI
[09:10:40] <LeoNerd> I wonder if I could convince that into something nonstandard
[09:11:34] <LeoNerd> Actually, thinking about it I probably don't need it that fast to test it with now. I'll run it slower for now
[09:12:20] <jadew> 3.7% is pretty big, but should be doable
[09:12:29] <jadew> I wouldn't trust it tho
[09:13:49] <Lambda_Aurigae> is the ftdi chip capable of that speed?
[09:14:10] <jadew> FTDI chips usually have better resolution than regular MCUs
[09:14:56] <jadew> and I think they're made to get a lot closer to the standard baudrates
[09:14:58] <LeoNerd> Mmm.. Maybe instead then I should pick a round number on the AVR and get the FTDI to match
[09:15:25] <jadew> LeoNerd, good idea, go for 125k
[09:15:26] <LeoNerd> Or, failing that just buy myself a brand new 328 and crystal
[09:15:52] <jadew> what are you trying to do anyway?
[09:16:24] <LeoNerd> Base station between an nRF24L01-based radio network, and the laptop controlling it
[09:16:51] <LeoNerd> Though I think the more I offload onto the AVR chip, the slower the laptop link needs to be. so maybe I don't need it this fast
[09:18:16] <jadew> you can probably use v-usb and get away with out the ftdi chip :P
[09:18:59] <jadew> personally I'm using the mcp2200 chips whenever I need a simple USB 2 Serial thing, because I can clock them from the same crystal as the main chip
[09:19:09] <jadew> and the baudrate generation works in the same way
[09:19:15] <jadew> so you'll get perfect baudrate match
[09:19:46] <jadew> the mcp2200 is just a repurposed 18f<something> PIC
[09:20:37] <LeoNerd> Ah hmm
[09:24:21] <Lambda_Aurigae> yup...
[09:24:42] <Lambda_Aurigae> although, I think it's a pic16F isn't it?
[09:25:02] <jadew> Lambda_Aurigae, 18f14k50
[09:25:13] <Lambda_Aurigae> I just use pic chips for usb interfaces these days.
[09:25:14] <Lambda_Aurigae> aahh.
[09:25:24] <jadew> (too bad they're not making the mcp2200 in DIP packages too)
[09:25:31] <Lambda_Aurigae> yeah.
[09:25:34] <Lambda_Aurigae> cause that chip comes in dip.
[09:25:46] <Lambda_Aurigae> but, I have code here to do much the same thing with several different pic chips.
[09:25:46] <jadew> I'm using the MCP2200 and I always write my own firmware :P
[09:26:01] <Lambda_Aurigae> you wipe the mcp2200 then?
[09:26:05] <jadew> yeah
[09:26:22] <jadew> the thing is the mcp2200 is cheaper than the regular 18f :P
[09:26:29] <jadew> maybe by $1 or so
[09:26:33] <Lambda_Aurigae> I get them free.
[09:26:39] <jadew> hah, neat :)
[09:26:45] <Lambda_Aurigae> free samples rock.
[09:27:38] <Lambda_Aurigae> lately I've been playing with the 32bit pic chips though.
[09:27:48] <Lambda_Aurigae> the pic32mx250f128b rocks.
[09:28:02] <RikusW> LeoNerd: 16MHz and 115200bps works just fine
[09:28:15] <LeoNerd> Really? The chart claims ~3% error
[09:28:22] <jadew> yeah, I noticed them too when I was scouting for a main chip for my project, but skipped them in favor of an ARM chip
[09:28:33] <LeoNerd> I can't imagine that's going to work all that well. and in hindsight I wonder if it's why my current project sometimes stalls the serial link
[09:28:37] <jadew> LeoNerd, 3% error is doable as I said earlier
[09:28:45] <Lambda_Aurigae> jadew, reason I went with them was, dip package..
[09:28:51] <jadew> but I still wouldn't trust the link, it's pretty high
[09:29:11] <RikusW> I used U2X=1 and UBRR=16
[09:29:14] <Lambda_Aurigae> that and it's a mips core.
[09:29:21] <RikusW> 2.1% error
[09:29:22] <Mr_Sheesh> I found avr's had an easier "need more pins" migration path, moved there from PICs
[09:30:07] <Lambda_Aurigae> Mr_Sheesh, I much prefer AVR over PIC,,at least in the 8bit world.
[09:30:26] <jadew> I prefer AVR over anything is the performance is the same
[09:30:30] <Mr_Sheesh> Yep; I'll go ARM for more power I'd think
[09:30:32] <Lambda_Aurigae> I started with 8bit pic and even earlier, z80 and 6502 8bit processors.
[09:30:34] <jadew> I recently learned that Atmel rocks
[09:30:45] <jadew> and every other manufacturer out there is garbage because:
[09:30:47] <RikusW> LeoNerd: And I did transfer quite a bit of data over that link without any problems
[09:30:52] <LeoNerd> Hmm
[09:31:03] <jadew> Atmel properly implements peripherals
[09:31:10] <RikusW> There was a SIM900 on the receiving end
[09:31:15] <Mr_Sheesh> Staeted with 6502's, 4004s sucked :p, 8008s were OK, Z80s were better & its far better now
[09:31:18] <jadew> and 2) Atmel pays attention to detail.
[09:31:21] <RikusW> maybe its clock is off a little too :-P
[09:31:53] <jadew> I'm exagerating a bit, but it's not far from the truth
[09:32:17] <jadew> Atmel really makes kick ass peripherals
[09:32:37] <Lambda_Aurigae> PIC chips aren't all that bad...bit slow by comparison in the 8bit world...but they do have some nice peripherals too.
[09:32:58] <Lambda_Aurigae> and having usb on a dip package helps me a whole heaping bunch.
[09:33:04] <jadew> Lambda_Aurigae, for my current project I had to go thourh a lot of chips and check their peripherals in details
[09:33:22] <jadew> for example PICs don't have a proper USART implementation
[09:33:28] <hackvana> Self-selecting crowd: Folks who like PIC over AVR don't last long in here :-)
[09:33:30] <jadew> neither do STM32 chips
[09:33:53] <jadew> hackvana, I like PIC too
[09:34:03] <Lambda_Aurigae> they all have their uses and niches.
[09:34:19] <jadew> I'm no fan boy, but Atmel seems to really differentiate itself from the competition in this regard
[09:34:23] <Lambda_Aurigae> 8bit pic hasn't impressed me too much but the 32bit pic chips have.
[09:34:24] <jadew> they make proper chips
[09:35:01] <hackvana> jadew: Shh, if you don't say it again, people might forget... :-) )
[09:35:17] <jadew> hehe
[09:35:56] <jadew> there are obviously advantages when chosing a different manufacturer, like price, speed, number of peripherals, etc
[09:36:50] <jadew> but if I had the choice I'd go for Atmel in a heartbeat
[09:36:52] <Lambda_Aurigae> jadew, what usb stack do you use on that mcp2200?
[09:37:08] <jadew> Lambda_Aurigae, I found an open source one that I modified a bit
[09:37:16] <Lambda_Aurigae> honken's?
[09:37:23] <jadew> but it has one problem: if you reboot, you have to unplug and plug back in
[09:37:29] <jadew> Lambda_Aurigae, let me check
[09:37:33] <Lambda_Aurigae> or mstack?
[09:38:09] <jadew> yes, Honken's
[09:38:15] <Lambda_Aurigae> I'm looking for one that will run without a crystal...that chip is supposed to be able to do it.
[09:38:57] <jadew> shouldn't be that hard to modify, you just have to use the internal clock and calibrate it on the usb frames
[09:39:21] <Lambda_Aurigae> yeah, something I don't know how to do.
[09:39:26] <jadew> V-USB does that, the code for it is only several lines long IIRC, you may be able to steal it from there :)
[09:39:39] <hackvana> The way V-USB does that is quite interesting
[09:39:52] <hackvana> Esp on the ATtiny45/85
[09:40:01] <Lambda_Aurigae> doesn't it use the pll for that?
[09:40:02] <hackvana> It relies on the 45/85 having a PLL
[09:40:04] <hackvana> Yeah
[09:40:22] <hackvana> Whoever first thought of that idea was a brainiac
[09:40:49] <Lambda_Aurigae> I still think all microcontrollers should have USB and a built in crystal dangit!
[09:41:20] <LeoNerd> Eh.. builtin crystal means you can't change it
[09:41:33] <dunz0r> Lambda_Aurigae: Not builtin usb, I don't want that :)
[09:41:35] <Lambda_Aurigae> could have an internal switch
[09:41:49] <dunz0r> I think all AVRs have a builtin resonator
[09:42:02] <Lambda_Aurigae> dunz0r, it's an RC oscillator.
[09:42:02] <dunz0r> At least the Atmegas and AtTinys do
[09:42:03] <Mr_Sheesh> what rc calibrated osc isn't good enough? :p
[09:42:19] <dunz0r> Good enough for most things that doesn't need timing :)
[09:42:25] <Lambda_Aurigae> yeah.
[09:42:41] <Lambda_Aurigae> I've done 57.6K on the usart with built in rc oscillator.
[09:42:51] <jadew> can you imagine a world where they don't have proper resonators
[09:42:51] <hackvana> Lambda_Aurigae: Why if they had that stuff, it'd drag them kicking and screaming into the 21st century!
[09:42:59] <jadew> so they conclude that time is relative, based on temperature
[09:43:06] <dunz0r> I've done 9600 bps with the RC-oscillator, works fine :)
[09:43:24] <Lambda_Aurigae> I like autobaud with the rc oscillator..works well.
[09:44:02] <jadew> yeah, I think the RC osc is good enough for serial even up to higher baudrates, the problem is that it's usually off from the main frequency
[09:44:26] <Lambda_Aurigae> jadew, and I have had it drift enough to throw off comms too.
[09:44:42] <jadew> Lambda_Aurigae, after centering it?
[09:44:50] <Lambda_Aurigae> yeah.
[09:45:03] <Lambda_Aurigae> mostly that was because of non-stable voltage though.
[09:45:10] <jadew> still, pretty sad
[09:45:33] <Lambda_Aurigae> power from a poorly built joule thief.
[09:47:26] <Lambda_Aurigae> so, anybody playing with those new wifi-to-serial adapter boards?
[09:47:58] <jadew> what wifi-to-serial boards?
[09:48:10] <Lambda_Aurigae> 5 dollar chinese wifi adapter boards.
[09:48:26] <jadew> link?
[09:48:35] <Lambda_Aurigae> https://www.google.com/search?client=ubuntu&channel=fs&q=ESP8266&ie=utf-8&oe=utf-8
[09:48:54] <jadew> neat
[09:48:58] <Lambda_Aurigae> someone even got GCC compiling for the processor onboard.
[09:49:44] <Lambda_Aurigae> fully integrated tcp/ip stack.
[09:49:52] <hackvana> Last I heard, the compiler was working, but using it for real code still had problems
[09:49:57] <Lambda_Aurigae> https://espressif.com/en/products/esp8266/
[09:50:15] <Lambda_Aurigae> hackvana, yeah...but using it as an spi to wifi adapter still works well.
[09:50:33] <Lambda_Aurigae> someone wrote a web browser for ardweeny and used it.
[09:50:35] <hackvana> Sure, they're revolutionary modules
[09:50:57] <hackvana> And it will be great when gcc is there as a completely open toolchain. Just that it's not 100% there yet.
[09:51:05] <hackvana> Bring on that day
[09:51:20] <Lambda_Aurigae> seems to use AT commands to set it up.
[09:51:31] <Lambda_Aurigae> heck, I'll pay 5 bucks each for a handfull of them!
[09:52:06] <Lambda_Aurigae> https://dl.dropboxusercontent.com/u/307560/ESP8266%20WIFIATCOMMANDS_English.pdf
[09:53:50] <jadew> I just ordered 2
[09:53:54] * Lambda_Aurigae is envisioning wifi enabled swarm bots!
[09:54:21] <jadew> I spoke too early
[09:54:28] <jadew> my card has been declined :/
[09:54:34] <Lambda_Aurigae> aawww.
[09:54:47] <Lambda_Aurigae> seeed studio has them for 6.95 USD each.
[09:55:08] * jadew takes his belt off and goes to have a chat with the wife
[09:55:42] <jadew> Lambda_Aurigae, I found them for 5.6 USD on ebay
[09:56:02] <jadew> http://www.ebay.co.uk/itm/ESP8266-Serial-WIFI-Wireless-TransceiveR-Module-Send-Receive-LWIP-AP-STA-/171465671714
[09:56:16] <jadew> and this: http://www.ebay.co.uk/itm/ESP8266-Serial-WIFI-UART-Wireless-Transceiver-Module-Send-Receive-LWIP-AP-STA-/181530988310
[09:56:32] <jadew> I'm gonna get both
[09:56:47] <Lambda_Aurigae> just need antenna for the one.
[09:56:57] <jadew> I know
[09:56:59] <Lambda_Aurigae> but looks like you could rip the antenna out of a dead laptop for that.
[09:57:11] <jadew> it's great for taking out an antena plug out of a device
[09:57:57] <jadew> I already have extension/conversion cable from that kind of plug to sma
[09:58:47] <Lambda_Aurigae> I could see making wifi speakers with them,,,amongst many other things.
[10:00:16] <jadew> ffs... paypal is now rejecting my card (it's a debit card and it ran out of money)
[10:01:11] <Lambda_Aurigae> looks like these are uart interfaced...at least the ones from seeed studio are.
[10:01:30] <Lambda_Aurigae> other interfaces aren't brought out.
[10:58:02] <[F_F]> I wonder if Beta changes dramatically in a Bipolar transistor
[10:58:06] <[F_F]> without any "reason"
[10:58:18] <[F_F]> besides of course Heat
[10:59:02] <jadew> Lambda_Aurigae, just finished paying for those modules, apparently my session remembered that my card is denied and couldn't go thourgh even if I added money to the card
[11:13:55] <twnqx> oh right
[11:27:17] <[F_F]> hi?
[11:32:26] <megal0maniac> [F_F]: Hello
[11:50:46] <Lambda_Aurigae> jadew, oops.
[11:51:21] <twnqx> Lambda_Aurigae, what was that chip again?
[11:51:37] <Lambda_Aurigae> twnqx, the wifi thingie?
[11:51:48] <twnqx> yes
[11:51:52] <Lambda_Aurigae> https://www.google.com/search?client=ubuntu&channel=fs&q=ESP8266&ie=utf-8&oe=utf-8
[11:51:55] <twnqx> wanted to buy one or two in china :P
[11:51:57] <Lambda_Aurigae> esp8266
[11:52:09] <N1njaneer> Hello all you crazy AVR people! It's time for another fascinating week!
[11:52:26] <twnqx> 14 yuan
[11:52:31] <twnqx> man, that's almost 2 euro!
[11:52:42] <Lambda_Aurigae> N1njaneer, yeah.
[11:52:50] <Lambda_Aurigae> I gotta go put an alternator in my truck now.
[11:56:02] <twnqx> what's the difference between the 8266 and the 8266ec?
[11:56:04] <twnqx> ex*
[11:57:44] <Lambda_Aurigae> dunno.
[11:59:55] <twnqx> do nobody switch at GPIO or PWM . or ADC ( ESP8266EX) or other
[12:00:12] <twnqx> if my parser doesn't fail that translates to "the EX has an ADC"
[12:00:25] <Lambda_Aurigae> aaahh.
[12:00:38] <Lambda_Aurigae> most of the boards I'm seeing don't have those pins brought out though.
[12:00:56] <Lambda_Aurigae> would be nice to have them brought out and accessible.
[12:02:32] <jadew> should be easy enough to roll your own board if you need them tho
[12:03:22] <Lambda_Aurigae> I'm sure someone will do so soon enough.
[12:04:37] <jadew> LCD displays seem to get cheaper
[12:04:50] <jadew> I ordered this yesterday: http://www.ebay.co.uk/itm/200939222521
[12:04:54] <jadew> seems like a really good deal
[12:06:02] <Lambda_Aurigae> SD card slot on the back?
[12:06:31] <jadew> yeah, so you get to desolder something too :P
[12:06:55] <Lambda_Aurigae> I would leave it there.
[12:07:03] <jadew> I actually like that slot
[12:07:11] <[F_F]> nice!
[12:07:29] <jadew> it seems much more compact than other slots I tried
[12:07:39] <[F_F]> So... it actually has its own uC?
[12:07:44] <jadew> ah, it's for full blown SD card
[12:07:50] <[F_F]> and you store "images"on that SD?
[12:08:15] <Lambda_Aurigae> ok..gotta go put an alternator in my truck.
[12:08:24] <jadew> [F_F], possibly, but it could also be routed to the same SPI lines and have different CS
[12:09:17] <[F_F]> is there a tutorial where it explain how to drive a "RAW" laptop monitor?
[12:09:30] <[F_F]> without any other uC in between?
[12:09:53] <twnqx> jadew: is that a sainsmart, too?
[12:10:14] <jadew> twnqx, I don't know what that is
[12:10:27] <twnqx> a chinese maker of thart kind of kit
[12:10:39] <jadew> ah, I don't know
[12:11:52] <[F_F]> what kind of processor does a solar calc uses?
[12:12:08] <[F_F]> There should be a solar powered "Python" table kindish....
[12:12:18] <[F_F]> So you could easily add more function to it
[12:12:21] <N1njaneer> F_F: A lot of times that kind of high-volume stuff is an ASIC
[12:12:23] <[F_F]> like a TI-80 calc
[12:12:40] <N1njaneer> TI scientific calculators are typically Z80 based :)
[12:12:49] <[F_F]> TI-83*
[12:12:59] <[F_F]> but I think they are not solar powered
[12:42:17] <tunixbsd> Someone knows a good tutorial of how to use the GNU ld in AVR ?
[12:43:49] <LeoNerd> It's just standard ld
[12:44:01] <LeoNerd> There's nothing particularly AVRish about it
[12:48:17] <N1njaneer> tunixbsd: What specifically about it?
[12:48:23] <tunixbsd> i'm using the avr-gcc to assemble my assembly code and i'm trying to write my own link script to pass to avr-ld via the -T argument
[12:49:17] <jadew> search for linker script tutorial
[12:57:18] <jadew> hey OndraSter
[12:57:23] <OndraSter> hey
[12:57:37] <jadew> I meant to ask you, what happened to your xboard project?
[12:57:45] <OndraSter> domain expired
[12:57:54] <OndraSter> pretty much nothing happened with it
[12:57:56] <jadew> you never got that into production?
[12:57:59] <OndraSter> no
[12:58:03] <OndraSter> because TI and their ARM came out
[12:58:06] <OndraSter> with $10 board
[12:58:10] <megal0maniac> Sigh
[12:58:18] <megal0maniac> BUT SO MANY PERIPHERALS
[12:58:20] <jadew> was thinking that you could have made a shitload of money if you crowdsourced that
[12:58:33] <jadew> arduino stuff seems to always get funded
[12:58:35] <OndraSter> heh
[12:59:06] <jadew> seriously, you really had something going
[12:59:09] <OndraSter> :D
[12:59:12] <OndraSter> it was just a board
[12:59:13] <OndraSter> with caps
[12:59:16] <OndraSter> (and power supply)
[12:59:26] <jadew> + arduino like IDE
[12:59:35] <OndraSter> that was proof of concept really
[12:59:44] <OndraSter> and written in .NET... and people dislike Mono for some reason
[13:01:25] <OndraSter> nowadays I'm more looking on some faster platforms (MIPS? ARM?) - 400MHz? 600MHz? With lots of ethernet ports ;)
[13:01:48] <OndraSter> and already built. That I can work on
[13:01:54] <OndraSter> kinda moved into networking
[13:03:46] <jadew> ah, neat
[13:04:15] <jadew> I moved on ARM too
[13:04:36] <megal0maniac> Still rockin' the 328 :)
[13:04:50] <OndraSter> by "moved into networking" I mean I am dealing with ciscos and mikrotiks (and linux stuff) :D
[13:05:26] <megal0maniac> Should be using the xmega, really, but I have more of these and it's easier to port up to xmega than down to mega
[13:05:51] <jadew> megal0maniac, I'm doing that too really, I didn't give up on AVRs
[13:06:20] <megal0maniac> Busy writing my own lib for nrf. It isn't easy :/
[13:06:30] <OndraSter> lies
[13:06:34] <jadew> OndraSter, at the electronics level or you mean you're studying networking stuff
[13:06:39] <megal0maniac> OndraSter: Only if you've done it before
[13:06:45] <OndraSter> I am not studying networking stuff, I am working on it
[13:06:51] <OndraSter> I am studying life sciences or whatever I am supposed to study
[13:07:06] <OndraSter> it does everything for you, megal0maniac :P
[13:07:27] <megal0maniac> OndraSter: Yeah but you still have to tell it to do the things
[13:07:32] <OndraSter> :P
[13:07:48] <megal0maniac> And my C programming skilz are pretty average at best
[13:07:54] <OndraSter> ah
[13:08:03] <OndraSter> we had lots of C and even more C++ on CTU
[13:08:06] <OndraSter> before they kicked me out :D
[13:08:15] <megal0maniac> ?
[13:08:19] <OndraSter> I failed uni
[13:08:24] <OndraSter> so I went somewhere else
[13:08:42] <megal0maniac> They catch you getting high in the parking lot under the trees again?
[13:08:55] <OndraSter> :(
[13:08:57] <OndraSter> I wish
[13:09:25] <OndraSter> I didn't agree on learning all the definitions and stuffs for maths and linear algebra
[13:09:28] <OndraSter> xD
[13:09:30] <megal0maniac> I'm struggling to focus on uni stuff. I know how it goes. I want to do SO MANY OTHER THINGS
[13:09:56] <megal0maniac> Fourier and Laplace transforms. What what??
[13:10:05] <OndraSter> hehe
[13:10:23] <megal0maniac> And working next year, so job interviews in between. Making me focus very much on next year and not much on now
[13:10:28] <N1njaneer> megal0maniac: This is a good attitude to have! :D
[13:10:40] <megal0maniac> N1njaneer: Which one? I have many :D
[13:11:02] <megal0maniac> The focusing on next year part?
[13:11:44] <OndraSter> I've been workiing since previous april (2013) (I think?) on my middle school where I studied before :D
[13:11:52] <OndraSter> reworking the network and services
[13:12:10] <OndraSter> moved it from novell to MSAD, from 1x100Mbit going from left to right to several-gbit...
[13:12:41] <twnqx> you should have introduced yellow cable with vampire taps!
[13:12:47] <twnqx> just because of the cool sounding name...
[13:13:21] <megal0maniac> I want vampire taps
[13:13:25] <OndraSter> but working in govt sector is awful
[13:13:28] <megal0maniac> I don't know what they are but I need them
[13:13:29] <twnqx> i want one
[13:13:40] <twnqx> for my collection of long-obsolete stuff
[13:13:52] <megal0maniac> (I also want a gigabit ethernet hub)
[13:13:58] <twnqx> unpossible
[13:14:05] <OndraSter> hub?!
[13:14:09] <OndraSter> gigabit?!
[13:14:10] <megal0maniac> OndraSter: Yes
[13:14:12] <twnqx> gigabit ethernet can only be switched, half-duplex is not specified
[13:14:17] <OndraSter> :)
[13:14:22] <megal0maniac> twnqx: I want it though :D
[13:14:26] <OndraSter> make it.
[13:14:43] <OndraSter> the closest you can get is probably better switch with port mirroring or whatever is it called on other switches
[13:14:51] <megal0maniac> There's a clever design for a network tap which puts capacitance on the lines and forces 100mbps link
[13:14:54] <twnqx> simple enough: get an ethernet switch chip, and switch it to full floodign by disabling mac-learning
[13:15:10] <twnqx> effectively the same as a hub.
[13:15:26] <OndraSter> do not come close to any of my networks though :D
[13:15:29] <megal0maniac> That's what I was thinking. Surely you can trick a switch into operating that way
[13:15:42] <Lambda_Aurigae> I have a 100Mb/s ethernet tap switch for doing packet captures...and I've seen gigabit versions.
[13:15:49] <twnqx> me too
[13:15:52] <twnqx> hell, i sold them
[13:16:09] <Lambda_Aurigae> we even have a version with poe passthrough.
[13:16:16] <megal0maniac> Well that's just port mirroring, no?
[13:16:20] <twnqx> megal0maniac: in "the early days" you could just flood a switch with more mac addresses than it could buffer, forcing it to flood packets
[13:16:34] <megal0maniac> twnqx: That's still a thing, apparently
[13:16:44] <twnqx> better switches have protection
[13:16:58] <megal0maniac> One of my infosec friends ran into it. Every now and then he'd get packets destined for someone else
[13:17:00] <N1njaneer> megal0maniac: Just get a cheap managed switch and do port monitoring :)
[13:17:11] <N1njaneer> er mirroring
[13:17:11] <megal0maniac> http://imgur.com/0Zf74XN
[13:17:20] <OndraSter> if you want cheap then dlink dgs1210-08 should be able to do that
[13:17:24] <Lambda_Aurigae> megal0maniac, yeah...port 1 mirrors to port 5...so anything coming and going on port 1 also gets sent to port5...along with everything going to port 5 normally.
[13:17:24] <OndraSter> it costs something like $100 I think
[13:17:59] <OndraSter> or at least the 24 port one can do it :P
[13:18:16] <megal0maniac> Would that do it? Disabling learning and ageing?
[13:18:33] <twnqx> disabling aging won't, that's the opposite :P
[13:18:45] <jadew> http://imgur.com/gallery/btxxExy
[13:19:15] <megal0maniac> Hahaha
[13:19:23] <megal0maniac> Well, those are the two options on my switch
[13:22:53] <megal0maniac> Lambda_Aurigae: He said it basically broadcast all incoming traffic. Effectively became a hub
[13:23:07] <megal0maniac> Oh wait, that's not right
[13:24:01] <jadew> http://imgur.com/gallery/nz0nZ
[13:24:05] <megal0maniac> More on topic, why the hell won't this jtagice3 debug?
[13:25:13] <megal0maniac> It just says that the device doesn't support debugging, so it programs only. It's an atmega328. It's supposed to enable debugwire for the session, then disable it and close
[13:25:38] <Lambda_Aurigae> megal0maniac, ummm,,,you need to add burbon.S to your source.
[13:25:57] <megal0maniac> Oh of course
[13:25:58] <megal0maniac> silly me
[13:26:09] <OndraSter> bourbon?
[13:26:17] <megal0maniac> OndraSter: Don't you know?
[13:26:20] <Lambda_Aurigae> what else would you pour over ice?
[13:26:25] <OndraSter> :)
[13:26:27] <OndraSter> no megal0maniac
[13:26:38] <Lambda_Aurigae> yeah, my misspelling.
[13:26:53] <Lambda_Aurigae> oh well....brkfst.com didn't load today. I had no cereal port.
[13:27:01] <megal0maniac> Oh lol
[13:27:13] <megal0maniac> debugwire and isp are seperate
[13:27:23] <Lambda_Aurigae> of course they are.
[13:27:25] <OndraSter> doesn't dW just use reset?
[13:27:34] <megal0maniac> Exactly
[13:27:40] <LeoNerd> Do I understand correctly that debugWire is essentially a black-box outside of Atmel? I don't find any published specs on how it works
[13:27:49] <OndraSter> yes
[13:27:55] <megal0maniac> Affirmative
[13:28:01] <LeoNerd> Ah; that's a shame :(
[13:28:03] <OndraSter> some people actually tried watching it talk to the chip
[13:28:04] <megal0maniac> RikusW did some reverse engineering
[13:28:06] <OndraSter> and found out some stuff
[13:28:07] <OndraSter> yea
[13:28:13] <megal0maniac> It's basically serial
[13:28:17] <LeoNerd> Yah.. his(?) name does keep coming up all over :)
[13:28:18] <megal0maniac> At some silly baud
[13:28:30] <megal0maniac> LeoNerd: He knows some things
[13:28:42] <LeoNerd> I found a document that had his name at the bottom
[13:28:54] <LeoNerd> http://www.ruemohr.org/docs/debugwire.html
[13:29:14] <LeoNerd> It looks more like some internal notes-to-self than something intended for others to read though.. A few snippets and hints here and there
[13:29:16] <megal0maniac> That's the one
[13:29:19] <Lambda_Aurigae> that's just a rumor...ruemor...ruemohr......whatever.
[13:30:12] <LeoNerd> clk/128 serial
[13:31:27] <Lambda_Aurigae> so it's a 2-way usart over 1 wire it seems.
[13:31:32] <Lambda_Aurigae> or uart
[13:31:57] <LeoNerd> Yah. finding that is easy enough. It's the decoding of the numbers that's the fun bit :)
[13:32:12] <LeoNerd> Well in any case this doesn't look trivially easy now, so I'll save it for another day
[13:54:45] <megal0maniac> Hmmm... I could poke at it with an LA I guess :)
[13:57:22] <jadew> I looked into it too and also left it for later :P
[13:57:40] <jadew> I don't think it's that big of a deal tho
[13:58:35] <jadew> and for the record, I too found RikusW's name when I was looking into it :)
[14:02:28] <jadew> I think that at this point it's too late to bother with it anyway
[14:02:42] <jadew> there are lots of good & cheap programmers out there that can also debug
[14:02:48] <megal0maniac> I've chatted to him about it at length
[14:02:56] * jadew has an atmel ice - does everything
[14:03:05] <jadew> me too
[14:03:27] <jeremyabel> but does it cool your drink?
[14:03:28] <megal0maniac> His research did provide one nifty trick though. His programmer can disable DWEN dynamically. So ISP still works
[14:03:43] <megal0maniac> jeremyabel: Puh-lease. I have regular ice for that
[14:03:44] <jadew> jeremyabel, if I hold it in the fridge beforehand, sure
[14:04:03] <jadew> megal0maniac, yeah :)
[14:04:03] <jeremyabel> lol
[14:04:08] <megal0maniac> My jtagice3 lacks hvpp. And TPI
[14:04:34] <megal0maniac> Well, all of them do. It's a bit meh. But I have 2 of Rikus' programmers so I'm sorted ;)
[14:04:44] <jadew> I believe Atmel has something about HVPP for the atmel ice device
[14:04:47] <megal0maniac> With the level translation and HVPP add-ons
[14:05:04] <megal0maniac> They should. It's the dragon-slayer, given the price
[14:05:28] <megal0maniac> Lol. I just get lots of framing errors trying to read dW
[14:05:37] <jadew> yeah, seems to be more capable than the dragon, I forget in which regard tho
[14:05:48] <megal0maniac> Less likely to explode?
[14:05:53] <twnqx> it doesn't die when you look at it wrong? :>
[14:06:05] <jadew> twnqx, didn't know the dragon did that :P
[14:06:31] <megal0maniac> I think there's a charge pump / boost converter which REALLY doesn't like being touched
[14:06:43] <megal0maniac> At all. Ever. Or even looked at funny.
[14:06:54] <twnqx> reminds me
[14:06:58] <twnqx> i have a broken stk500 here
[14:07:04] <twnqx> and no idea what's wrong with it
[14:07:51] <jadew> what are the symptoms?
[14:08:24] <twnqx> communication failure, software upgrade failure
[14:08:30] <twnqx> most likely around the secondary avr
[14:09:02] <twnqx> i should say that someone burned and replaced one of the voltage regulators
[14:17:12] <megal0maniac> I WANT TO GO TO THE BEACH
[14:17:23] <megal0maniac> I am tired of being a hermit
[14:20:44] <megal0maniac> RikusW!
[14:20:45] <megal0maniac> Hello
[14:20:51] <RikusW> hi
[14:21:11] <RikusW> got the email ?
[14:21:20] <megal0maniac> I did. And the scrollback :)
[14:21:30] <RikusW> time to learn asm ;)
[14:21:33] <megal0maniac> Downloaded but haven't looked properly yet
[14:22:26] <RikusW> btw reading working asm source is a great way to learn
[14:23:06] <RikusW> megal0maniac: have you seen http://danyk.cz/index_en.html ?
[14:23:52] <megal0maniac> Wow. No, I haven't
[14:23:54] <megal0maniac> *bookmarks
[14:24:05] <RikusW> he does some crazy stuff
[14:24:18] <RikusW> fairly dangerous
[14:24:53] <umquant> that's awesine!
[14:24:55] <umquant> awesome*
[14:25:28] <RikusW> Marx generator 240 000 V .....
[14:25:50] <megal0maniac> Eek
[14:27:46] <megal0maniac> I'm busy playing with debugwire :)
[14:27:52] <megal0maniac> And nrf24l01+s
[14:28:04] <RikusW> how do you connect to dW ?
[14:28:09] <RikusW> plain uart ?
[14:28:10] <megal0maniac> jtagice3
[14:28:13] <RikusW> ah
[14:28:25] <RikusW> addicted ot ocd already ?
[14:28:42] <RikusW> can you even imagine being without it ?...
[14:29:03] <megal0maniac> Haha! Yes. I haven't got a very good workflow going yet
[14:29:29] <megal0maniac> So I think I'd be fine without it. UART is easy and works pretty well
[14:29:41] <RikusW> use both
[14:29:52] <megal0maniac> I do
[15:08:54] <megal0maniac> Haha! I'm actually going to the beach now
[15:09:06] <megal0maniac> 21:49 and pitch dark
[15:24:34] <Lambda_Aurigae> megal0maniac, best time to swim.
[15:24:41] <Lambda_Aurigae> you can't see the sharks and jellyfish@!
[15:24:49] <Tom_itx> heh
[15:29:50] <Lambda_Aurigae> I'm hoping to go to the beach in Jan or Feb of next year.
[15:32:29] <Tom_itx> 7mile beach?
[15:32:57] <Lambda_Aurigae> somewhere down in texas.
[15:35:39] <Tom_itx> Caymen island is nice that time of year
[15:36:45] <Tom_itx> but so is Galveston
[15:37:16] <Lambda_Aurigae> down near south padre island I think.
[16:37:13] <LeoNerd> So, having successfully set up the UART in TX mode, I've now got stdout working by performing the usual fdev_setup_stream() into it
[16:37:36] <LeoNerd> If I now want to output decimal numbers instead of a simple puts() string, is printf() my only choice?
[16:38:32] <twnqx> no, you can just sprintf() and kill all the puts and other overhead with fire
[16:38:34] <twnqx> or backspace
[16:38:53] <LeoNerd> Yah, but printf() pulls in loooooads of code, because it doesn't know what I'm going to do
[16:39:09] <twnqx> well, you can write the code yourself
[16:39:17] <LeoNerd> Whereas I'd quite like some, say, puti(int i); or putu(unsigned int u); functions
[16:39:38] <twnqx> isn't there an inverse atoi?
[16:40:10] <twnqx> hm
[16:40:18] <twnqx> anyway, decimal is expensive anyway :P
[16:40:50] <twnqx> alone because of divide-by-10
[16:40:57] <LeoNerd> Eh.. it's not -that- expensive
[16:41:04] <twnqx> it is
[16:41:11] <twnqx> especially on multi.byte
[16:41:12] <LeoNerd> divide-by-10 is easy enough; it's (i * 0xCD) >> 11
[16:41:33] <twnqx> and now with 32bit ints
[16:41:48] <LeoNerd> There's some very efficient divide-by-ten algorithms around that are much nicer than the generic divmod code that avr-gcc uses
[16:41:56] <LeoNerd> IF you write i / 10 it's very silly
[16:43:17] <twnqx> still, you end up with multi-(cpu-)word multiplications
[16:43:56] <twnqx> and >> 11 is not particularly cheap either, even if it's effectively >> 3 you still have to go from byte to byte through carry, one bit at a time
[16:44:23] <LeoNerd> Ohsure.. but it's still nicer than calling the generic __divmod(i, 10) function
[16:45:27] <twnqx> gcc doesn't optimize such things?
[16:45:31] <LeoNerd> Nop :*
[16:46:02] <twnqx> fun, last i checked its output the only thing i found was a missing optimization with ~ inside while-loops
[16:46:24] <LeoNerd> gcc is horrible. (i * 8) + (i * 2) <== nicely efficient on ATtiny. (i * 10) <== nope. Calls its generic __imul() emulation function
[16:46:39] <LeoNerd> (i*4 + i)*2 rather.
[16:47:15] <LeoNerd> i * j sure is going to be painful, so you should use __imul(), but it doesn't notice multiplication by a constant but non-power-of-2
[16:48:07] <twnqx> i wonder...
[16:48:15] <twnqx> i guess tiny doesn't have a mul instruction?
[16:48:24] <twnqx> iirc the mega8 i looked at had one
[16:48:28] <LeoNerd> Nope. The mega does
[16:49:23] <LeoNerd> I may at some point see if I can write a patch on gcc for it. gcc can notice multiplication by a constant power-of-two, converting the code to the equivalent binary shift operation. I'd like to extend that to sums of two powers of two, at least, because that would cover such cases as i * 10
[16:49:53] <LeoNerd> Any such case is still guaranteed to use fewer cycles / be shorter than the equivalent call to the imul emulation function
[16:50:41] <twnqx> i am not 100% convinced, but i didn't count the cycles yet :P
[16:51:25] <twnqx> in a int*int case you are likely right
[16:51:43] <LeoNerd> b = a * 10 is b = a; b <<= 1; b <<= 1; b += a; b <<= 1;
[16:51:46] <twnqx> int*const char...
[16:52:22] <Tefad> LeoNerd: did you typo?
[16:53:31] <LeoNerd> I don't believe so. b = a; b <<= 1; /* b is now 2*a */ b <<= 1; /* b is now 4*a */ b += a; /* b is now 5*a */ b <<= 1; /* b is now 10*a */
[16:54:10] <twnqx> which is 10 cycles?
[16:54:15] <twnqx> in case of int
[16:54:42] <LeoNerd> Mhm. That'll be waaaaay quicker than setting up the call to __imul()
[16:54:42] <twnqx> reg to reg, not including load/store
[16:56:57] <twnqx> depends whether it can detect the s16 * s8 case with a special imul, and the imul has an early out
[16:57:32] <twnqx> in which case it will still be faster, but not waaaay :P
[16:59:01] <twnqx> it might always wiin due to being branchless though
[16:59:51] <twnqx> but then you could decide -Os for the looping version, -O2+ for unrolling imul and removing the parts where the multiplier bit is 0 due to constant
[17:27:55] <Casper> o.O can't figure out how to install avr-gcc on my new gentoo box
[17:28:03] <Casper> all the guides fail o.O
[17:32:00] <Lambda_Aurigae> emerge gcc-avr ?
[17:42:27] <Casper> emerge: there are no ebuilds to satisfy "gcc-avr".
[17:44:33] <timemage> Casper, what happens if you try to emerge avr-libc # ? it's been a while since i can gentoo regularly, but i would expect that whatever compiler is needed would come down as a dependency.
[17:48:40] <Casper> timemage: masked (so that part is easy to do)
[17:48:45] <Casper> but gcc...
[17:48:49] <Lambda_Aurigae> emerge avr-gcc ?
[17:49:01] <Casper> on my working machine... avr-gcc is owned by no package
[17:49:06] <LeoNerd> So.. hrm.. my Nano seems to reboot itself the moment I first start talking SPI. I wonder what I've done wrong.
[17:49:29] <Casper> emerge: there are no ebuilds to satisfy "avr-gcc".
[17:49:31] <LeoNerd> According to the logic trace, it gets as far as outputting the very first SPI SCK pulse to clock the first bit out, then reboots
[17:50:28] <timemage> Casper, on phone. will check back.
[17:50:35] <jadew> LeoNerd, maybe a short?
[17:51:30] <obnauticus> Hey--I have an m32u4 with a 16MHz external XTAL oscillator and I set the fuse bits as the following: -U lfuse:w:0xe0:m -U hfuse:w:0xd8:m -U efuse:w:0xcb:m ... I am currently not getting comms and when i scope the xtal I do not see any oscillation--did I set these correctly? If I did not, how can I fix this?
[17:51:33] <jadew> if you connect the data lines wrong, one chip might try to drive the line high, the other one low
[17:52:03] <LeoNerd> Hmmm
[17:52:13] * LeoNerd disconnects the SPI slave a moment to test that ide
[17:52:37] <LeoNerd> hmmnope
[17:54:10] <jadew> obnauticus, it's not set properly
[17:54:21] <jadew> it's set so it uses an external clock, not an external crystal
[17:54:21] <obnauticus> jadew thats what im reading now unfortuinately
[17:54:26] <jadew> http://www.engbedded.com/fusecalc/
[17:55:09] <jadew> if you have a freq. gen, feed it a clock and re-write the fuses
[17:55:11] <Tom_itx> put an external clock on it.
[17:55:20] <Tom_itx> and reset the fuses
[17:55:30] <obnauticus> external clock such as ?
[17:55:37] <Tom_itx> 555 timer
[17:55:40] <obnauticus> im a bit confused as to what constitutes an external clock..ah okay.
[17:55:43] <Tom_itx> another avr
[17:55:44] <jadew> obnauticus, square wave signal
[17:55:52] <jadew> yeah, another avr is also a good source
[17:55:53] <Tom_itx> ttl
[17:55:58] <obnauticus> i wonder if i can use a buspirate
[17:56:04] <Tom_itx> maybe
[17:56:29] <Tom_itx> it's such a common problem i put a clock output pin on my programmers
[17:56:43] <obnauticus> i wonder if the stk500 has an external clock
[17:56:50] <Tom_itx> no clue
[17:57:03] <jadew> obnauticus, you can program another AVR to output its clock on some pin
[17:57:10] <jadew> (via fuses)
[17:57:14] <Tom_itx> oh, you're the one doing the bootloaders...
[17:58:42] <obnauticus> jadew what frequency clock should i tell my arduino to generate
[17:59:01] <jadew> obnauticus, the higher, the better
[18:00:44] <jadew> speaking of which, would someone with a bus pirate mind testing something for me?
[18:00:56] <obnauticus> sure
[18:00:56] <jadew> I'd like to know what baudrate you get when you ask for 115200
[18:00:56] <obnauticus> lol
[18:01:10] <obnauticus> i'll test it when im done generating the clock for this
[18:01:15] <jadew> no rush
[18:05:28] <obnauticus> jadew should the external clock just be connected to XTAL 1 and XTAL 2?
[18:05:38] <jadew> just xtal 1 I believe
[18:05:38] <obnauticus> as PWM/GND
[18:05:41] <obnauticus> okay
[18:08:15] <Casper> timemage: going do some shopping, so if you have an idea, leave me a pm...
[18:10:02] <LeoNerd> OK, so some improvement... I can make a -single- byte transfer using SPI, but on the second transfer I send the data out and poll waiting on SPIF, and it never comes high
[18:14:41] <jadew> LeoNerd, which chip is that?
[18:14:45] <timemage> Casper, hmm. maybe will fire up a gentoo vm or something.
[18:15:14] <LeoNerd> 328p on a Nano board
[18:16:23] <jadew> ok, first question, is CS set to output?
[18:16:58] <LeoNerd> http://pastie.org/9626488 <== my code
[18:17:19] <jadew> so, no
[18:17:23] <jadew> you need CS as output
[18:17:39] <LeoNerd> Is that not what line 14 does?
[18:17:55] <jadew> no
[18:17:55] <LeoNerd> Oh hang on.. CS.. you mean !SS?
[18:18:00] <jadew> yes
[18:18:22] <jadew> if CS goes low, you get kicked out of master mode into slave mode
[18:18:26] <LeoNerd> Ah; yes that's set also. SS_DIR |= _BV(SS_PIN);
[18:19:04] <jadew> LeoNerd, I don't see it
[18:19:06] <jadew> which line?
[18:19:23] <LeoNerd> I didn't paste that bit of code, it got lost sorry. But it's there; the code I showed bove.
[18:19:59] <jadew> and SS_DIR is DDRx?
[18:20:16] <LeoNerd> Yes - lines 10-12 of nrf.c
[18:21:10] <LeoNerd> Hmm... admittedly I only set up the SS pins -after- I enable the SPI module. I'll try swapping the init order
[18:21:12] <jadew> brb, kid woke up
[18:21:22] <LeoNerd> Ah!
[18:21:23] <LeoNerd> That got it
[18:21:47] <LeoNerd> The trick is that the SS line has to be configured as an output /before/ you enable the SPI module, not simply before you start talking with it
[18:24:30] <LeoNerd> Doh! And also printf() needs malloc initialising first
[18:24:35] <LeoNerd> Another reason I should avoid it :(
[18:27:27] <LeoNerd> I think. hrm. at least, my ATmega crashes if I try to printf
[18:31:13] <LeoNerd> Hmm.. printf("Hello, world\n") works fine. printf("Hello, %s\n", "world"); crashes instantly
[18:34:07] <jadew> LeoNerd, back, glad it worked
[18:34:40] <LeoNerd> Well, that bit worked. Now I'm stuck on a crashing printf. :/
[18:35:13] <jadew> never used it
[19:07:13] <timemage> LeoNerd, this printf is the avr-libc one?
[19:09:05] <LeoNerd> Yeah
[19:09:29] <LeoNerd> I've given up on it for now, I'm writing a few functions such as void fputi(int x, FILE *f); to help me
[19:11:48] <timemage> LeoNerd, but, you found that printf() uses malloc() ?
[19:22:07] <LeoNerd> timemage: I thought it did, but I might be misremembering
[19:22:36] <timemage> LeoNerd, i'm not saying it doesn't. although, it would surprise me if it did.
[19:23:25] <timemage> LeoNerd, fdevopen does. but you don't have to use fdevopen.
[19:23:26] <LeoNerd> In any case, my various fput*() functions are being an nice workaround for now
[19:23:31] <LeoNerd> Indeed, I'm not
[19:23:37] <timemage> LeoNerd, okay.
[19:23:55] <LeoNerd> As I said; puts(), fput*(), etc... work fine. printf() with no arguments works fine. Just printf() with a conversion crashes
[19:24:44] <timemage> LeoNerd, odd.
[19:37:12] <LeoNerd> https://twitter.com/cpan_pevans/status/519279910251020288 Mumble. Mutter. Going to bed now. Night all. :P
[19:38:50] <jadew> night
[19:49:01] <jadew> anyone with a bus pirate + scope willing to test something for me please?
[19:50:31] <LeoNerd> jadew: ask me tomorrow
[19:50:42] <jadew> cool, thanks
[20:39:25] <Casper> does anyone knows of an easy way to do versionning for code?
[20:43:50] <jadew> Casper, svn
[20:43:57] <jadew> what OS?
[20:45:38] <jadew> on windows you have this: http://tortoisesvn.net/
[20:45:43] <jadew> which is awesome
[20:45:52] <jadew> on linux rabbitvcs might work for you
[20:46:06] <jadew> if not, it will suck
[20:46:11] <Casper> linux
[20:46:44] <jadew> I'm using rapidsvn because rabbitvcs isn't working (it's an immitation of the tortoise svn client)
[20:46:51] <Casper> ow well, for this code I won't version...
[20:47:04] <jadew> it's always good to do versoning
[20:47:04] <Casper> but I want on other
[20:47:15] <Casper> this is just a quick capacitive sensor test
[20:47:17] <jadew> at least as a backup mechanism
[20:47:35] <jadew> well, svn should serve you well and it's simple
[20:47:46] <jadew> I never used GIT, but you could look into it
[20:48:07] <jadew> I just stopped at svn because it seems like every year there's a new freaking versioning system that is better than the last one
[20:48:14] <timemage> Casper, if you're counting votes, i vote for git.
[20:50:43] <jadew> to this day I never understood why people migrated so fast from svn to other crap and then to git
[20:51:11] <jadew> personally I don't find the process of setting up new repositories enjoyable
[20:51:19] <jadew> yet, it felt like EVERYONE migrated in a heartbeat
[20:55:16] <timemage> if my experiences with sccs, cvs, vss, and svn weren't so horrible i might remember all the reasons why i hated them. the only thing i don't particularly like about git is the idea of having to clone an entire remote. someday maybe they'll make that optional.
[20:56:23] <jadew> timemage, judging by the past of versioning systems, that won't happen, instead a new and better versioning system will emerge and everyone will migrate to that
[20:56:45] <jadew> I never had any issues with svn
[20:57:32] <jadew> with git either, but I only have 1 project on git and hundreds in svn
[21:06:00] <timemage> jadew, i had briefly played with darks, mercurial, and bizaar. i don't have any reason to favour git over them other than that i got some traction with it first. near as i know, most of the distributed version control systems are similar. i started learning git and hg in parallel and they seemed the same beast at the time.
[21:08:52] <timemage> jadew, err, darcs
[21:16:01] <Casper> has anyone tried peter fleury's uart lib recently?
[21:16:25] <Valen> I don't know about recently
[21:16:32] <Valen> but I have in the past
[21:16:44] <jadew> why do you need a library for that?
[21:20:51] <Casper> In file included from uart.c:41:0:
[21:20:56] <Casper> /usr/avr/include/avr/pgmspace.h:1067:26: error: unknown type name ‘uint_farptr_t’
[21:21:14] <Casper> that's the issue I have... so I wonder if I'll have to do all myself...
[21:22:10] <jadew> Casper, what does that library do?
[21:22:35] <Casper> circular ring buffer, interrupt driven
[21:22:41] <jadew> what do you need from it, I bet you can write it all from grounds up in 5 minutes
[21:23:04] <Casper> I'm rusty in coding
[21:23:20] <jadew> I see, in that case try to typdef that thing
[21:23:39] <jadew> typedef uint16_t uint_farptr_t;
[21:23:40] <Casper> line 41 is the include line...
[21:23:55] <Casper> so I guess... that the avr-libc is broken
[21:23:57] <jadew> ah, in pgmspace
[21:23:58] <jadew> hmm
[21:24:01] <jadew> no
[21:24:05] <jadew> well, yes
[21:24:09] <jadew> but I bet you can fix that
[21:24:18] <jadew> first of all, is the MCU defined?
[21:24:39] <jadew> pgmspace might include different headers based on the mcu
[21:25:16] <jadew> let me take a look at that file
[21:25:30] <timemage> Casper, try including inttypes.h first.
[21:26:16] <jadew> hmm, you seem to have a different version of pgmspace
[21:26:24] <jadew> I don't even have line 1067
[21:26:40] <jadew> timemage, pgmspace already does that
[21:26:49] <jadew> I think the issue is that you're not defining the MCU
[21:26:50] <Casper> I think it's the makefile that is too old :D
[21:26:56] <timemage> jadew, it does on my system as well. however, his appears not to.
[21:27:48] <jadew> Casper, do you have the proper MCU specified in the -mmcu option for the compiler?
[21:28:06] <Casper> there we go
[21:28:13] <jadew> that did it?
[21:28:26] <Casper> avr-gcc -g -Wall -O2 -mmcu=atmega88 -I /usr/include -I/usr/local/avr/avr/include -Wl,-Map,test.map -o test.elf uart.c main.c -lm <==== first -I was the issue
[21:28:39] <jadew> ah
[21:28:55] <jadew> wrong types
[21:29:15] <jadew> that's kinda hard to predict hehe
[21:29:50] <Casper> yeah
[21:30:01] <Casper> and of course, the ldscript bug...
[21:30:24] <Casper> now... I shall figure out if ponyprog serial work on this unknown type usb-serial adapter...
[21:32:40] <Casper> aaaaand... I forgot to compile the module for it :D
[21:32:56] <Getty> hey, aehm, just "vague", If we use like an ATMEGA64 (just example, something we just need a housenumber) and use a SPI Flash, and we read 256k of it, and need to compare 65535 numbers that are in there... how long you guys think does that take?
[21:33:27] <Getty> do we talk "seconds" here? or could that lead to minutes?? (and if so what factors are the relevant one, like can faster flash compensate at all)
[21:34:24] <jadew> flash speed, SPI baudrate
[21:35:16] <jadew> for a SPI baudrate of 100 kbps you're talking about 256k / 100 kbps = 2.56 seconds * 8 bits
[21:35:36] <jadew> so 20.48 seconds
[21:35:36] <Getty> and SPI baudrate of 100kbps is now nothing special?
[21:35:51] <jadew> it's not
[21:36:01] <jadew> if you use 1 Mbps SPI, you divide that by 10
[21:36:11] <jadew> and you get 2.48 seconds
[21:36:15] <Getty> how is that defined? just by the flash speed?
[21:36:20] <Getty> or is the atmega limited?
[21:36:33] <N1njaneer> Atmega SPI can run up to 1/2 clock speed
[21:36:47] <jadew> I don't know about the flash, but the atmega is limited too, both by peripheral speed and its clock
[21:37:20] <Getty> i still dont know how to convert Mhz into a baudrate ;) that would actually help me
[21:37:31] <Getty> cause that was what i found in all datasheets
[21:37:40] <jadew> you can probably get a few Mbps / s, so you can take the data out in less than 1 second
[21:37:50] <N1njaneer> Mhz = baudrate in the case of synchronous stuff like SPI
[21:37:52] <N1njaneer> HOWEVER
[21:38:05] <N1njaneer> This assumes your byte transfers are back-to-back
[21:38:10] <jadew> Getty, well, if what N1njaneer says is true, than a clock of 20 MHz would translate into a baudrate of 10 Mbps
[21:38:22] <Getty> ok ok, get it
[21:38:26] <N1njaneer> If you are reading, most modern flash will allow you to just keep streaming bytes out without having to put in new addresses, etc
[21:38:45] <Getty> sounds effective
[21:38:56] <Getty> it is definitly wise to put all the 256k at one spot
[21:39:09] <Getty> and not spread them over 1MB so that you need always a new address, or doesnt that matter
[21:39:09] <Getty> ?
[21:39:21] <N1njaneer> jadew: Yep, though software overhead will usually slow that down further as well, unless you can do all of your operations within 16 clock cycles per byte that comes in, etc
[21:39:23] <jadew> why would you do that?
[21:39:41] <Getty> yeah actually i should organize them to that one spot its ok
[21:39:43] <jadew> N1njaneer, luckly AVRs are nice chips and sometimes you can do that :)
[21:40:32] <N1njaneer> Getty: If your flash allows a fast-read mode where you can start at an address and just keep reading then yes, you can get stuff out quickly. Else you'll have to usually burn 5-6 bytes of cycle to get to a new address for starting to read.
[21:40:54] <N1njaneer> jadew: Depends entirely on what you need to do with the data, but yes, you can do a lot :)
[21:42:11] <Casper> has anyone used a usb-parallel under linux? I can't find it in the kernel config...
[21:42:38] <Getty> thanks!
[21:44:08] <jadew> has anyone got one of thoe crappy atten spectrum analyzers?
[21:44:13] <jadew> that go up to 1 GHz
[21:44:26] <jadew> and are analogue...
[23:23:00] <Casper> ok... do I have a bad programmer, bad connection, bad config, bad fuse or bad chip...
[23:24:14] <Casper> I see reset and mosi and sck... avr not responding...
[23:31:56] <xrlk> is there a programmer I should get instead of the avrisp mk2
[23:34:48] <Casper> has anyone here tried a pl2303 with a bit banged programmer?
[23:35:05] <Casper> I see the signal that get to the avr, but the avr do not reply... on 2 of my chips..
[23:35:13] <Casper> however there is code running on one of it
[23:45:40] <Casper> ... 2 unresponding chip it is...
[23:45:51] <Casper> I took a brand new attiny and it did reply...