#avr Logs

Sep 04 2020

#avr Calendar

03:38 AM nohit: proper engineer writes i2c driver in a day, a week max
03:44 AM nohit: no need to use some obsolete bit-banging lib for a obsolete mcu
03:44 AM nohit: if my boss can write bit-bang i2c C driver, anyone can
03:44 AM nohit: if not, maybe this embedded stuff isnt your thing
06:12 AM LeoNerd: MCUs with actual I²C peripherals are easy and cheap these days, no need to go bitbanging that stuff
06:53 AM nohit: true dat
07:44 AM vmt: can't even think of any mcus nowadays without i2c
08:49 AM nohit: my boss calls bitbanging bitbanding
08:49 AM nohit: bitbanding is completly different
09:00 AM rue_mohr: nohit, good thing I dont have to be propper
09:00 AM rue_mohr: the bit-banging libraries are smaller cause the hardware is so horrid :)
09:01 AM rue_mohr: you wouldn't know that if you havn't looked at the code in the libraries you carelessly throw into code
09:01 AM rue_mohr: ? :)
09:02 AM rue_mohr: its waste, I care cause without it, I can make the micro do awesome things
09:10 AM nohit: like ?
09:10 AM rue_mohr: whatever you would need a micro 10x larger to be able to do :)
09:10 AM nohit: sure
09:11 AM rue_mohr: I dont need you to believe me, you go write your bloatware, you will never know its cost.
09:12 AM nohit: but i dont really do microcontrollers anymore, i do microprocessors now
09:12 AM rue_mohr: everyone thinks the suffering is normal
09:12 AM rue_mohr: thats more than 10x on the bloatware :/
09:12 AM rue_mohr: hah
09:13 AM nohit: or SoCs as they call them
09:13 AM rue_mohr: yup, with windows embedded?
09:13 AM nohit: nope
09:13 AM rue_mohr: I'm sure you will soon
09:14 AM nohit: no need for that, i build my own custom linux
09:14 AM rue_mohr: awe I never get enough time in the morning
09:15 AM rue_mohr: OSs that are ready-to-go are easy and cheap these days, no need to go compiling that stuff
09:17 AM nohit: :D
09:17 AM twnqx: rue_mohr: do you have a particular cpu in mind with "i2c in hardware is worse than in software"?
09:17 AM nohit: you dont seem to undestand how embedded linux works...
09:18 AM rue_mohr: tiny13
09:18 AM rue_mohr: tin26
09:18 AM rue_mohr: even for the atmega8
09:18 AM twnqx: ok, haven't looked at those
09:19 AM rue_mohr: flurry bit-bang library less code space
09:19 AM twnqx: but if it needs foreground processing while it could do something else, i'd consider that bad
09:19 AM twnqx: unless it doesn't do anything else anyway
09:20 AM nohit: only reason rue_mohr says that is that he failed to write a driver for the i2c hardware
09:20 AM twnqx: for 5 lines of setup code to get the clock right, and then 3 lines for the transfers? doubt that
09:21 AM rue_mohr: I looked at what it takes, then looked over source for 3 implementations
09:21 AM twnqx: unless of course you want a super-duper-genral-works-on-every-single-avr-in-existence driver
09:21 AM rue_mohr: I was amazed that flurrys source is smaller to bit-bang it
09:21 AM twnqx: imagine, the usb bitbanging code is also smaller than a true usb hardware driver
09:22 AM rue_mohr: er usb?
09:22 AM twnqx: and i don't know how well your i2c code handles multi-master, stalls, aborts, clock stretching, ...
09:22 AM rue_mohr: actaully I forgot about that usb 1 library, what was that for? 8535?
09:23 AM twnqx: dunno, obdevs runs on 8 pin tinys
09:23 AM twnqx: of others i only used lufa so far, and yes, that's pretty.. large
09:23 AM rue_mohr: I wonder if I could be that wastefull if I had infinite amounts of money to throw at a project
09:24 AM twnqx: for what, using a mega32u4?
09:24 AM rue_mohr: I bet not, I just cant stand overhead
09:24 AM rue_mohr: my buddy at work yesterday threw out a laser catridge cause its page counter said it was empty
09:24 AM rue_mohr: but it was printing just fine
09:25 AM rue_mohr: really, not even faded
09:25 AM rue_mohr: that attitude * the human population is the reason for disaster
09:26 AM twnqx: really, if you recommend incomplete software bitbanging over proper hardware implementations, and THEN claim to care about waste, something is wrong
09:26 AM nohit: maybe focus a bit less on the overhead and more on actually doing NEW things
09:26 AM rue_mohr: I wonder how flurry does on multi-master
09:27 AM twnqx: and on clock stretching, because that's common, too
09:27 AM rue_mohr: as I dont use that much overhead, I dont need two processors, and may not ever know
09:28 AM twnqx: interesting approach. "i never want to tap into existing things, so i won't ever know"
09:28 AM twnqx: probably what the retarded chip designers on that one old opteron chipset thought, too
09:28 AM rue_mohr: I'm gradually moving to stm32, becasue avrs are dieing, so the limit gets that much further away
09:29 AM twnqx: until someone integrated an ipmi controller, also reading the sensors
09:29 AM twnqx: which crahsed their hardware engiens
09:29 AM rue_mohr: I was able to prettymuch just pull in flurrys library to the stm32
09:29 AM rue_mohr: as its hardware i2c anyhow
09:29 AM rue_mohr: haha software
09:31 AM twnqx: "i need a faster cpu so i can still run my software emulation of hardware fast enough" lol
09:31 AM rue_mohr: so, for the hardware i2c on the avrs you have worked with, do they still require you to manually toggle the clock pin? that really dissapointed me on the hardware I was going over at the time
09:31 AM twnqx: what
09:31 AM rue_mohr: "write to this register 8 times to send 8 bits"
09:32 AM rue_mohr: oh, maybe you just include a library and dont know
09:32 AM twnqx: ... i never had a single one
09:32 AM twnqx: what would be the difference to bitbanging then
09:32 AM rue_mohr: EXACTLY
09:32 AM rue_mohr: the answer being that it shifts the data out for you
09:32 AM twnqx: no, i actually tell it "here's the data, now go for it"
09:32 AM rue_mohr: and there are a whole mess of other registers you set up to do it
09:33 AM rue_mohr: iinteresting
09:33 AM rue_mohr: wonder which avrs I was looking at
09:33 AM twnqx: yes, how else would you control the frequency, set a start condition, trnasmit data, and set a stop condition
09:33 AM rue_mohr: I think they were using the uart
09:34 AM rue_mohr: I remember there are two levels of i2c hardware on the avrs
09:34 AM rue_mohr: one of them used a universal system, the other used one specific to i2c
09:34 AM rue_mohr: later!
10:03 AM nohit: twnqx: i told you
10:04 AM nohit: this is the level of experience on this channel
10:10 AM vmt: i'm not exactly sure where rue is going with this. if there's an mcu with _hardware_ for i2c, all you're going to do is set up the regs and go. like charlie sheen says, only one gear - go
10:10 AM vmt: so i don't know wtf is he referring to with the "software"
10:10 AM twnqx: bitbanging
10:11 AM twnqx: and when he says there are/were avrs that you had to manually clock.. well, i agree, then just bintbang 'em
10:11 AM twnqx: i just never experienced any
10:12 AM vmt: well, if i understood correctly, he's referring to some "software implementations" regarding the hardware functionality (??)
10:12 AM nohit: he couldnt handle few registers so he used a bitbang library
10:12 AM vmt: said implementations being "worse" on the targets he listed (again ??)
10:12 AM nohit: you dont need to manually clock
10:12 AM twnqx: i didn't pay enough attention to recent history to comment
10:14 AM vmt: ^ the same reason the vast majority of the population should have their voting right revoked
10:14 AM vmt: suffrage i guess is the term
10:15 AM twnqx: are you now ranting against me for not paying attention to a bloody irc channel with a pointless technical debate that borderlines religious belief?
10:16 AM nohit: i dont think this is pointless
10:18 AM vmt: nothing personal, it's just a general observation
10:19 AM twnqx: it is insofar as rue's conviction to optimal/perfect results borderlines religion
10:19 AM twnqx: if it stops others from falling into the same pit, then it's not
10:19 AM vmt: no need to throw a hissy fit my dude
10:20 AM twnqx: (say i while moving pcb traces .2mm around to achieve better looking results)
10:21 AM vmt: perhaps, you are better suited as an artist?
10:22 AM vmt: (say i, while working on some x64 code that pisses away cycles like no tomorrow due to horrible locality, much to the dismay of rue)
10:23 AM nohit: rues been doing this for 20+? years and he cannot handle few registers. its not convition to optimal/perfect results
10:24 AM vmt: i'm pretty sure he can handle setting and reading registers just fine
10:24 AM nohit: well why didnt he write the driver then
10:26 AM nohit: there were scary, strange registers and he took a look and then walked away
10:27 AM twnqx: reminds me i wanted to open a support ticket with microchip because a scary register that behaves nowhere as documented keeps bricking our boards
10:27 AM vmt: just that his attention span isn't exactly suited for projects which take, say, > 1 week. that combined with the extreme NIH, is a bit of a bad mix
10:27 AM twnqx: sadly, that register is an OTP fuse.
10:28 AM vmt: i for one, am extremely annoyed they are called "fuses"
10:29 AM twnqx: well, the similarity is that blow them up, and then they will stay that way :P
10:29 AM vmt: that said, it is a great grievance to me how every fucking software clown and their dogs adopt household items as labels for their newest inventions
10:29 AM twnqx: heh
10:30 AM vmt: and a lot of times said new thing has actually already been discovered and may be referred to as something else... most likely some other common item or cross-disciplinary term
10:31 AM vmt: twnqx: well, no, not really
10:32 AM vmt: though if by blowing you mean writing, ehh... that's shaky
10:32 AM twnqx: i am pretty sure that originally, you really burnt out physical wires
10:33 AM twnqx: i don't know what's used these days, but it can't be flash, or it might be reset with accelerating aging
10:33 AM vmt: hmm, perhaps so. however times change. i'm pretty sure at the time loonix was written there were no more core memory being used
10:34 AM vmt: yet it's still a "core dump"
10:34 AM vmt: it's like we're living on the fucking uss enterprise
10:34 AM vmt: EMERGENCY: DETACH SAUCER SECTION EJECT CORE
10:34 AM twnqx: hm, i never associated the core dump with core memory, but the program's core (as supposed to the surrounding libs, etc)
10:34 AM twnqx: interesting
10:35 AM vmt: seeing as how the reasonable term would be a mem dump
10:35 AM vmt: i'm almost certain that's what it refers to
10:35 AM twnqx: wikipedia says it does
10:35 AM twnqx: The name comes from magnetic core memory,[5] the principal form of random access memory from the 1950s to the 1970s. The name has remained long after magnetic core technology became obsolete.
10:36 AM twnqx: *sigh* i always wanted to see if i could get the 64kB core memory array i have to work
10:36 AM twnqx: oh well
10:36 AM twnqx: at least it's decorative.
10:37 AM vmt: use it as a radiator
10:38 AM twnqx: at least it was fun in customs, given the german prefix Kern- (Core) usually is attributed with radioactive stuff everyone looked panicced :P
10:38 AM vmt: hahah
10:39 AM vmt: waait. 64 kB? how big is that thing?
10:41 AM twnqx: the active array area is 28x30cm
10:43 AM vmt: hmm. alright
10:47 AM vmt: also, on the notion of nomenclature, as loonix adopted the be-nice(tm) policies, i think we should take into account the feelings, skin color, and sexuality of the memory. "core" just doesn't cut it. it should be "proud-black-vaporsexual-core dumped"
12:38 PM Rab: It's wise to study the cites for a Wikipedia definition before adopting it as authoritative. I see cites for definitions of "core" and "storage dump". But the statement "The name [core dump] comes from magnetic core memory", while plausible, is completely unsupported and could be a fiction.
12:43 PM Rab: They could have cited the Jargon File: http://catb.org/jargon/html/C/core-dump.html
12:43 PM Rab: If you trust ESR, a lord among blowhards.
01:46 PM TechChristoph: here we go again
02:25 PM vmt: Rab: it's equally wise to, if available, check the fact (cite, in this case), before speculating
02:29 PM vmt: Rab: and if we want to entertain a meta-heavy discussion here; a) "core" is a highly abstract term which has absolutely no meaning in modern computers, b) seeing how it actually does a print of memory contents, the logical conclusion would be that it refers to, in fact, magnetic core memory and finally c) in case b is not true, i refer to my earlier statement on how people in software have a tendency to name
02:29 PM vmt: things both arbitrarily and fucking retardedly (if that's a word)
02:35 PM i-make-robots: hello! I'm compiling in arduino for ESP8266 (nodemcu 1.0) and the compiler doesn't seem to recognzie #if __has_include(). Is there an alternate syntax?
02:52 PM vmt: i-make-robots: what's the compiler... and what are you exactly trying to achieve with this?
03:24 PM i-make-robots: great questions....
03:24 PM i-make-robots: __has_include checks if the file in the () exists.
03:25 PM i-make-robots: xtensa-lx106-elf-gcc\2.5.0-4-b40a506 ?
03:34 PM vmt: yes i know what it does but what is it that you're trying to achieve with it
04:17 PM i-make-robots: I have a sketch (https://github.com/marginallyclever/makelangelo-firmware) that compiles for several board types. the #if__has_include checks for a local_config.h. if the file exists, it includes it. if not, it doesn't. there's no one-step "include this file if you can" command that I know of.
04:44 PM vmt: i-make-robots: the sanest option there would be for your build (tool/script/whatever) to pass a definition to the compiler
04:47 PM vmt: oh wait. your build tool essentially is arduino
07:10 PM rue_mohr: i-make-robots, hey!
08:39 PM i-make-robots: hey
08:39 PM i-make-robots: rue_mohr hi
08:39 PM nohit: Hi
08:40 PM nohit: Did you get it working?
08:40 PM i-make-robots: vmt and whoever builds my sketches is following my instructions, so I assume they're noobs that need small words and big pictures with arrows. custom setups are not a thing
08:40 PM i-make-robots: nohit - you calking to me? the situation hasn't changed.
08:40 PM nohit: Yes
09:01 PM nohit: i havent personally encountered #if__has_include before so i dont know if its a thing in gcc
09:34 PM nohit: i-make-robots: is this makelangelo your project ?
11:34 PM day_ is now known as day