#avr | Logs for 2016-02-28

Back
[03:50:59] <liwakura> this is not AVR related, but am i safe to hardwire the SPI Chip Select Pin of an SD Card to the ground if its the only SPI slave?
[03:52:13] <liwakura> "yes" would be logical, but i don't know what side effects this could have
[04:26:25] <h4x0riz3d> liwakura this would make certain SPI slaves unusable
[04:26:44] <h4x0riz3d> check the datasheet of the sd card thing
[04:27:03] <liwakura> lol
[04:27:07] <h4x0riz3d> if it requires to be selected and de-selected - then it wouldn't work
[04:27:08] <liwakura> okey then
[04:27:34] <h4x0riz3d> i think it won't work for eeproms
[04:27:56] <h4x0riz3d> actually, i'm sure it doesn't
[04:27:58] <liwakura> i already soldered the pin to the gpio... just to be sure
[04:28:10] <liwakura> i wont have an solder iron available when i can finally test it
[04:28:39] <h4x0riz3d> when you start writing to an SPI eeprom - you cannot start doing anything else until you end the writing (by deselecting the chip)
[04:28:44] <Joggl> http://www.conrad.com/medias/global/ce/5000_5999/5800/5880/5883/588313_LB_00_FB.EPS_1000.jpg
[04:28:55] <Joggl> @liwakura ;)
[04:29:20] <liwakura> nah, i cannot just simply buy new stuff
[04:29:46] <liwakura> its just that my hacky stuff is here, but this place is network-technically dead
[04:29:50] <Joggl> but if you have this. you have a solderiron everywhere you are going!
[04:30:53] <liwakura> lol, the ticket guy will throw me out if i solder in DB Trains
[04:33:15] <Joggl> they are working if no one is soldering during they are driving around?
[04:35:06] <liwakura> *confused*
[04:35:26] <liwakura> I already get suspicious looks if i even open a terminal on the train
[04:35:42] <h4x0riz3d> u h4x0r
[04:36:05] <liwakura> or if you write a thesis in a dark text editor
[04:36:22] <h4x0riz3d> that's virtually the same thing
[04:36:23] <liwakura> i think its gotten better in the last years...
[04:36:34] <liwakura> to them, yes
[04:37:18] <liwakura> and then the fear of electronics without case
[04:37:21] <liwakura> because 'thats what bombs look like'
[04:37:42] <cehteh> lol
[04:38:03] <cehteh> i recently has a breadboard with a ardruino on a train too .. people looked strange
[04:38:15] <liwakura> Dear Madam, your vibrator looks the same way inside.
[04:41:08] <liwakura> https://www.youtube.com/watch?v=1fC6Pxw1eLU
[04:41:36] <liwakura> Muslim looking guy throwing bags after people
[04:42:07] <liwakura> their reactions are prizeless.
[04:43:18] <cehteh> esp the last one
[04:43:53] <liwakura> jews grabbing money, muslims bombing, what do christians do?
[04:44:30] <cehteh> hey lets do that next time on a pegida demo
[04:45:11] <liwakura> buddhists immolate themselves
[04:45:14] <h4x0riz3d> liwakura christians rub their smartphones
[04:45:18] <liwakura> cehteh: ++
[04:45:26] <liwakura> nah
[04:45:38] <liwakura> thats not a bad thing
[04:45:38] <liwakura> oh!
[04:45:41] <Thrashbarg> liwakura: Christians bomb the shit out of Muslims
[04:45:43] <liwakura> they rape little children?
[04:45:50] <h4x0riz3d> that too
[04:45:56] <cehteh> burn witches (at least in the past)
[04:46:01] <liwakura> Thrashbarg: i like that one
[04:46:07] <cehteh> and have excuses for everything
[04:46:13] <h4x0riz3d> did someone say witches?
[04:46:15] <h4x0riz3d> >:)
[04:46:48] <liwakura> In german, the female version of hacker is "Häckse"
[04:47:02] <liwakura> Which sounds like the german version for witch
[04:49:10] <h4x0riz3d> BURN THE hackeress?
[04:49:36] <liwakura> better not
[05:49:05] <julius> häckse? that doesnt sound very german..do you mean "hexe"?
[05:49:44] <liwakura> "Hexe" is a Witch, "Häckse" is a female Hacker
[05:49:56] <liwakura> The similarity is coincidental
[05:49:57] <julius> i see
[06:55:45] <Lambda_Aurigae> Evidlo, still looking for serial library?
[06:56:21] <Lambda_Aurigae> http://homepage.hispeed.ch/peterfleury/avr-software.html
[06:56:29] <Lambda_Aurigae> I've used fleury's libs for many years.
[06:58:04] <Lambda_Aurigae> http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/modules.html
[08:55:17] <julius> the irlr7843 looks like a nice TTL mosfet, over 100a of current with ~4.8Vgs, inexpensive... but its contained in a TO-252 casing. which is kinda small. do you guys know a logic level mosfet that can do ~100a and is cheap in a TO-220 casing?
[08:58:33] <Lambda_Aurigae> logic level mosfet?
[08:58:49] <Lambda_Aurigae> hmmm.
[09:00:13] <Lambda_Aurigae> http://www.mouser.com/ProductDetail/International-Rectifier/IRFB4410ZGPBF/?qs=9%252bKlkBgLFf1t%252bYKXmZaHmw%3D%3D&gclid=CJ-A6dnWmssCFQUMaQodQiMKUw
[09:00:26] <Lambda_Aurigae> should be able to drive that with 5V on the gate.
[09:03:59] <Lambda_Aurigae> http://www.mouser.com/ProductDetail/Wolfspeed-Cree/C3M0065090D/?qs=sGAEpiMZZMshyDBzk1%2fWi353tM6nWY0EadBBMwlarVqgb1UdtXRzPg%3d%3d
[09:04:02] <Lambda_Aurigae> there ya go.
[09:04:31] <Lambda_Aurigae> -8 to +18 Vgs with a 1.8 Vgs-th
[09:04:50] <Lambda_Aurigae> oh..only 36A though.
[09:05:28] <Lambda_Aurigae> http://www.mouser.com/ProductDetail/NXP/PSMN4R6-60PS127/?qs=5DYmZrWuUEpgtqLYqcjV1Q%3d%3d
[09:05:31] <Lambda_Aurigae> perfect.
[09:06:06] <Lambda_Aurigae> Vgs-th 4.8V, Vgs max 20V, operating 60V 100A
[09:06:15] <Lambda_Aurigae> in a to-220-3 package.
[09:06:24] <Lambda_Aurigae> $1.57 each.
[09:06:29] <Lambda_Aurigae> cheaper in larger quantity.
[09:06:32] <julius> what does the -3 say?
[09:06:46] <Lambda_Aurigae> the -3?
[09:07:18] <Lambda_Aurigae> no clue what "-3" is in this context.
[09:10:10] <julius> about 70cents in china
[09:10:44] <julius> just want to have some lying around when the next "heavy" motor application comes around
[09:11:00] <Lambda_Aurigae> it is possible to parallel mosfets for higher current capacity too.
[09:11:03] <Lambda_Aurigae> I've done it.
[09:11:13] <Lambda_Aurigae> problem is, if one blows you can get a cascade failure.
[09:11:21] <julius> hm
[09:11:22] <Lambda_Aurigae> so always overrate
[09:11:27] <julius> good idea though
[09:11:34] <Lambda_Aurigae> so if you are driving 250A with that, use 4 or 5 in parallel.
[09:11:53] <Lambda_Aurigae> so you get 400A to 500A total capacity..if one blows you only drop to 300 or 400
[09:12:45] <Lambda_Aurigae> with 250A and you only have 3 in parallel and one happens to emit the magic blue smoke then they will sound like firecrackers on a chinese holiday...POP POP POP!
[09:13:13] <julius> :)
[09:13:26] <Lambda_Aurigae> for motor drive I generally try to rate at double the motor's rated current draw.
[09:13:41] <julius> because of the starting current?
[09:13:47] <Lambda_Aurigae> because, ya know, if you stall that motor the current is gonna go waaay up.
[09:13:51] <Lambda_Aurigae> starting and stall both.
[09:13:59] <julius> ah
[09:14:01] <julius> true
[09:14:22] <Lambda_Aurigae> and start/stall can be sometimes double the rated run current.
[09:14:33] <Lambda_Aurigae> should have start current ratings on most decent motors too.
[09:14:49] <Lambda_Aurigae> if so, at least 50% over start current.
[09:14:56] <Lambda_Aurigae> just to be safe.
[09:14:57] <julius> you said above Vgs-th = 1.8v, why -th? i would just loook at the figure showing Vgs on the x-axes compared to Id on the y-axes
[09:15:05] <Lambda_Aurigae> threshold.
[09:15:14] <Lambda_Aurigae> that's the voltage at which it turns on.
[09:15:18] <julius> yes
[09:15:23] <Lambda_Aurigae> Vgs is just the maximum allowable.
[09:15:28] <julius> ah
[09:15:42] <Lambda_Aurigae> on that last one I posted, Vgs is 20V where Vgs-th is 4.8V
[09:15:55] <julius> now i get it
[09:15:58] <Lambda_Aurigae> so you can turn it on at 4.8V but can drive that gate up to 20V without damage.
[09:16:15] <julius> so 4.8v would be saturation?
[09:16:17] <Lambda_Aurigae> http://www.mouser.com/Semiconductors/Discrete-Semiconductors/MOSFET/_/N-ax1sf/?gclid=COGVyJfXmssCFQctaQodv8IOGQ
[09:16:38] <Lambda_Aurigae> a good lookup table with filters to find what you want there.
[09:17:04] <Lambda_Aurigae> yeah, on that one, 4.8V is your saturation I believe.
[09:17:27] <Lambda_Aurigae> hmm...
[09:17:38] <Lambda_Aurigae> might be that the 20V is full satursation..
[09:17:49] <Lambda_Aurigae> saturation.
[09:17:54] <Lambda_Aurigae> dang, I can't type this morning.
[09:18:16] <Lambda_Aurigae> http://www.electronic-products-design.com/geek-area/electronics/mosfets/using-mosfets-as-general-switches
[09:19:27] <Lambda_Aurigae> mostly I rip them out of old copiers and use them to drive small motors so they are so far overrated they will never fail and overdriven on the gate that they will probably fail soon.
[09:19:58] <julius> i would guess that 20v is absolute maximum, before smoking
[09:20:07] <julius> but not usefull in operation
[09:20:34] <Lambda_Aurigae> that last link has some nifty info I never saw before.
[09:22:55] <Lambda_Aurigae> years and years and years ago when I was a kid I used mosfets,,or maybe just fets back then,,to make touch switches with a big metal plate connected to the gate to turn it on.
[09:23:33] <Lambda_Aurigae> I remember making one where you had to touch one certain nail on a fence to "magically" unlock the gate.
[09:24:07] <julius> theres another question ive been meaning to ask, they write: ...Peak gate currents can be as high as an amp.... the transition from off to on, very fast as it happens in pwm
[09:24:14] <Lambda_Aurigae> wanted to make one that had a magic touch sequence but that would have required a processor and the closest thing to that I had was my vic-20.
[09:24:18] <julius> so i should always use a special driver ic?
[09:24:33] <Lambda_Aurigae> depends on what you are doing with it and how you are driving it.
[09:24:47] <julius> Lambda_Aurigae, a magic nail in a gate, nice :)
[09:24:58] <julius> what about 26khz pwm
[09:25:08] <Lambda_Aurigae> if you need it to turn on RIGHT NOW then use a driver chip or a pre-charged cap through a transistor or something.
[09:25:21] <Lambda_Aurigae> I would test that and play..
[09:25:33] <Lambda_Aurigae> I bet you could drive that with the output of an AVR just fine.
[09:25:50] <julius> i would probably need a oscilloscope to see the current drain
[09:25:56] <Lambda_Aurigae> or just through a bjt transistor,,,or even a small mosfet.
[09:26:09] <julius> of course, i already did. a small ~2a dc motor
[09:26:26] <julius> it works, im just want to understand the ramifications....and if it could blow
[09:26:44] <Lambda_Aurigae> darlington pair driver chip like the uln2803 and related chips would be great.
[09:27:16] <Lambda_Aurigae> what is going to blow the mosfet is overcurrent or overvoltage on the drain/source side
[09:27:20] <Lambda_Aurigae> or overvoltage on the gate.
[09:27:31] <julius> do i have to check if they can switch fast enough for pwm or is that not a issue?
[09:27:40] <Lambda_Aurigae> trying to switch it too fast without enough current won't blow it,,,it just won't switch right.
[09:27:57] <julius> yes, the to much current when switching on would probably kill the atmega output pin?
[09:27:57] <Lambda_Aurigae> http://www.mouser.com/ProductDetail/Wolfspeed-Cree/C3M0065090D/?qs=sGAEpiMZZMshyDBzk1%2fWi353tM6nWY0EadBBMwlarVqgb1UdtXRzPg%3d%3d
[09:28:14] <Lambda_Aurigae> look at turn-on and turn-off delay
[09:28:18] <Lambda_Aurigae> along with fall time.
[09:28:22] <Lambda_Aurigae> and rise time.
[09:28:38] <Lambda_Aurigae> I would guess, adding all those together will give you the maximum toggle speed.
[09:28:53] <twnqx> yum, silicon carbide
[09:29:09] <twnqx> never used one of those babies
[09:29:20] <Lambda_Aurigae> 110ns for max speed from off to on to off again.
[09:30:19] <twnqx> that's slow, not even 10mhz
[09:30:26] <Lambda_Aurigae> 9Mhz give or take.
[09:30:34] <julius> what was it, 1/frequency = period? 1/20khz = 0.00005s = 50us
[09:30:50] <Lambda_Aurigae> but, that's a power mosfet, not a high frequency switching mosfet.
[09:31:17] <Lambda_Aurigae> so, that should handle your 20KHz just fine.
[09:31:24] <twnqx> now a challenge. imagine jeremy clarkson describing powwwwaahhhhh mosfets
[09:31:32] <julius> nano is blow us so, yes
[09:31:34] <Lambda_Aurigae> no clue who that is.
[09:31:45] <julius> neither do i know
[09:32:01] <twnqx> you never watched Top Gear? :(
[09:32:09] <Lambda_Aurigae> 1u is 1000ns
[09:32:14] <Lambda_Aurigae> 1us
[09:32:32] <julius> uh yes i did
[09:32:34] <Lambda_Aurigae> 1ms is 1000us
[09:32:44] <Lambda_Aurigae> so, 1ms is 1000000us
[09:32:50] <h4x0riz3d> does anyone know a PDI programmer besides the avrispmk2 clone, and not counting having to hack avrdude?
[09:33:03] <Lambda_Aurigae> h4x0riz3d, yes
[09:33:16] <h4x0riz3d> which one?
[09:33:17] <Lambda_Aurigae> h4x0riz3d, Tom_itx sells one that does pdi, spi, and tpi
[09:33:31] <h4x0riz3d> where is he located?
[09:33:36] <Lambda_Aurigae> bout 35 dollars...
[09:33:38] <h4x0riz3d> wasn't he in the US
[09:33:39] <Lambda_Aurigae> he is in the USA.
[09:33:41] <h4x0riz3d> meh
[09:33:44] <Lambda_Aurigae> I bought one from him.
[09:33:51] <Lambda_Aurigae> he can ship worldwide if he has any left though.
[09:34:00] <h4x0riz3d> i'm sure he can
[09:34:13] <Lambda_Aurigae> or you can just build one from his specifications.
[09:34:21] <h4x0riz3d> hmz
[09:34:25] <Lambda_Aurigae> I'm sure he will even be kind enough to provide source and schematics.
[09:34:54] <Lambda_Aurigae> and, however much I want to sit here and do nothing but chat today
[09:35:15] <Lambda_Aurigae> I have to go clean out the truck so I can go pick up 75 sheets of 2 foot by 10 foot steel siding.
[09:36:08] <julius> Lambda_Aurigae, the 110ns would be 1/0.0000001s ~10mhz this being 100ns, but still, almost 10mhz
[09:36:52] <twnqx> more like 9
[09:37:07] <twnqx> 9*110 = 990, closer to 1000 than 10*110 = 1100
[09:37:08] <julius> yes
[09:37:34] <julius> still, the mostfet will switch way quicker than my pwm signal
[09:38:19] <twnqx> DON'T SAY MOST
[09:38:26] <twnqx> i am currently reacting allergic to that word.
[09:38:52] <h4x0riz3d> so ur mostly fed with mostfets?
[09:39:34] <twnqx> i don't care about mosfets
[09:39:42] <twnqx> though
[09:39:48] <twnqx> mosfets killed my MOST amp
[09:39:56] <twnqx> so i MIGHT BE ALLERGIC TO MOSFETS, TOO
[09:39:57] <julius> oh, sorry
[09:39:58] <julius> typo
[09:40:32] <twnqx> and i still haven't figured out why said amp claims to have 248°C somewhere inside it
[09:40:39] <twnqx> and refuses to power up the power stage
[09:41:02] <h4x0riz3d> wat
[09:41:11] <julius> 248 when it was running for some or after some time off and a fresh start?
[09:41:15] <h4x0riz3d> something's melting>
[09:41:17] <twnqx> no
[09:41:33] <twnqx> some power mosfets had a gate oxide breakdown
[09:41:40] <twnqx> leaking the supply voltage out from their gates
[09:41:53] <twnqx> apparently damaging other parts
[09:42:01] <twnqx> i just can't figure out which other parts
[09:42:07] <julius> Lambda_Aurigae, http://www.ti.com/lit/ds/symlink/uln2803a.pdf this driver says that it can provide 500ma rated current. the article said that mosfets may need up to 1A of current. how do you calculte that?
[09:42:24] <twnqx> julius: basically from the gate capacitance
[09:42:37] <twnqx> limiting the current will limit the switching speed
[09:47:45] <Lambda_Aurigae> calculate?
[09:47:46] <Lambda_Aurigae> bah!
[09:47:47] <Lambda_Aurigae> TEST!
[09:50:46] <julius> no, i wanna know before
[09:51:01] <Lambda_Aurigae> then go to school and learn the maths.
[09:51:08] <Lambda_Aurigae> I'm a hacker, not a math teacher.
[09:51:10] <Lambda_Aurigae> I just test.
[09:51:18] <Lambda_Aurigae> can usually guess close then test to the limits.
[09:53:34] <twnqx> also, there's spice
[09:53:39] <twnqx> i personally simulate :P
[09:56:19] <Lambda_Aurigae> spice is to electroncs what porn is to sex...
[09:56:20] <julius> that was windows only right?
[09:56:30] <Lambda_Aurigae> good to get you going but the real world is always different!
[09:56:42] <Lambda_Aurigae> there is ltspice that I believe is available for linux.
[09:57:09] <twnqx> i use spice on linux, tyvm
[09:57:16] <twnqx> ngspice, to be specific
[09:58:02] <Lambda_Aurigae> there ya go.
[10:03:58] <julius> found this formula: Qtotal = I * tswitch, I = Qtotal/tswitch = 146nC / 20ms = 0.000000146 / 0.02 = .0000073 = 7uA ?
[10:04:50] <julius> twnqx, im gonna download that
[10:05:33] <julius> the above is for 50hz
[10:07:32] <Lambda_Aurigae> Jartza, you alive/awake/around today?
[10:07:50] <Jartza> yea
[10:08:04] <julius> with 20khz that would ne 146nC / 50us = 2,9mA
[10:08:19] <julius> those numbers seem way to low
[10:08:48] <Lambda_Aurigae> got a guy interested in the octapentaveega as a display adapter for a homemade,,,possibly to sell,,,injector tester rig.
[10:09:12] <Lambda_Aurigae> well,,,kinda interested....he is looking at the videos right now.
[10:09:58] <Lambda_Aurigae> do you have any boards for any of the versions you might like to sell? Just asking as a pre-emptive.
[10:13:25] <Jartza> sure
[10:13:36] <Jartza> I have some arduino shields for example
[10:13:52] <Lambda_Aurigae> he might be interested in that actually as he bought an ardweeny mega2560 to play with.
[10:14:21] <Jartza> is it shield compatible with the old one+
[10:14:40] <Lambda_Aurigae> it should fit the new ones too I bet....they all have the same pinout, or are supposed to.
[10:15:47] <Jartza> well hmm
[10:15:49] <Jartza> "The Mega 2560 is designed to be compatible with most shields designed for the Uno"
[10:16:45] <Jartza> there's now octapentaveega that has been running >2 months straight
[10:16:49] <Jartza> at least it seems stable
[10:17:13] <Lambda_Aurigae> daym...you do some good work.
[10:17:54] <Lambda_Aurigae> ok..I'm out for a while...^^Kilroy might come say hi...
[10:18:49] <Jartza> mmkay :)
[10:19:33] <Jartza> https://drive.google.com/file/d/0B2dTzW9TMeBxUDQ4QUduWDV2TFE/view
[10:19:39] <Jartza> there's even a pic of the shield
[10:21:25] <Jartza> though I have multiple of these too: https://drive.google.com/file/d/0B2dTzW9TMeBxRXVzSUNCT1h2NHM/view
[10:26:04] <julius> what does octapentaveega do?
[10:26:32] <Jartza> julius: https://github.com/Jartza/octapentaveega
[10:26:39] <Jartza> there's videos and stuff
[10:27:07] <Jartza> but in short, it's VGA adapter
[10:27:25] <Jartza> (made from attiny85)
[10:28:28] <julius> i sree
[10:29:42] <Jartza> 32 x 16 characters on screen (512 characters that is. as much as attiny85 has ram)
[10:33:29] <Jartza> and that shield can of course be just slapped on top of arduino and then just use uart to send data to screen
[10:33:46] <Jartza> of course no need to constantly update anything, the text will stay on screen as long as it has power
[15:22:22] <DarkUranium> hey
[15:22:41] <DarkUranium> I'm wondering if I'm missing something ... Atmel's product finder lists the Attiny25/45/85 as having 6 PWM channels
[15:22:45] <DarkUranium> but the datasheet mentions only two
[15:23:05] <DarkUranium> (I need three or more)
[15:26:04] <lorenzo> DarkUranium: attiny85 can do three independent pwm
[15:26:17] <DarkUranium> lorenzo, that's what I need, yes
[15:26:25] <lorenzo> OC0A, OC0B, OC1B
[15:26:27] <DarkUranium> lorenzo, but why can't I find that in the datasheet I'm looking at?
[15:27:06] <DarkUranium> lorenzo, in the PDIP/SSOP, or only in QFN?
[15:27:50] <DarkUranium> ah, found it now
[15:27:55] <lorenzo> DarkSector: they're equivalent. the QFN version has two rows of DNC (do not connect)
[15:28:06] <DarkSector> k
[15:28:08] <DarkUranium> lol
[15:28:30] <DarkUranium> misunderstood the summary, I thought the highspeed timer/counter and timer-counter had same/shared PWM
[15:28:46] <DarkUranium> lorenzo, does the 25 also have 3x (or, well, 4x) PWM?
[15:29:03] <lorenzo> I've never used an attiny25, just the 85
[15:29:10] <DarkUranium> okay
[15:29:10] <lorenzo> but since the datasheet covers them all..
[15:29:23] <DarkUranium> 45 is what's commonly available here, FWIW, but I'll try and target smallest I can
[15:29:42] <DarkUranium> (code made for 25 should be portable to 85 anyways, methinks [I mean, after recompilation if I have to, but probably even without])
[15:29:51] <lorenzo> if you can live with 128B of SRAM
[15:29:54] <lorenzo> I'd go with Attiny841
[15:29:56] <lorenzo> an 8-bit timer/counter with two PWM channels, two 16-bit timer/counters with two PWM channels
[15:29:56] <Caesium> I thought 25/45/85 were equivalent other than ram/flash?
[15:30:00] <lorenzo> .. and two uart :-)
[15:30:12] <DarkUranium> I'm targeting lowest possible pin count
[15:30:21] <DarkUranium> I'd have gone the 6-pin PIC10F if those had 3x PWM
[15:30:28] <lorenzo> pic10f200 then?
[15:30:32] <lorenzo> ah, no pwm
[15:31:23] <DarkUranium> and 202 then (because 256 words of program memory *IS* a bit low)
[15:32:57] <DarkUranium> oh and, the Atmels can usually source (and/or sink) more current than PICs on each individual pin, which means I may be able to drive LEDs without transistors or similar support circuitry
[15:32:58] <flyback> http://jjsaspie.imgur.com/
[15:33:05] <DarkUranium> (I will double-check this ofc, but just sayin')
[15:33:08] <lorenzo> DarkUranium: pic10f322 / pic10f320 ?
[15:33:14] <DarkUranium> lorenzo, those have PWM?
[15:33:28] <DarkUranium> well, 3x PWM
[15:33:34] <lorenzo> PWM outputs-4
[15:33:44] <lorenzo> a whopping 64 Bytes of ram though
[15:33:51] <DarkUranium> might not be independent ... I know I've looked at many of these, but they're just complementary PWM
[15:33:56] <lorenzo> run two cycles in that
[15:33:56] <DarkUranium> as in, 2 actual channels
[15:33:59] <lorenzo> and you're screwed
[15:33:59] <lorenzo> lol
[15:34:24] <lorenzo> why low pin count when you could go for smaller package
[15:34:31] <lorenzo> and have much better performance per pcb area? :p
[15:34:35] <lorenzo> (now that's a metric)
[15:35:15] <DarkUranium> well, the PIC10Fs do come in SOT23-6
[15:35:29] <DarkUranium> https://s3-ap-northeast-1.amazonaws.com/t1tcxo/T1+in+SOT23-6.jpg (same package, not same IC)
[15:36:37] <DarkUranium> PIC12F1501 seems to be the smallest Microchip offering with >= 4 PWM
[15:36:51] <DarkUranium> it's 8-pin (so, same as the ATTiny, but ATTiny's probably better there)
[15:37:09] <DarkUranium> errr, >= 3 PWM *
[15:37:11] <DarkUranium> (has 4)
[15:38:00] <lorenzo> yeah but it comes with java
[15:38:08] <lorenzo> :(
[15:38:18] <lorenzo> sdcc has no 12F support
[15:38:31] <DarkUranium> ah ... didn't get around to checking that yet.
[15:38:52] <lorenzo> (or actually it has for older stuff like 12f675, but I'm not sure about the definitions, 12f1501 is fairly new)
[15:39:11] <lorenzo> so you're stuck with their compiler and IDE pretty much
[15:39:30] <DarkUranium> yeah, that's what I generally find w.r.t. Microchip vs Atmel
[15:39:52] <DarkUranium> Microchip tends to have better ICs for the buck (more/better peripherals or whatever), while Atmel has the better tools
[15:40:04] <twnqx> and better core
[15:40:09] <twnqx> limited call nesting, lol
[15:40:14] <lorenzo> bank switching
[15:40:14] <lorenzo> :D
[15:40:54] <h4x0riz3d> nooooooo
[15:41:02] <twnqx> the only time i dealt with pic was my bus pirate
[15:41:07] <DarkUranium> h4x0riz3d, ?
[15:41:09] <h4x0riz3d> microchip, banked ram? pls
[15:41:10] <twnqx> and the thing acts in ways that can not be explained by the code
[15:41:15] <h4x0riz3d> it's 2016
[15:41:55] <h4x0riz3d> their programmer and the app for it both suck
[15:42:32] <lorenzo> well the fact that their compiler slows down code on purpose is already a reason to avoid it
[15:42:50] <lorenzo> I've had to get the mplab XC compiler + crack from rutracker.org
[15:43:07] <lorenzo> :D
[15:43:08] <h4x0riz3d> they have a commandline app similar to avrdude, which works with the pickit3 programmer
[15:43:33] <h4x0riz3d> BUT it's slow as hell, it loads java underneat, takes ages to even print an error
[15:44:25] <lorenzo> only good thing about them is the new Harmony thing
[15:44:27] <h4x0riz3d> and it's mostly broken.. there are arguments that let you NOT erase the eeprom but just the flash memory.. but they are broken
[15:44:34] <lorenzo> which generates decent initialization code
[15:49:44] <DarkUranium> whatever the case, I'll probably go for the ATTiny
[15:49:52] <DarkUranium> now if only I could figure out how much current those can source/sink ...
[15:52:07] <DarkUranium> can't find the recommended conditions, but absolute maximum says 40mA ... so I guess 20mA should be safe
[15:52:27] <lorenzo> DarkUranium: there's usually a rating for the entire chip
[15:52:35] <DarkUranium> yeah, 60mA
[15:52:45] <lorenzo> check asbolute max ratings
[15:52:50] <lorenzo> for sink/source
[15:53:00] <DarkUranium> it says 40mA for both
[15:53:07] <DarkUranium> both/either
[15:54:03] <DarkUranium> there is no specific thing written for I/O ports in absolute maximum (except that DC current between VCC and GND must be <= 200mA), but a footnote says it should be <=60mA
[15:54:25] <DarkUranium> (well, at least to adhere to test conditions)
[15:56:22] <DarkUranium> the description is a bit messy, but I *THINK* I should be safe with 3x20mA source or sink
[15:58:15] <DarkUranium> if all else fails, I'll just buy a bunch of tlc59731's (3-channel PWM LED drivers w/ SPI-like interface)
[15:58:43] <DarkUranium> correction, it's async serial
[16:13:07] <jacekowski> 20mA is a typical figure for a micro
[16:13:37] <jacekowski> DarkUranium: which attiny are you using?
[16:13:50] <DarkUranium> jacekowski, prooly gonna go with 45, as that's what's available here
[16:13:58] <DarkUranium> I mean, without waiting for like 2 weeks
[16:15:24] <jacekowski> DarkUranium: http://www.atmel.com/images/atmel-2586-avr-8-bit-microcontroller-attiny25-attiny45-attiny85_datasheet.pdf
[16:15:27] <jacekowski> page 161
[16:15:35] <jacekowski> hmm
[16:15:37] <jacekowski> nevermind
[16:15:45] <DarkUranium> yes? I've been there
[16:15:53] <DarkUranium> it's a bit unclear, though
[16:16:16] <DarkUranium> (there's absolute maximum ratings, but there's no recommended operating conditions for max current [both per-pin and total]
[16:16:17] <DarkUranium> )
[16:18:31] <jacekowski> i'm looking at local copy of older datasheet and it has recommended ratings
[16:18:42] <jacekowski> and it is 20mA
[16:18:59] <jacekowski> but i still don't understand why they've removed it
[16:19:31] <DarkUranium> hm.
[16:19:34] <jacekowski> if new absolute maximum ratings were the same as recommende ratings used to be i could sort of understand it
[16:19:55] <DarkUranium> jacekowski, does it have recommended max current for all pins total?
[16:20:07] <jacekowski> atmel just had enough of people running it at exactly maximum ratings and complaining
[16:20:35] <DarkUranium> well yes, 40mA does sound like a bit much
[16:20:43] <DarkUranium> especially if one doesn't pay attention to the other (200mA) limit
[16:22:16] <WormFood> what do you guys think will happen to the AVR families, after Microchip's buyout of Atmel?
[16:22:23] <jacekowski> WormFood: wooooooot?
[16:22:30] <jacekowski> when did that happen?
[16:22:45] <WormFood> It's in the process of happening.
[16:22:45] <jacekowski> DarkUranium: there is 50mA limit per port that i can find
[16:23:07] <jacekowski> WormFood: well, it's not like they can just drop the whole range of chips
[16:23:11] <WormFood> The merger should be approved in a few months. There are already statements on both companie's websites..
[16:23:11] <DarkUranium> jacekowski, wait, 60mA?
[16:23:15] <DarkUranium> errr, 50*
[16:23:23] <DarkUranium> jacekowski, absolute maximum ratings on a sheet I'm looking at are 40mA
[16:23:36] <WormFood> they have the ability to terminate the AVR family
[16:23:39] <DarkUranium> http://www.atmel.com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf page 161 "DC Current per I/O Pin ............................................... 40.0 mA"
[16:23:48] <jacekowski> DarkUranium: that's per port (8 io pins)
[16:24:04] <WormFood> But, will they do that, or will they allow the AVR to die, or will they expand it, with their own technology?
[16:24:04] <DarkUranium> oh
[16:24:05] <DarkUranium> entire port
[16:24:14] <DarkUranium> jacekowski, that's in the old sheet?
[16:24:19] <jacekowski> DarkUranium: yes
[16:24:33] <DarkUranium> I guess something changed and it isn't relevant anymore, then?
[16:24:40] <jacekowski> WormFood: well, the question here is why are they buying atmel?
[16:24:48] <jacekowski> DarkUranium: no idea
[16:24:48] <DarkUranium> (or maybe they just found out it wasn't necessary)
[16:25:01] <DarkUranium> since there's no mention of max current / port *at all* in this one
[16:25:42] <jacekowski> WormFood: if they are buying atmel for patents, they might sell it off to someone else and keep the patents
[16:25:51] <jacekowski> WormFood: or just close it down completly
[16:26:12] <jacekowski> WormFood: there were situations like that in history
[16:26:38] <DarkUranium> jacekowski, but what about the industry, some of which depends on Atmel chips?
[16:26:51] <DarkUranium> I doubt they can just stop everything alltogether
[16:26:58] <jacekowski> which is why i don't see them dropping existing products
[16:27:06] <twnqx> but who in their right mind would choose a fucking crippled cpu like pic over an avr?
[16:27:11] <WormFood> they can, but it'd be very bad
[16:27:24] <DarkUranium> twnqx, well, PIC32 are pretty damn nice, IMO
[16:27:31] <twnqx> so what
[16:27:37] <twnqx> if i want 32bit i go arm
[16:27:38] <jacekowski> WormFood: some might have preexisting contracts to supply millions of chips for years to come
[16:27:39] <DarkUranium> MIPS better than AVR's "custom C-optimized asm" crap, anyways.
[16:27:46] <jacekowski> WormFood: so it might not be so easy
[16:27:51] <twnqx> 8bit are the only relevant avrs
[16:28:08] <twnqx> but i bet microchip in in for the other businesses
[16:28:12] <twnqx> eeproms, flash memory
[16:28:23] <twnqx> is in*
[16:28:51] <jacekowski> all allen bradley/rockwell PLCs have atmel chips in them (ARMs and AVRs)
[16:28:59] <jacekowski> and some custom made stuff
[16:29:18] <jacekowski> twnqx: i've seen something like that happen, in other industry
[16:29:18] <twnqx> wincor nixdorf uses atmel chips for the rs485 gateways
[16:29:32] <jacekowski> there is a company called wyeth
[16:29:33] <twnqx> in their ATMs and the like
[16:29:44] <jacekowski> there was a wyeth nutrition and wyeth pharmaceuticals
[16:29:56] <jacekowski> pfizer bought them few years ago
[16:30:19] <jacekowski> kept the pharmaceuticals part, and sold of wyeth nutrition to nestle
[16:30:53] <jacekowski> so similiar thing might happen to atmel
[16:30:55] <twnqx> also, i saw atmel in the radio frequency stuff for cat keys (rfid as well as remote control)
[16:31:01] <twnqx> car keys*
[16:31:09] <twnqx> cats don't need keys, they have humans
[16:31:23] <DarkUranium> jacekowski, if Microchip sells part of Atmel, it'll probably be the MCU part, I suspect (and they'll want to keep the rest)
[16:31:39] <twnqx> i'd guess the same
[16:31:47] <twnqx> just no idea if 8bit micros are really profitable
[16:31:53] <DarkUranium> maybe we could buy it, I got a dollar
[16:32:47] <DarkUranium> dunno if directly, but the fact that Arduino (and thus AVR) is popular in education can't exactly hurt
[16:33:12] * DarkUranium thinks Arduino is a decent rapid prototyping platform, but prefers bare AVR for actual products
[16:33:22] <DarkUranium> esp. given Arduino's silly licensing
[16:33:27] <twnqx> i don't think arduino is decent
[16:33:41] <twnqx> but that's more me hating on the I/O layout than anything :P
[16:33:49] <DarkUranium> well, their mainline (Uno and such) have stupid af I/O layout
[16:34:03] <DarkUranium> and the IDE is 120% crap
[16:34:12] <twnqx> like every IDE :P
[16:34:16] <DarkUranium> heh
[16:34:26] <DarkUranium> Arduino more so, I think it still doesn't have line numbering, for one
[16:34:33] <DarkUranium> (despite having errors reporting line numbers)
[16:34:42] <DarkUranium> but stuff like Arduino Nano are kinda useful for fast stuff
[16:35:22] <DarkUranium> twnqx, I don't get people who use up an entire, say, Arduino Uno + like 5 shields stacked on top, put it in a box, and call it a "finished project"
[16:35:31] <DarkUranium> s/$/, though/
[16:35:48] * twnqx looks at leonardo driving some LEDs...
[16:36:06] <DarkUranium> I've even seen "finished projects" as a bunch of wires plugged into a solderless breadboard
[16:38:57] <DarkUranium> twnqx, I mean, you get crap like this, meant to be *permanent*: http://www.tinkerhobby.com/wp-content/uploads/2014/01/an-arduino-project-300x225.jpg
[16:39:13] <DarkUranium> I think this is the result of someone asking themselves "can I?", but forgetting to ask themselves "should I?"
[16:39:24] <twnqx> lol
[16:39:33] <DarkUranium> even better: http://www.bigi.com/rjb/Projects/ArduinoColorOrgan/Images/GE-35_Arduino_Breadboard.jpg
[16:39:52] <aandrew> DarkUranium: there's nothing wrong with http://www.tinkerhobby.com/wp-content/uploads/2014/01/an-arduino-project-300x225.jpg
[16:40:08] <aandrew> that's *exactly* how I used to do circuitry ... minus the arduino since they didn't exist back then
[16:40:21] <twnqx> as a permanent solution? the final one?
[16:40:32] <aandrew> but I did have a triple-8255 ISA card I'd point-to-point wired because I was sick of using the parallel port
[16:40:38] <aandrew> twnqx: define permanent
[16:40:56] <twnqx> "use until it dies or you no longer have any use for what you built"
[16:40:58] <aandrew> twnqx: something I'd use day-in and day-out? no, you need a board for that, even a vectorboard/veroboard
[16:41:01] <aandrew> ah, no
[16:41:08] <DarkUranium> aandrew, yeah, I'm talking 100% permanent.
[16:41:21] <DarkUranium> aandrew, I'd use a perfboard for that example up there (assuming it was permanent, that is)
[16:41:22] <aandrew> DarkUranium: ahh. carry on :-)
[16:41:29] <twnqx> it's fine for prototyping, i'd do that myself
[16:41:37] <DarkUranium> of course, I also use solderless breadboards
[16:41:41] <aandrew> actually I *did* do something like that when I used to DJ
[16:41:44] <DarkUranium> for prototyping and/or figuring out some new device
[16:41:44] <twnqx> i rarely do
[16:41:50] <twnqx> my SMDs don't really fit :P
[16:41:53] <DarkUranium> heh
[16:41:56] <aandrew> I had a bunch of buttons in a breadboard with triacs which you plugged lights in to
[16:41:57] <DarkUranium> I have a bunch of breakout boards
[16:42:10] <aandrew> I "played" the lights since I dind't like how the various colour organs looked
[16:42:13] <twnqx> tqfp100+, plus the right caps?
[16:42:23] <DarkUranium> real men use BGA
[16:42:25] <DarkUranium> :P
[16:42:30] <lorenzo> what, you can blink LEDs without an arduino?
[16:42:39] <WormFood> I removed a BGA with a torch once
[16:42:47] <twnqx> lorenzo: blinking an LED was the first thing i did with my first fpga board :P
[16:42:48] <WormFood> It still worked afterwards
[16:42:49] <Tom_itx> you can do it with a FPGA i hear
[16:42:58] <DarkUranium> lol
[16:43:00] <DarkUranium> lorenzo, that reminds me, I've seen people selling stuff "for arduino" that has pretty much nothing to do with it
[16:43:10] <lorenzo> DarkSector: buy this relay
[16:43:12] <lorenzo> it's for arduino
[16:43:17] <DarkSector> k
[16:43:22] <lorenzo> :p
[16:43:24] <lorenzo> oh shit
[16:43:35] <WormFood> I removed and replaced a TSOP with a shitty Radio Shack 25 watt pice of shit soldering iron.
[16:43:35] <twnqx> wormfood: are you bored?
[16:43:36] <DarkSector> no worries :)
[16:43:40] <lorenzo> :)
[16:43:53] <twnqx> i could mail you a BGA CPU to solder power wires on :D
[16:44:05] <WormFood> no thanks
[16:44:08] <lorenzo> DarkUranium: I guess it pops up higher in ebay / aliexpress search, when people buy stuff "for arduino" or "for raspberry"
[16:44:08] <DarkUranium> lorenzo, I've even seen it on stuff that an Arduino couldn't possibly run; probably only for more sales (and/or possibly because it had the usual 0V - 5V logic levels)
[16:44:24] <WormFood> the BGA I removed, was 64-pins....but the funny thing is, they only used 4
[16:44:29] <twnqx> lol
[16:44:39] <twnqx> yeah, this one has a few 100 more
[16:44:40] <DarkUranium> WormFood, O_o
[16:44:44] <WormFood> An Internal smart card, for a satellite receiver.
[16:45:04] <WormFood> I removed it, and soldered it to a board, and plugged it into the card slot, and it still worked.
[16:45:23] <twnqx> i don't really care, i just removed it to follow the traces & got a second device to hack on :P
[16:47:00] <WormFood> I wrote some software for the AVR, to receive data from a satellite receiver, at this odd bit rate, and translate it to a normal bit rate for the computer. The gap between commands, makes this possible, to go from a faster speed, to a slower speed, without issue. Only problem with my program, is it'd glitch every few days, and I never did have time to figure out the problem.
[16:47:01] <DarkUranium> jacekowski, as for that AVR, I guess I'll just try 3x20mA and hope for the best.
[16:47:07] <DarkUranium> since the datasheet is so damn unclear
[16:47:55] <DarkUranium> the "add more power and watch for smoke" approach
[16:48:01] <WormFood> All the data, is bit inverted, and bit swapped. Other speed converter software did a bit swap and inversion. I used a lookup table, since I had plenty of flash to spare.
[16:48:09] <jacekowski> twnqx: i did that
[16:48:28] <jacekowski> twnqx: soldered some wires to bga chip to test something
[16:48:37] <lorenzo> strangest thing I've encountered while reversing stuff
[16:48:42] <lorenzo> was a "video cd processor" chip in a Cisco VoIP phone
[16:48:46] <twnqx> i got up to 10 or so until the first removed themselves again
[16:48:54] <jacekowski> it was very temporary and didn't last long
[16:49:06] <lorenzo> seems like they got the video processor chip and only used its RISC core
[16:49:14] <DarkUranium> lol
[16:49:17] <lorenzo> and maybe some of its DSP features
[16:49:39] <DarkUranium> lorenzo, sounds like the hardware equivalent of this: https://xkcd.com/801/
[16:50:00] <jacekowski> lorenzo: was that off the shelf chip?
[16:50:13] <lorenzo> jacekowski: yeah, it's a "ESS Visba 3" chip
[16:50:28] <lorenzo> with some memory around it, and a RTL8019 ethernet switch
[16:50:36] <lorenzo> http://reverse.0cpm.org/linksys/datasheet/ES3890.pdf
[16:52:44] <lorenzo> http://imgur.com/XVxROro.jpg
[16:52:48] <lorenzo> here's the mainboard
[17:01:30] <twnqx> re:bga, that took some time of searching: https://img.eternallybored.org/image/0/v/0Vc4LXL1J0UrIh27v87i2oVAZY3NRe9wkVHhsEe4Yq4.jpeg
[17:02:35] <twnqx> https://img.eternallybored.org/image/l/e/leNnCsVqwluEd5PfDaTVUvHOQtFqMyGHii8Y66BsoQM.jpeg other side :P
[17:04:53] <twnqx> https://img.eternallybored.org/image/i/z/IZ6DwY31g31wxwO-ie3Luc28dsYARhzzSAfzDSIihGY.jpeg it looks... beautiful, but i'd go insane doing this
[17:10:15] <Evidlo> PB0 and PCINT0 are on the same pin on the attiny85. does this mean that those variables are the same?
[17:10:33] <WormFood> that means that pin shares those functions
[17:10:43] <WormFood> Usually you can use one or the other
[17:11:00] <Evidlo> my code breaks when I switch between from PB0 to PCINT0
[17:11:22] <WormFood> no surprise there
[17:11:37] <WormFood> did you see what those defines actually evaluate to?
[17:12:03] <Evidlo> Some number, but I don't know what it represents
[17:12:11] <WormFood> you should know.
[17:12:27] <WormFood> Look at your datasheet, and see what those represent.
[17:12:36] <Evidlo> oh PCINT0 is for PCMSK
[17:12:41] <WormFood> look at the big table, of memory, and their bits.
[17:12:57] <WormFood> Those defines are their bit position(s) in those registers...usually
[17:13:11] <WormFood> It's just a shorthand for us.
[17:15:15] <Evidlo> I don't see PB0 listed in the register summary table
[17:16:10] <WormFood> look for portB
[17:16:50] <Evidlo> yea, it uses PORTBX instead of PBX
[17:17:12] <Evidlo> anyway, I just looked up the header file and PCINT0 is the same as PB0
[17:17:44] <WormFood> then clearly changing that, can't be the source of your problem.
[17:18:51] <Evidlo> Need to do more investigation
[17:19:35] <WormFood> I feel that would be your best course of action. Try to narrow it down, to a single change (or the least changes), that will trigger your problem, then investigate that in more detail.
[17:35:30] <Evidlo> Why does every say 8MHz clock is exactly 8000000Hz? All of my measurements show that my clock is at 8192000Hz
[17:40:16] <Evidlo> *everybody*
[17:41:49] <liwakura> that doesn't make sense
[17:42:02] <liwakura> Hz is never measured in 1024-bases
[17:42:18] <lorenzo> Evidlo: how did you measure?
[17:43:29] <liwakura> If all the arduino's had 8.192 Mhz instead of 8, most serial consoles would not work
[17:44:22] <twnqx> 2.5% deviationdoesn't sound so horrible
[17:44:40] <liwakura> not if you already have 2.1% deviation
[17:45:16] <liwakura> currently thinking about playing an 8bit pcm from a sd-card
[17:45:38] <twnqx> so you have 2.152 instead of 2.1...
[17:45:50] <twnqx> (still, 8mhz is 8 million hertz)
[17:46:09] <twnqx> he probably just found the deviation of the internal oszillator :P
[17:46:29] <liwakura> twnqx: let me calculate a bit
[17:47:16] <liwakura> you are probably right
[17:47:35] <liwakura> but i can't explain why those percentages don't add up
[17:47:45] <liwakura> but multiply instead
[17:50:36] <twnqx> bedtime for me
[17:50:37] <twnqx> nn
[18:14:39] <Emil> Hello
[20:20:01] <Lambda_Aurigae> olleH
[20:28:18] <Casper> ǝɐbıɹnɐ‾ɐpqɯɐן oןןǝɥ