#avr | Logs for 2015-12-24

Back
[00:03:43] <cehteh> usb lib in software
[00:14:06] * Casper wonders where's... abcminiuser?
[00:14:22] <Casper> yes that's him
[00:14:37] <Casper> ah wrong one... that's lufa... not vusb...
[00:45:41] <cehteh> lufa is for devices with usb support
[01:06:59] <Casper> cehteh: yeah... I just mixed the guy :D
[01:07:32] <Casper> the lufa guy (abcminiuser) come here, so does the v-usb... which I forgot who is it
[02:32:40] <Jartza> hallo
[03:06:38] <julius> morning
[03:23:25] <nuxil> merry christmas to you all.. "none americuns" :p
[03:25:32] <Jartza> you too
[03:26:15] <nuxil> :)
[03:28:48] <nuxil> Jartza, got some examples laying around on howto set misc pins as output , using them as "clocks".. im looking for some example codes that i can learn from and build the logic code for my shift registers.
[03:29:25] <Jartza> umm, aren't there plenty of those examples?
[03:29:26] <nuxil> atm im controling them with my PI. but it needs to be replaced with a ATtiny85
[03:29:42] <Jartza> DDRB sets the pin directions
[03:29:49] <Jartza> writing one to pin bits set them as output
[03:30:01] <Jartza> PORTB then controls if the pin is "low" or "high"
[03:30:21] <Jartza> DDRB |= (1 << PB0) | (1 << PB1) | (1 << PB2);
[03:30:29] <Jartza> sets pins PB0, PB1 and PB2 as outputs
[03:30:40] <Jartza> PORTB |= (1 << PB1);
[03:30:45] <Jartza> that sets pin PB1 high
[03:30:54] <Jartza> PORTB &= ~(1 << PB1);
[03:30:58] <Jartza> sets pin PB1 low
[03:31:02] <nuxil> ic..
[03:31:05] <nuxil> thanks,
[03:31:32] <Jartza> so, just setting or clearing certain bits in those registers is enough
[03:31:53] <Jartza> and yea, DDRB &= ~(1 << PB1) sets PB1 as input
[03:32:04] <Jartza> then you can check corresponding bits in PINB
[03:32:15] <nuxil> :D
[03:32:52] <Jartza> like if(PINB & (1 << PB1)) checks if PB1 is high
[03:34:26] <nuxil> thanks,, verry helpfull
[03:34:33] <NicoHood> if i buy a bare atmega328 and want to program it for the first time, is the crystal important? I only have a 20mhz crystal here (which i also want to use later). or does it have to be 8/16mhz?
[03:35:27] <rue_house> about anything over 2Mhz shoudl be fine
[03:35:31] <cehteh> default is internal osc and iirc clkdiv/8 (the latter maybe only on tinys?)
[03:35:53] <cehteh> datasheet should tell
[03:38:59] <ThatDamnRanga> in theory they max out at 16.... but 20 works fine if your power supply is sane
[03:41:38] <cehteh> 328 or 328p? .. the latter is specified for 20mhz
[03:41:45] <Xark> ThatDamnRanga: Actually 328 is rated for 20MHz at 4.5-5.5V (according to my datasheet). :)
[03:41:59] <cehteh> i never had a 328
[03:42:20] <ThatDamnRanga> interesting, I guess I missed that line >_>
[03:42:22] <cehteh> internal clock is 16mhz only
[03:42:25] <ThatDamnRanga> I run everything at 16 in any case
[03:42:44] <Xark> cehteh: Umm, 8Mhz...
[03:42:54] <cehteh> maybe
[03:43:10] <cehteh> wasnt there a PLL?
[03:43:11] <Xark> Needs 16 for xtal (no PLL like ATTiny85).
[03:43:18] <cehteh> ah
[03:43:28] <cehteh> mixed that up with the 85
[03:44:00] <cehteh> the tiny85 has some awesome things i somtimes miss on the mega328 ...
[03:44:39] <cehteh> gain amplifier, PLL (coulnt you run one clock at 64mhz?)
[03:47:38] <Xark> Yep, something insane like that.
[03:47:52] <Xark> Hence https://spritesmods.com/?art=avrfmtx
[03:52:12] <julius> this is a nice idea: http://cdn.instructables.com/FSO/IA9S/HRI98EE3/FSOIA9SHRI98EE3.MEDIUM.jpg a 10pin to breadboard connector
[03:53:47] <ThatDamnRanga> julius, even better if it had hairpin clips
[03:55:52] <julius> hm, i dont see the application of hairpin clips in this case
[03:55:56] <julius> could you elaborate?
[03:58:33] <ThatDamnRanga> sorry I may have mistermed, julius https://thingiverse-production-new.s3.amazonaws.com/assets/93/a3/1c/48/c8/IMG_0397.JPG
[03:59:42] <julius> ah ok
[04:00:01] <julius> cant find either on aliexpress :(
[04:00:08] <ThatDamnRanga> 'chip clip'
[04:00:14] <ThatDamnRanga> there's probably a sane term
[04:00:28] <ThatDamnRanga> but, I've had a quarter litre of vodka and not much food
[04:00:57] <julius> this one is even better, it connects all the lines for a m32 in the right order: https://www.youtube.com/watch?v=KPZRoBmjjFM
[04:01:17] <julius> i just got up in my timezone :)
[04:01:33] <ThatDamnRanga> 2237 here
[04:01:41] <Xark> ThatDamnRanga: Happy holidays. :)
[04:01:44] <julius> 10:39
[04:01:59] <ThatDamnRanga> julius, you need an NTP server, your clock is wrong
[04:02:33] <julius> actually openwrt provides one for the network
[04:02:55] <ThatDamnRanga> well you're at least 120s off
[05:20:53] <NicoHood> i am using a function i havent included the header from. it coompiles and the program crashes. If i include it, it doesnt crash. how can the code even compile with the file not included (using makefile)
[05:28:48] <nuxil> umm. yeah sounds weird. what compiler ? and is there some flags set that ignore missing includes etc?
[05:51:48] <julius> ThatDamnRanga, true...just checkd, this laptop actually wasnt using the ntp
[05:52:22] <julius> NicoHood, maybe the function is available from another header
[05:52:30] <julius> or a standard header thats always included
[05:53:16] <NicoHood> its called @randombytes@
[05:53:28] <NicoHood> ups, us layout
[05:54:05] <NicoHood> however i include a header which adds this randombytes() function as extern function. but i guess the compile just doesnt use the binary then
[06:37:35] <sabor> NicoHood: the compiler assumes it has an int parameter or something like that
[06:37:51] <sabor> you should turn on more warnings of the compiler
[06:38:22] <sabor> for gcc at least -Wall or better more
[07:05:58] <NicoHood> i have
[07:06:04] <NicoHood> wextra even
[07:06:14] <NicoHood> no warnings
[07:06:22] <NicoHood> at least not referring this function
[07:29:36] <julius> ive seen some of the smd soldering videos on youtube, it looks like the solder just jumps onto the pins/board without making bridges....ive experimented with older motherboards....un soldering some parts and resoldering them. but i always get hugh bridges. im using 0.75mm solder with 3,5% flux
[07:30:30] <Lambda_Aurigae> slather on the flux.
[07:30:44] <Lambda_Aurigae> with those soldering videos they start with bare copper and flux too.
[07:30:54] <Lambda_Aurigae> you are starting with solder coated copper which makes a difference.
[07:31:05] <Lambda_Aurigae> get some solder wick.
[07:31:19] <julius> hm ok, i actually ordered some rosin colofonium, but wasnt aware that you cant use it out of the box. its hard
[07:31:21] <Lambda_Aurigae> once you have the tabs stuck down with solder, use the wick to suck up the extra.
[07:36:16] <julius> what kind of flux do you use for smd soldering...if you do it?
[07:36:50] <Lambda_Aurigae> paste stuff in the little jar on my desk...it's kinda amber colored.
[07:37:36] <julius> yes, amber. thats the color mine is too
[07:37:45] <julius> is yours fluid like water?
[07:38:45] <Lambda_Aurigae> no
[07:38:47] <Lambda_Aurigae> it's a paste.
[07:39:00] <Lambda_Aurigae> I have a couple of stiff paintbrushes I use with it.
[08:17:34] <NicoHood> ive got a makefile which calls another makefile which calls another makefile which includes a config. I want to overwrite this config from the first makefile. is this possible and how?
[08:18:10] <Lambda_Aurigae> yes
[08:18:15] <Lambda_Aurigae> edit said files to do what you want
[08:18:18] <Lambda_Aurigae> makefiles are black magic.
[08:18:44] <NicoHood> you mean i should edit the config file?
[08:18:53] <NicoHood> however i also have configs in the first makefile
[08:19:04] <Lambda_Aurigae> your description is rather vague.
[08:19:12] <Lambda_Aurigae> no clue how to change what you want changed.
[08:19:18] <Lambda_Aurigae> learn makefiles.
[08:19:25] <Lambda_Aurigae> then you will know how to do what you want to do.
[08:19:39] <Lambda_Aurigae> it's not as easy as saying, change line 3 to say "this"
[08:19:43] <NicoHood> yeah but i need it like this because i am using a downloaded library and i want to recompile it everytime my main project mcu changes
[08:19:59] <Lambda_Aurigae> again, learn makefiles,,,,and make the changes you need.
[08:20:10] <NicoHood> i tried export and such things, but that did not help
[08:20:34] <NicoHood> sure. thatswhy i am asking here where to look for. so i can read up on this.
[08:20:43] <Lambda_Aurigae> google is your friend.
[08:20:46] <Lambda_Aurigae> makefile tutorial
[08:20:54] <Lambda_Aurigae> that's where I would look.
[08:20:59] <NicoHood> thx a lot
[08:21:03] <Lambda_Aurigae> and where most people in here would start to find what you are looking for.
[08:37:54] <julius> Lambda_Aurigae, thx
[08:38:07] <julius> will get a flux marker
[08:39:04] <julius> is it possible for a avr do die if its vcc is to low?
[08:40:52] <Lambda_Aurigae> die as in permanently? no
[08:41:01] <Lambda_Aurigae> die as in not run till the vcc gets high enough? yeah.
[08:41:31] <Lambda_Aurigae> that being said,,,,your adc inputs and such have to be at or below vcc or that could cause issues but not sure about damage.
[10:35:55] <NicoHood> what does "On-chip 2-cycle Multiplier" mean?
[10:41:23] <LeoNerd> Presumably: an integer multiply unit that gives a result in 2 clock cycles
[10:43:09] <NicoHood> oh, good to know
[12:06:05] <Jartza> evening
[12:07:08] <Jartza> Lambda_Aurigae: https://www.youtube.com/watch?v=G1QWNDck0yU :)
[12:14:31] <aep> why will those code not togle the B5 or B6 pins? http://npaste.de/p/lcX
[12:15:30] <aep> err D5 and D6 of course
[12:18:51] <aep> hm works outside of grbl, maybe they do something to break it :/
[12:46:02] <julius> Lambda_Aurigae, ah ok.. was just worried when switching the a avr from another avr on with a bc547
[17:38:22] <Lambda_Aurigae> Be sociable. Speak to the person next to you in the unemployment line tomorrow.
[17:45:18] <Jartza> :)
[17:59:17] <Jartza> I'm just getting artsy
[17:59:59] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxV2FwS1p5S1VjNnM/view?usp=sharing
[18:00:34] <Lambda_Aurigae> hehe
[18:03:33] <Jartza> the tutankhamon is still coolest :)
[18:07:42] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxTEVTcE9OTGpVZms/view?usp=sharing
[18:09:17] <Xark> Jartza: Converting all the old Amiga Deluxe Paint classics? :)
[18:09:19] <Jartza> https://www.google.fi/search?q=amiga+deluxe+paint&source=lnms&tbm=isch&sa=X
[18:09:25] <Jartza> Xark: sure!
[18:09:42] <Xark> Jim Sachs FTW. :)
[18:10:34] <Lambda_Aurigae> got a script to do the converts?
[18:13:15] <Jartza> not really
[18:13:36] <Jartza> convert ~/Downloads/deluxepaint.jpg -posterize 64 -colors 8 -scale 64x64\! -dither none -gamma 2 -remap mymap.png output.png
[18:13:49] <Jartza> convert output.png -channel R -separate tut_red.xpm
[18:13:49] <Jartza> convert output.png -channel G -separate tut_green.xpm
[18:13:49] <Jartza> convert output.png -channel B -separate tut_blue.xpm```
[18:14:12] <Jartza> and then copypasted those to fugly python script
[18:14:55] <Jartza> Lambda_Aurigae: https://github.com/Jartza/octapentaveega/blob/master/tests/ansitester.py#L276-L507
[18:14:58] <Jartza> :D
[18:15:03] <Jartza> yes. that's quick'n'dirty
[18:15:26] <Jartza> R, G and B are just copy'n'paste
[18:15:36] <Lambda_Aurigae> hehe.
[18:16:50] <Jartza> and yea, mymap.png is just 1x8 pixel image with those 8 colors I support
[18:17:24] <Jartza> created with imagemagick too
[18:17:25] <Jartza> convert xc:red xc:lime xc:blue xc:cyan xc:magenta xc:yellow xc:white xc:black -append mymap.png
[19:05:55] <Jartza> Lambda_Aurigae: ahh, and also this: https://drive.google.com/file/d/0B2dTzW9TMeBxbXlTZUN5QUgzYzQ/view
[19:06:59] <Jartza> oops
[19:06:59] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxbXlTZUN5QUgzYzQ/view
[19:07:01] <Jartza> correct link
[23:53:31] <ferdna> wtf... anyone seen casper? =(