#avr | Logs for 2016-03-02

Back
[03:12:03] <julius> morning
[03:12:04] <julius> http://www.pic-upload.de/view-29902187/1039701-2.jpg.html on which pin does vcc "come out"?
[03:12:15] <lorenzo> julius: hi again
[03:12:16] <lorenzo> :D
[03:12:18] <lorenzo> no multimeter?
[03:12:21] <julius> no
[03:12:24] <julius> currently not
[03:12:25] <lorenzo> resistor and a led?
[03:12:26] <julius> different apartment
[03:12:51] <julius> yes, i got +5v on the left, lower row. against the next one from left, again lower row
[03:12:54] <lorenzo> julius: http://telecnatron.com/reference/pinouts/avr-isp/avr-isp-pinout-345x.png
[03:14:21] <julius> but asssuming that if +5v is on the lower row, there should be MOSI on the top row, right?
[06:29:35] <Lambda_Aurigae> julius, if you know the pinout of what goes in then you should be able to figure out the pinout of what comes out....pin 1 to pin 1 by the picture of that cable.
[06:30:11] <Lambda_Aurigae> if you look at both connectors the same way, say, with the tab on top then what goes in one connector comes out the same pin on the other connector.
[07:05:36] <theBear> usual approach is to mark pin 1 whatever corner/wherever it is with a nice obvious dot or square or big single mark, and use that as your reference for both orientation when plugging and mentally/on-paper transforming/flipping pinouts around
[07:06:47] <Tom_itx> i usually stand on my head while doing the mating plug
[07:08:41] <WormFood> A baby seal walks into a club
[07:26:30] <theBear> i always liked the idea of opening a "Club Foot" and a "Club Seal" maybe an "Iron Bar" even
[07:26:54] <theBear> then again, i'm strangely entertained by very poor basic wordplay
[07:30:57] <nikomo> Etched and soldered together a board, now I need to write the code for it :/ sigh
[07:36:32] <WormFood> I'd name my place 花桥
[07:37:01] <WormFood> in Cantonese, 花桥 sounds like "fuck you" in English.
[09:47:45] <FrozenDroid_> so I'm completely new to everything low-level, especially AVR stuff. I'm trying to figure out how to get PD3 in PWM mode on the atmega328p. Is this even possible?
[09:49:22] <FrozenDroid_> using avr-libc, btw
[09:55:45] <FrozenDroid_> Oh, never mind, I've figured it out. Now to study how this works ;P
[10:04:05] <WormFood> FrozenDroid_, the AVR is well documented, and I think you'll find if overall fairly easy to learn.
[10:06:18] <WormFood> I was researching the 8051, and I don't know Intel well. I was raised on Motorola based systems. I learned 6809 asm back in the 1/2 half of the '80s, and programmed a LOT of 68C05/ST7 asm in the 2000s, and learning that 8051 was fuckin' bizarre. Learning the AVR is refreshing compared to 80xx family.
[10:13:55] <FrozenDroid_> well, the fact that I suck with numbers will not help me..
[10:31:32] <julius> Lambda_Aurigae, yeah, my brain was fucked
[10:31:58] <julius> i did connect it right i believe, but still no answer. gonna try another programmer tomorrow
[10:41:24] <Jartza> evening
[10:46:32] <WormFood> Jartza, where are you, that it's evening there?
[10:47:57] <Jartza> finland
[10:53:38] <WormFood> it's almost 12:30 am here.
[10:54:04] <WormFood> Anyways, I'm off to bed...I think (doesn't mean I'll actually be sleeping ;)
[11:24:50] <theBear> hmm, wormfood must be near or in taipei methinks
[12:02:31] <julius> 16:37 in germany
[12:02:35] <julius> 18:37
[12:26:11] <Jartza> theBear: he's in shenzhen :)
[12:51:07] <theBear> hmm, while i know a lot of hyperbole re: shenzhen, i actually got no idea where it is, in relation to taipei or anywhere else in the world
[12:51:25] <theBear> but i spose it must be within a few globe-degrees of straight north of me if we got the same time
[12:59:54] <liwakura> god, i never used SPI or SD cards until now. Last weekend i soldered an SD card to the GPIO of an OpenWRT-Router
[13:00:27] <liwakura> And today i installed some packages and configured some GPIO
[13:00:33] <liwakura> and it works on the first try
[13:01:07] <liwakura> not exactly avr-related, but bitbang-related
[13:07:00] <Joggl> theBear, send me one!
[13:27:48] <theBear> what, a, what ?
[13:38:14] <Joggl> a "omg thats the cheapest whatever here in country"-pcb!
[13:51:01] <nope3000> Hey guys, I'm new to avr programming, I'm trying to program an ATTINY85 using a minipro programmer. I was wondering if anyone has used the minipro programmer to program an avr chip, because I'm getting an error where it says invalid file size. Can I just pad the hex file from avr-gcc to get it to burn to the chip?
[13:51:11] <nope3000> Also sorry if this isn't the place for this question
[13:52:04] <cehteh> its the right place
[13:53:06] <cehteh> i dont know the minipro, did you compile it for the tiny85? are you sure the programm isnt too big?
[13:54:21] <cehteh> what OS, what program do you use to flash the chip?
[13:55:44] <nope3000> Awesome, and I did, I used avr-gcc -mmcu=attiny85 ..., and it's saying that's it's too small. I'm running Linux.
[13:56:57] <cehteh> to small, too big .. what now?
[13:57:16] <cehteh> and i meant for flashing, not compiling
[13:58:07] <nope3000> Lol for flashing it says: "Incorrect file size: 114 (needed 8192)"
[13:58:56] <cehteh> strange
[13:59:05] <cehteh> it should work with a smaller program
[13:59:37] <cehteh> Lol?
[14:00:30] <cehteh> can avrdude use that programmer?
[14:00:34] <nope3000> That's what I thought, could I just pad the rest of the file to reach the correct size?
[14:01:16] <nope3000> I don't think so, I tried but it didn't work, I haven't seen that's it supported anywhere, but I might have not been looking in the right place
[14:01:49] <cehteh> i have no idea
[14:02:40] <cehteh> padding the hex file wont be that simple, should be possible but thats not the problem
[14:04:28] <cehteh> its possibly more the settings you pass to your programmer
[14:05:14] <nope3000> Ah, I see what you mean with it not being easy, and here is the command I run: "miniprohex -p "ATTINY85" -w main.hex"
[14:08:31] <cehteh> i really dont know that programmer, read the manpage any options needed?
[14:13:34] <nope3000> Not that I see, I might just need to post a bug fix request to the developer
[14:15:46] <cehteh> maybe someone else has that programmer, just wait.. or get a usbasp for $3
[14:15:55] <nikomo> is pin change interrupt possible on falling edge instead of logical change? (attiny85) - still reading datasheet but I didn't see any obvious register immediately in the interrupt section
[14:17:02] <cehteh> dunno iirc there was something, but maybe only for INT0
[14:17:23] <nikomo> yeah that can do it, but that's like a proper hardware interrupt
[14:17:40] <nope3000> Thanks cehteh, I might just get the programmer you suggested
[14:18:09] <nikomo> almost wish I used that pin for button now, but it would have made routing an ass. I'll just add code to the interrupt to deal with it
[14:19:46] <cehteh> if its only for a button then pcint should be no problem
[14:20:09] <cehteh> just check state and return from interrupt when its the wrong edge
[14:20:19] <cehteh> besides you possibly want to add some debouncing
[14:21:05] <nikomo> I'm just gonna stick a bit fat nice delay up in there. the micro is doing literally nothing else useful
[14:23:50] <cehteh> lol
[14:23:51] <cehteh> ok
[14:24:57] <cehteh> you possibly want it on both edges then, some buttons bounce on release as well, depends on the mechanics
[14:28:08] <nikomo> will have to play around with it
[14:48:52] <julius> why wont the fucking led blink? http://pastebin.ca/3386364
[14:50:53] <julius> isnt 500ms twice a second?
[15:20:08] <nikomo> julius: why are you NOTting the mask?
[15:20:14] <nikomo> ~
[15:20:59] <julius> isnt that led off?
[15:22:23] <nikomo> I think that's supposed to work, off the top of my head, I just haven't done it like that ever
[15:23:27] <nikomo> do 0 << etc., and drop the NOT, &= is bitwise AND, 1 AND 0 = 0
[15:23:37] <Caesium> that led will be permanently on
[15:23:42] <Caesium> you have no delay after turning it off
[15:23:51] <Fleck> Jartza: maybe interesting for you: http://hackaday.com/2016/03/01/color-tv-broadcasts-are-esp8266s-newest-trick/
[15:24:00] <nikomo> that is also a good point lol
[15:24:09] <nikomo> you're going on -> delay -> off -> on -> delay
[15:24:57] <nikomo> I got distracted with the assignment being done different than I'm used to, so I didn't even think about the actual logic
[15:26:01] <nikomo> hmm, if you don't NOT the AND mask you end up affecting other pins, now that I think about it, I think. (I haven't slept properly), need to keep in mind
[15:51:56] <nikomo> I thought I'd be clever and just have a button going to ground, and use the internal pull-up
[15:52:18] <nikomo> but the introduction of my finger to the vicinity of the button, is enough to cause a change in state
[15:52:48] <twnqx> Oo
[15:53:01] <nikomo> "oops"
[16:07:39] <theBear> your finger nearby beats a 10k internal pullup ? your finger must be heavy duty !?
[16:07:43] <theBear> err i mean !!
[16:10:31] <nikomo> I think the internal pullup was more like 50k actually, I'm not sure. It wasn't very well controlled afaik
[16:13:32] <nikomo> I/O Pin Pull-Up Resistor, 20-50kOhm
[16:14:52] <nikomo> there's a ground line next to the button, so I was low impedence enough to pass 0.25mA max, through me? not sure. my finger's capacitance might be enough that charging it through the pullup, might be too much
[16:17:20] <theBear> that's not an avr is it ?
[16:28:26] <nikomo> attiny85
[16:30:20] <nikomo> so, yes, it's avr
[16:31:56] <theBear> wow, i'm sure the old series had much more sensible internal pullups than that
[16:32:54] <theBear> course this is an age where people count amps in multipliers so small i don't even know what they mean (wtf is a femtoamp in real terms, or even a pico amp ?) and i spose where micro i/os can't drive a measly 5mA
[16:33:24] <nikomo> I mean, if you want an actual pullup, put in a resistor. I reckon the internal pullups are just for floating pins
[16:33:25] <theBear> re: leds before i wandered off, i was referring to the i2c/similar serial controlled kinda ones
[16:34:45] <nikomo> at least you can still drive an LED off the IO :P
[16:38:37] <julius> Caesium, ah...shit
[16:41:34] <julius> nikomo, you got magic fingers ;)
[16:41:48] <nikomo> That's what she said
[16:46:55] <theBear> heh
[17:16:07] <hetii> :)
[17:16:09] <hetii> Hi
[17:23:54] <hetii> I wonder if its possible to have 10 buttons that will use different capacitor and use just one line in any GPIO of avr, then by pressing one of the button depends on pulse time I will detect with button was pressed. Is it make sense ?
[17:24:06] <hetii> similar idea to use resistors and ADC
[17:24:43] <nikomo> I think that should work, but it's going to be such bs to get working properly, and I have doubts about reliability
[17:25:48] <hetii> and about connection something like high pass filter? http://www.electronics-tutorials.ws/rc/rc13.gif?81223b
[17:28:22] <Valen> be easier to use a resistor to charge and measure the rise time
[17:28:40] <Valen> would work with a digitial input pin
[17:30:46] <hetii> you mean multiple resistors via switches and one capacitor ?
[17:31:16] <theBear> one capacitor to rule them all ? one capacitor to bind them ?
[17:32:18] <hetii> Valen: you mean multiple resistors via switches and one capacitor ?
[17:32:42] <Valen> no, one resistor multiple caps
[17:32:51] <Valen> but really it won't matter
[17:33:01] <Valen> either way you are just measuring the RC time constant
[18:16:42] <nzt-fish> who's the donger here
[18:16:46] <nzt-fish> looking for an op
[18:18:47] <Lambda_Aurigae> got someone to complain about?
[18:34:39] <nzt-fish> Lambda_Aurigae: yes! I want you to grab my long donger, put it in your mouth and bite
[18:35:00] <nzt-fish> you need a staircase for that, I'm tall
[18:35:10] * nzt-fish smashes a staircase into Lambda_Aurigae's head
[18:35:15] <nzt-fish> you feel that?
[18:35:21] <nzt-fish> that's not what you think it is
[18:35:38] <Lambda_Aurigae> looks like a troll to me.
[18:38:02] <Lambda_Aurigae> little short ugly doll with wild hair.
[18:38:30] <nzt-fish> Lambda_Aurigae: I do wahtever I want, you dnt have any authority here
[18:41:56] <Tom_itx> no but i do
[18:43:40] <Tom_itx> so what you will with that little short ugly doll with wild hair
[18:44:53] <Lambda_Aurigae> oh, I already did the ignore thing.
[18:44:57] * Casper wants to see action!
[18:45:01] <Lambda_Aurigae> but it was asking for an op.
[18:45:04] <Tom_itx> i figured
[18:45:10] * Casper grabs curd cheeze and watch
[18:45:21] <Tom_itx> naw we are quite tolerant
[18:45:46] <Lambda_Aurigae> hehe..I didn't even realize you had given me ops.
[18:45:53] <Tom_itx> just like to flash the badge once in a while
[18:46:01] <Tom_itx> usually enough
[18:46:22] <Casper> yeah
[18:46:27] <Lambda_Aurigae> I usually refuse ops...I'm too much of a bastard.
[18:46:36] <Lambda_Aurigae> power goes to my head...and gives me a headache.
[18:49:53] <Casper> does anyone know what the "sc ipaddress" command on some bot? someone did that with my ip somewhere... so I'm wondering what that scriptkiddy tried
[18:51:47] <Lambda_Aurigae> never seen that.
[18:52:26] <Casper> same... maybe a custom command
[18:53:32] <Lambda_Aurigae> I haven't touched irc bots in like 10 years.
[19:32:30] <Tom_itx> Casper no clue
[21:05:19] <WormFood> [02:25:43] <theBear> hmm, while i know a lot of hyperbole re: shenzhen, i actually got no idea where it is, in relation to taipei or anywhere else in the world <-- Think of where Hong Kong is...and that is where I am. Shenzhen is like a twin to HK.
[21:08:20] <theBear> pfft, twin, it's way better than that, it's like the business end of things, while hong kong is the err, place that the businessmen do their hard-to-quantify/see-the-results-of business stuff at ;-)
[22:03:48] <Emil> Hello
[22:04:02] <nikomo> yo
[22:06:10] <Emil> http://users.aalto.fi/~fihlmae1/moottoriajuri.c here's a firmware for a motor controller
[22:06:16] <Emil> a shitty motor controller
[22:06:23] <Emil> How could I do it better
[22:10:32] <lald> Fix what you percieve as "shitty?"
[22:11:16] <Emil> It "spins" the (a three phase with the star exposed) motor
[22:11:19] <Emil> but very shitty
[22:11:35] <Emil> shittily
[22:11:37] <Emil> dunno
[22:11:56] <Emil> But I'd appreciate if you'd take a look and see what you think
[22:12:13] <Emil> (Because at this moment I'm blind to my own mistakes)
[22:13:33] <lald> I'm afraid I have to run, but I'm a noob in disguise at any rate. But I do find people are more responsive if I describe the specific behaviors I'm experiencing rather than my feelings towards them; the technical details nerd snipe them :)
[22:14:06] <Emil> Sure
[22:14:19] <Emil> It's a "general purpose" motor driver tester
[22:14:47] <Emil> Where I connect the load in between vcc and a mosfet, that connects to ground when on
[22:14:58] <Emil> It works by pulse density modulation
[22:15:25] <Emil> I'm trying to drive a three phase motor with the star point exposed (which should allow this to work)
[22:15:30] <Emil> but it runs very, very poorly
[22:16:18] <Emil> I'm looking for advice in how to get it to perform better (more cycles to use) and what can I do to improve it
[22:20:58] <Emil> It drives a steppet motor "okay"
[22:23:11] <Casper> I'm still wondering how to proprelly drive a 3 phased motor with dc, so can't help
[22:23:26] <Emil> That's exactly what I'm trying to do :D
[23:11:13] <rue_house> Casper, you have 3 half bridges to drive it with?
[23:11:39] <lald> Emil: I don't want to sounds like an ass, but you might want to program a little less verbosely. like using a for loon in uart_putb instead of unwravelling it. I only say this because lately my hands have been feeling strained when I code, make your keystrokes count.
[23:13:03] <rue_house> yea, everyone sit down and write an hd447780 library, there must be one person in the world who still hasn't
[23:13:30] <rue_house> and, while your at it, write a hobby servo control library, someone out there hasn't done that yet either
[23:14:12] <Casper> rue_house: don't have motor, but that is what I tought...
[23:14:31] <rue_house> a) take a sine wave
[23:14:50] <rue_house> b) makes two friends for it, delayed 1/3 of a cycle
[23:15:04] <rue_house> c) approximate it with 3 levels, 1, 0, and -1
[23:15:22] <rue_house> d) get 3 state drivers for each phase of the motor
[23:16:01] <rue_house> e) use the feedback mechanism not metioned in the instructions to clock the states to the drivers to operate the motor
[23:16:48] <rue_house> f) swear and curse about useless instructions that leave out a minor point that you dont really notice is missing when your evaluating which set of instructions your going to follow
[23:17:16] <rue_house> g) throw it all out and make your own instructions, skipping over the really simple details that anyone could figure out for themselvs
[23:17:28] <Casper> h) throws insults at rue_house ? :D
[23:18:30] <rue_house> iirc, most motor drivers use the voltage on the floating coil to work out if the motor is ready for the next step, I dont know how
[23:19:17] <rue_house> I have a discrete 3 phase driver
[23:19:28] <rue_house> they use halls to sense the motor position
[23:19:40] <rue_house> they use a current limiter to control the motor speed
[23:20:48] <Casper> rue_house: what shall I do now? :D
[23:21:32] <rue_house> design me an actuating mechanism to accuratly recreate the last two digits of the human finger
[23:23:13] <Casper> the human hand is so complex...
[23:23:28] <rue_house> yes and no
[23:23:45] <rue_house> the most complex part is working out what bits aren't doing anything
[23:23:48] <Casper> it's weird that it is so hard to make one as fast and powerfull and delicate..
[23:24:30] <rue_house> VBS, does that REALLY do anything?
[23:24:44] <rue_house> and VLS
[23:24:52] <rue_house> red herrings?
[23:26:00] <rue_house> maybe VBS and VLP work togethor with FDP to prevent over extension
[23:27:51] <rue_house> then VLS and FDS are one actuator, the rest of FDS is a red herring
[23:28:25] <rue_house> meaning FDP is the only realy actuator for the whole finger tip
[23:31:06] <Casper> gimme a glass of milk! don't want to go upstair to get one...
[23:31:33] <rue_house> your not gonna want to milk me...
[23:32:33] <rue_house> the rolls of these tendons and pullies change as they go thru the finger
[23:33:28] <Casper> mc cain chocolate cake + milk hmmmm
[23:33:45] <rue_house> sounds much better
[23:55:10] <Emil> lald: it is on purpose unraveled. I know the compiler would probbaly do it for me if I used -O3, though, but usually avr-gcc breaks a lot of stuff then.