#avr | Logs for 2016-11-05

Back
[00:00:03] <carabia> god damn it's cold outside. it's below zero
[00:00:28] <carabia> and yeah _ami_ it's the weekend and it's the all saints' day here also, which is a national holiday
[00:02:11] <carabia> but when you make silly promises of something being ready by monday... :) i'm heading to the office to finish something i started super early now, cause i've got plans for later on...
[00:02:45] <carabia> life's a bitch and then you die. anyway time to scram.
[00:48:48] <Snert_> no. Life's a bitch. Then you marry one. Then you die.
[04:00:59] <_ami_> Snert_: :)
[04:04:10] <sabor> warm sunny day here. Life's a beach :)
[06:19:56] <julius_> hi
[06:21:12] <julius_> got some problems with my isp wiring, somehow none of my programmers (usbasp/icprog) wants to function anymore on different bread boards/chips. is there a cheap programmer that is available in a package that also allows <1mhz targets and is cheap like usbasp?
[08:13:28] <Lambda_Aurigae> julius_, got a parallel port on any computer there?
[08:13:40] <julius_> maybe
[08:13:48] <julius_> not sure, different apartment
[08:13:55] <Lambda_Aurigae> use that for programmer.
[08:14:30] <Lambda_Aurigae> https://sites.google.com/site/emrirc/avrstuff
[08:14:44] <Lambda_Aurigae> https://sites.google.com/site/emrirc/avrisp-unbuffered.gif
[08:14:53] <Lambda_Aurigae> about as simple as you can get for an avr programmer.
[08:15:07] <Lambda_Aurigae> you COULD do it with wires instead of resistors even.
[08:15:31] <Lambda_Aurigae> that's an stk200 when using avrdude.
[08:15:42] <LeoNerd> Bus Pirate?
[08:17:16] <Lambda_Aurigae> https://sites.google.com/site/emrirc/avr-ispdongle.pdf
[08:17:31] <Lambda_Aurigae> that's the first avr programmer I ever made back,,,15ish years ago or so.
[08:17:35] <Lambda_Aurigae> I still have it
[08:17:37] <Lambda_Aurigae> it still works
[08:17:55] <Lambda_Aurigae> I still use it
[08:18:03] <antto> i recently made another such stk200 for myself: http://i.imgur.com/EMZzUdq.jpg
[08:18:04] <Lambda_Aurigae> I use it more than any other avr programmer I have.
[08:19:18] <julius_> antto, hows the small connector type called?
[08:19:32] <antto> molex KK i think
[08:19:39] <julius_> Lambda_Aurigae, ok that parallel port thing could do the trick....
[08:20:01] <Lambda_Aurigae> the unbuffered one can be dangerous to the parallel port if you wire stuff wrong.
[08:20:01] <julius_> antto, KK?
[08:20:21] <antto> they have 928398234 kinds of connectors
[08:20:27] <antto> lemme check
[08:20:28] <julius_> Lambda_Aurigae, also i would have to get the parallel ports wire numbers right :(
[08:20:45] <julius_> antto, yes i know...the power supply ones in the pcs are theres too
[08:20:55] <antto> http://www.molex.com/molex/products/group?key=kk_interconnect_solutions&channel=products
[08:20:59] <Lambda_Aurigae> yes...go by pin number, not necessarily location on those links.
[08:22:25] <antto> yeah, i've put the resistors in the din25 housing, don't wanna fry anything
[08:23:25] <antto> i'm using it with a DELL optiplex machine which has core2duo quad, and a parallel port, don't wanna kill it
[08:34:20] <julius_> antto, thank you
[08:42:02] <julius_> somebody wants to help me figure out if i soldered onto the right pin on this usbasp to be able to programm <1mhz targets? heres a circuit diagram of usbasp: https://www.google.com/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=0ahUKEwiqiYG915HQAhVEkywKHQLUCO8QjRwIBw&url=http%3A%2F%2Fwww.fischl.de%2Fusbasp%2F&psig=AFQjCNHMZ7FDUPvwkN2nsVGv65G3WceFOA&ust=1478437619408699 and heres a picture of my soldering:
[08:42:03] <julius_> https://s14.postimg.org/af808xma9/usbasp.jpg
[08:42:12] <julius_> ups...
[08:54:00] <Lambda_Aurigae> antto, my current machine is an i5 dell laptop with a docking station that has parallel and serial ports..
[11:04:13] <Emil> Hey
[11:04:28] <Emil> Anyone know i2c well?
[11:04:42] <LeoNerd> I wouldn't say "well", but sure. If you have a question just ask it
[11:05:12] <Emil> So I have this air quality sensor and it's address is 0x5A
[11:05:22] <Emil> but that is the 7 bit address exactly
[11:05:28] <aandrew> ok
[11:05:52] <Emil> All libs for avr I have found include one extra bit when addressing ir
[11:06:01] <LeoNerd> Yah I dislike doing that
[11:06:07] <aandrew> 0b01011010 is the I2C address
[11:06:14] <LeoNerd> I pass the addr into my I²C library functions as the plain 7bit value, and let the library shift it
[11:06:15] <Emil> they send an additional pulse at the beginning
[11:06:26] <aandrew> but most periphs comine the R/W bit with the address in the reg so they expect the address shifted over
[11:06:47] <aandrew> so the value you write to the reg is 0b01011010X where X is 0 for write and 1 for read
[11:06:57] <aandrew> oh are you bit banging it?
[11:06:59] <LeoNerd> writebyte((addr << 1) | dir) <== a line of my code
[11:07:00] <Emil> No
[11:07:09] <Emil> But Im beginning to wonder if I should :D
[11:07:12] <aandrew> LeoNerd: yep exactly the same idea that I use
[11:07:25] <aandrew> the start condition is not a 'bit' in that sense
[11:07:30] * LeoNerd should ponder I²C by interrupts sometime, also...
[11:07:39] <LeoNerd> currently mine is purely blocking
[11:07:56] <aandrew> the I2C interrupt drivers are a lot like hte USB interrupt drivers. they're a little "weird" to keep in mind
[11:10:29] <Emil> So would you have a good small working example you could share?
[11:10:56] <LeoNerd> You could just see my i2c.c file :)
[11:11:01] <aandrew> I don't, I have a lot of work on my plate at present and non eof it is AVR
[11:11:28] * LeoNerd laments the lack of pastie.org :(
[11:11:41] <LeoNerd> http://paste.debian.net/892729/
[11:16:27] <Emil> I assume with dir that 1 is writw?
[11:17:04] <LeoNerd> Oh.. yes. It's one of the constants in the .h file
[11:17:22] <LeoNerd> Were pastie.org still a thing I'd have attached the two files together.. :/ I odn't know of a decent replamcent of it these days
[11:17:36] <LeoNerd> Ooohwait it's back up \o/
[11:18:08] <LeoNerd> http://pastie.org/10956493
[11:18:12] <Emil> And I assume the I2CSpeed is just a typedef for unsigned char
[11:18:23] <LeoNerd> See there, with the .h file too
[11:18:35] <Emil> oh enum
[11:18:39] <Emil> thanks
[11:18:52] <LeoNerd> enums are good, because gcc can warn about unhandled 'case' labels
[11:19:07] <Emil> true
[11:19:32] <LeoNerd> At one point I considered attempting ot publish some of my avr library code, but.. meh.. it then becomes yet another in n-thousand
[11:20:10] <Emil> why not
[11:20:15] <Emil> doesnt hury
[11:21:05] <Emil> hurt
[11:22:32] <LeoNerd> Eh.
[11:22:46] <LeoNerd> I have more than enough other projects to maintain currently anyway
[11:23:03] <LeoNerd> The more things I publish the more people might actually *use* them anyway and then that becomes maintainence effort
[11:26:31] <carabia> that's all nice and dandy on a fundamental level, but hey, most of the commie-software is never maintained anyway
[11:27:22] <LeoNerd> Oh it's maintained.. I use it
[11:27:32] <LeoNerd> I just don't want people whining and saying "oh you should change this .."
[11:27:53] <LeoNerd> Or worse, "oh why did you change that? I was using it..."
[11:28:01] <carabia> and then you can just ignore it
[11:29:10] <LeoNerd> Yes but I generally hate knowing that or ignoring it
[11:30:01] <carabia> kids, principles are bad, m'kay
[11:30:16] <carabia> + for you
[16:35:49] <carabia> i don't think there exists a thing i hate more than fucking winter
[16:37:03] <carabia> well there are a few that cut super close but it's not politically correct to speak of them
[16:37:17] <carabia> it's just one of those things that come with nothing but drawbacks
[17:19:48] <inflex> carabia, perhaps northern Australian Summer might temper your hate?
[17:20:05] <inflex> We're about to get started with it and I'm not looking forward to the 42'C :(
[17:20:21] <inflex> Then again, Winter with snow/sleet/blizzards is rough too
[17:23:10] <carabia> to be completely honest even though i know it's relatively easier to protect against the cold than to keep your body temp low in the heat, i'd much prefer 42 deg than the northern winter. It really really is not my thing to dress up looking like the fucking michelin logo in -20 C
[17:44:59] * Lambda_Aurigae wuvs winter.
[17:45:19] <Lambda_Aurigae> summer in Darwin was,,,,bad.
[19:05:39] <inflex> ja, Darwin Summer is quite something to get used to, if ever
[19:51:08] <Lambda_Aurigae> I only was there for a few days.
[19:51:18] <Lambda_Aurigae> then went back to Alice Springs where it was cooler.
[19:51:29] <Lambda_Aurigae> Alice was a dry heat at least.
[19:51:34] <Lambda_Aurigae> Darwin was hot and humid.
[20:31:13] <hetii> Hi :)
[20:31:34] <hetii> Who wants to help me ? :)
[20:32:23] <Casper> nobody will without no real question, hint: don't ask for help, ask the actual question
[20:32:46] <Lambda_Aurigae> nobody wants to help you.
[20:32:54] <Casper> that too
[20:33:30] <specing> word.
[20:34:25] <hetii> Ok what I try to do is to write a software that will emulate tty device, so it expose character device like any usb2serial dongle
[20:34:57] <hetii> here is my cuse client(use libfuse) in C: http://paste.ubuntu.com/23433617/ and test program: http://paste.ubuntu.com/23433618/
[20:35:24] <Casper> do you have a precise question? nobody will look at your code without a precise question
[20:35:28] <hetii> so the issue is that termios always return IO error
[20:36:17] <hetii> I return the same ioctl structure and values that I get from real device ('ttyUSB0')
[20:36:37] <hetii> but I have no clue why termios raise this IO error :/
[22:26:47] <hetii> I wrote kernel module http://paste.ubuntu.com/23434080/ and libfuse code http://paste.ubuntu.com/23434085/, both return the same structure and data. termios.tcgetattr() called with kernel device character return fine, but called on libfuse raise IO error :/
[22:29:24] <Evidlo> If I include math.h but only use a single function, do the other functions use up memory?
[22:39:22] <hetii> Evidlo, probably depend on compiler flags.