#avr Logs

Oct 06 2017

#avr Calendar

12:12 AM day__ is now known as daey
05:49 AM Emil: and he left
06:54 AM aarcane: I'm trying to read a "register" code from a master and then write some data back. However, it's not working out so well here... I generally get back what could easily be "line noise" (Sometimes 0x11, sometimes 0xFF, or others, but never what I expect) The CPU is an Atmega 640, and the codes for TWSR are all copied from the data sheet painstakingly. I got no idea what's wrong here... https://pastebin.ca/3883463
06:56 AM Lambda_Aurigae: can you send data over the TWI?
06:56 AM Lambda_Aurigae: simplify the whole thing and make it just send back some known data first.
07:01 AM aarcane: TWDR = 0x5A; TWSR |= _BV(TWEA)|_BV(TWINT); and it's still giving me either 11 or FF, depending on whether I write anything to the data bus for the 'register' first.
07:02 AM Lambda_Aurigae: is a bit early for me to dig out my datasheets and go through your code...just finishing breakfast here. I'm sure someone can spot the problem once they wake up and have their coffee..
08:36 AM carabia: specing: emacs mentioned
08:36 AM carabia: rejoice
08:39 AM polprog: under emacs specifically? i dont know any emacs plugin for mcus
08:39 AM polprog: and i'd be afraid to install one
08:39 AM polprog: i just write C in vim or emacs
08:40 AM polprog: ;)
08:41 AM carabia: It'd be difficult to write java huh
08:41 AM polprog: as in writing java for avr or writing java in emacs?
08:42 AM carabia: public static void WritePinStateFromAsdf(Map<String, Boolean> state) { }
08:42 AM carabia: that's not long enough of a method name for java, my bad
08:42 AM polprog: nononono
08:42 AM carabia: also that should be port state, fak
08:43 AM carabia: public abstract class Port implements Runnable, Callback extends BaseAVR throws Exception { }
08:43 AM polprog: AbstractPortFactory.byName("PORTD").getPin(1).writeLogic(PinLogic.HIGH);
08:43 AM carabia: oh forgot factory, yeah
08:43 AM polprog: i even wrote a small 2d game in java..
08:43 AM polprog: back then
08:43 AM carabia: who gives a crap what you write for x86
08:44 AM carabia: software is bullshit for x86 anyway
08:44 AM polprog: technically it was for JVM
08:44 AM polprog: ;)
08:44 AM carabia: well technically you will run it on x86, i'm sure
08:44 AM polprog: yeah
08:45 AM carabia: though, you can run it on any other platform with jvm but i don't think that was the case here
08:45 AM polprog: if you had opengl bindings for ultrasparc...
08:45 AM carabia: if you had opengl bindings for avr
08:46 AM polprog: nitrogen cooled microcontrollers
08:46 AM carabia: no
08:46 AM carabia: just wire up a few thousand of them in parallel running the shaders
08:47 AM polprog: was thinking about wiring 4 or 8 on a high speed bus for paralell fractal rendering
08:47 AM carabia: and then implement webgl
08:47 AM carabia: for maximum javascript action
08:47 AM polprog: you could run Windows 93 if you ran some web renderer
09:20 AM dsalychev: Hi, guys. I'd like to ask you about .data section in AVR ELF. Is it used at all? And if so, in what cases? It shouldn't be populated by a compiler at all because we have a volatile RAM there, in AVR, as far as I understood. Am I missing any specific situations?
09:20 AM LeoNerd: It's used by the linker
09:20 AM LeoNerd: It gets appended somewhere into the resultant .hex for output, and a section early in the program startup copies it out of flash into RAM
09:22 AM dsalychev: I'm just reading this http://www.eit.lth.se/fileadmin/eit/courses/edi021/Avr-libc-2.0.0/mem_sections.html Is it a code in .init4 subsection which is copying data between flash and RAM?
09:26 AM dsalychev: ah, yes, I've just compiled a code with `static char str_buf[] = { "This is a test string!" };` and see that .data section is not empty. Leo, thanks for a quick reply :)
09:37 AM Lambda_Aurigae: I believe only certain variable types are included in there when created, not all variables...but I could be mistaken.
09:37 AM polprog: this is what i read while faiting for the pcbs to be fabbed at work: http://www.nongnu.org/avr-libc/user-manual/mem_sections.html
09:43 AM dsalychev: yeah... but this documentation at nongnu.org is outdated a bit and doesn't contain info about .note.gnu.avr.deviceinfo, for instance. it's just FYI
09:45 AM Emil: cehteh: https://emil.fi/jako/kuvat/2017-10-06_17-14-02_4i3LH6Pv.png
09:45 AM Emil: is this how those led bulbs work
09:45 AM Emil: (or similar)
09:45 AM Emil: dat capacitive power supply is magikc
09:47 AM cehteh: hehe .. i know
09:47 AM cehteh: thats rather old skool :D
09:51 AM cehteh: its amazing how dagerous these things can be :D
09:59 AM polprog: dsalychev: wheres the new one then o_o atmel's site?
10:46 AM bss36504: Emil: That's not how modern LED bulbs work
10:46 AM bss36504: Almost all of them are SMPS, otherwise you get flicker
10:49 AM Emil: not if you double down on capacitance
10:49 AM Emil: but hmm, perhaps you can make the smps cheap enough
10:52 AM bss36504: No, it will flicker. It's not perceptable by everyone, but LEDs dont have the "inertia" that incandescent and CFLs have. Source: my friend designs SMPSs for Lutron
10:52 AM bss36504: And they do make them cheap enough. think about all the 1A 5V USB chargers you can buy at a gas station for a dollar. A $15 light bulb is certainly possible with SMPS
11:27 AM aarcane: Ugh.. I fell asleep waiting. Did anyone notice my ISR above? Any ideas what's wrong and why I'm reading garbage from my AVR over i2c?
11:28 AM LeoNerd: I²C slave on AVR? Real I²C module or USI?
11:30 AM aarcane: LeoNerd, it has a TWI module on the chip, and I'm using the TWSR and TWCR and TWDR to interface with the bus
11:33 AM LeoNerd: Righty
11:41 AM Emil: bss36504: how about a 0,99e light bulb
11:41 AM Emil: led light bulb
11:41 AM Emil: I just bought 5 from ikea
11:41 AM aarcane: LeoNerd, Any idea what I'm doing wrong in this ISR? https://pastebin.ca/3883463
11:45 AM LeoNerd: I've never implemented an I²C slave on AVR before, so I have no idea
11:45 AM LeoNerd: I was purely trying to clarify the question
11:48 AM LeoNerd: In fact only ever once did an SPI slave even
11:48 AM LeoNerd: And that's on a USI
11:51 AM aarcane: What is a USI?
11:57 AM antto: universal serial interface i think
12:00 PM Emil: bss36504:
12:00 PM LeoNerd: The software-assisted "maybe it's SPI, maybe it's I²C" module you get on some of the ATtiny chips
12:02 PM antto: isn't it sorta similar to microshit's "MSSP" module?
12:03 PM LeoNerd: Dunno, maybe? I'm not familiar with it
12:06 PM Emil: also bss36504 it will literally not flicker
12:06 PM Emil: if you double down on capacitance
12:06 PM Emil: like I said
12:06 PM antto: LeoNerd you're lucky
12:08 PM Emil: https://emil.fi/jako/videot/2017-10-06_19-36-37_CbmmXQnI.mp4
12:08 PM Emil: proof.jpg
12:08 PM Emil: I should rename that
12:47 PM MrFahrenheit: searching google for something, came across this... https://cdn2.tmbi.com/TFH/Step-By-Step/display/FH05MAY_ELETES_12.JPG
12:49 PM HighInBC: those work, but the problem is if something goes wrong in them and they don't light up it gives the false impression of safety
12:49 PM MrFahrenheit: I was thinking more about how she's using them with wires all over
12:49 PM HighInBC: so it is always good to test them before and after use with a known power source
12:49 PM MrFahrenheit: there's an even better image on the site https://www.familyhandyman.com/wp-content/uploads/2017/06/FH05MAY_ELETES_07-3.jpg
01:01 PM Lambda_Aurigae: different testers in those two pictures.
01:01 PM Lambda_Aurigae: the first one is a little neon bulb
01:02 PM Lambda_Aurigae: the second is a non contact sensor that can pick up the presence of AC current..
01:04 PM Lambda_Aurigae: I like to use my fox-n-hound tweedler receiver to see if there is current present on the line.
01:04 PM Lambda_Aurigae: I can hear the hum of the AC current.
01:04 PM Lambda_Aurigae: although, in the past I've used a well calibrated finger to flick at a wire and see if there is current present also.
01:05 PM Lambda_Aurigae: and have changed a 600A main breaker hot as well.
01:05 PM Lambda_Aurigae: and been knocked silly by a color tv picture tube.
01:06 PM Tom_L: haven't used your fingers for fuses yet?
01:06 PM Lambda_Aurigae: no.
01:07 PM Lambda_Aurigae: but have used a set of uninsulated linemans pliers to trip breakers before.
01:07 PM MrFahrenheit: 120V, I'm guessing?
01:07 PM Lambda_Aurigae: the 600A main was 240V
01:07 PM Lambda_Aurigae: one of 3 main breakers in a campground.
01:07 PM Lambda_Aurigae: on july 4th weekend...
01:07 PM Lambda_Aurigae: with lots of pissy customers wanting power.
01:07 PM Lambda_Aurigae: the old one had become a smoke emitting device.
01:08 PM Lambda_Aurigae: power company was going to be 3 to 4 hours before they could come pull the fuse at the transformer.
01:08 PM Lambda_Aurigae: so I just changed it hot.
01:08 PM doev_ is now known as doev
01:08 PM Lambda_Aurigae: I've gotten across both 120V and 240V before though.
01:09 PM MrFahrenheit: someone here might know, what I was originally looking for when I found that picture was a device similar to what bigclive uses, but smaller and cheaper
01:09 PM MrFahrenheit: this thing http://www.cliffuk.co.uk/products/tools/CL1850large.jpg
01:09 PM Lambda_Aurigae: looks like a quick disconnect, some switches, a fuse, and a light bulb.
01:10 PM MrFahrenheit: yes
01:10 PM MrFahrenheit: it's like $50
01:11 PM JanC_ is now known as JanC
01:11 PM MrFahrenheit: the only similar thing I've found is speaker connectors, but you know, they're speaker connectors
01:12 PM polprog: it's called a mains quicktest (that's how the producer calls it)
01:12 PM polprog: i should get one i think
01:12 PM MrFahrenheit: https://www.youtube.com/watch?v=_DTmL73th7Y
01:21 PM carabia: Lambda_Aurigae: very accurate analyzation of said box
01:22 PM polprog: that light bulb is a neon iirc
01:22 PM polprog: they give very nice light
01:29 PM carabia: so polprog how's the ad chip doing?
01:29 PM polprog: slowly
01:29 PM enh: carabia!
01:29 PM polprog: enh!
01:29 PM carabia: also i'm not buying your being busy -excuse anymore, seeing how you hang around in irc
01:29 PM enh: polprog!
01:29 PM carabia: would have done that 10 times over by now
01:30 PM carabia: hi enh! how's Brazil?
01:30 PM polprog: carabia: i have a persistent session
01:30 PM polprog: and i often irc on the go
01:30 PM enh: same old sh*t
01:30 PM carabia: polprog: i figured as much
01:30 PM Tom_L: just a fresh pile of it?
01:30 PM enh: fresh and getting bigger
01:32 PM enh: The microscope I bought at aliexpress got caught by customs. I'm so happy :/
01:33 PM enh: I can't solder using magnifying glasses any more
01:33 PM polprog: why
01:34 PM enh: getting old
01:34 PM enh: :)
01:34 PM enh: smds are way too small for my eyes
01:34 PM polprog: so bad that even the magnifier doesnt help? that's bad
01:34 PM Emil: bss36504: bro
01:34 PM Emil: bss36504: come at me bro
01:35 PM enh: yep
01:35 PM Tom_L: why do customs care about it?
01:35 PM enh: they probably like to annoy people
01:35 PM enh: launching many rockets, carabia?
01:35 PM Tom_L: what power did you order?
01:36 PM polprog: carabia: i dont do it every day cos i have school
01:37 PM enh: Tom_L: https://pt.aliexpress.com/item/Free-Shipping-3-5X180X-Table-Pillar-Stand-Zoom-Magnification-Trinocular-Stereo-Microscope-SZM2-0X-SZM0-5X/32632656865.html
01:37 PM polprog: cool kit
01:37 PM enh: The special thing about brazilian customs is the tax: 60%
01:37 PM polprog: pfff
01:37 PM Tom_L: mine is 7 x 45 zoom iirc
01:38 PM Tom_L: perfect for smt
01:38 PM enh: The price difference was not so big between a lower magnification and this
01:38 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/scope/scope1.jpg
01:38 PM Tom_L: i like the swivel base better too
01:38 PM polprog: im thinking about getting one too. i could integrate it with the CCTV camera i have, so i dont have to bend over at the table
01:38 PM enh: That base is really nice
01:39 PM polprog: or get something like Tom_L has
01:39 PM enh: but bringing that to brazil would cost the price of the scope due to thw weight
01:39 PM polprog: Tom_L: is that a model M on the right?
01:39 PM Tom_L: huh?
01:39 PM Tom_L: kbd?
01:39 PM Tom_L: no
01:39 PM Tom_L: northgate
01:39 PM Tom_L: omnikey
01:40 PM polprog: the white one under the small monitor
01:40 PM Tom_L: same quality cherry switches though
01:40 PM polprog: nice
01:40 PM Tom_L: i've wore out i don't know how many others and it still works
01:40 PM carabia: enh: are you going to have to pay VAT / other duty expenses now?
01:40 PM carabia: oh, i missed the line over there
01:40 PM Tom_L: replaced a couple keycaps once
01:40 PM Tom_L: cause they wore out
01:40 PM carabia: bweh, sucks.
01:41 PM enh: a lot
01:41 PM enh: that is life under the equator
01:41 PM carabia: enh: no rockets, have been busy with work and stuff. also, winter's up any moment so, meeeh
01:41 PM enh: or below it. Dunno
01:41 PM Tom_L: you get all that nice weather though :)
01:42 PM enh: wanna exchange?
01:42 PM carabia: Tom_L: say what, that close to equator you'll evaporize
01:42 PM Tom_L: nope
01:42 PM enh: I'd gladly do
01:43 PM enh: One question to the fathers out there: can one survive a 1.2 year old kid?
01:43 PM Tom_L: some ppl i know are in Recife
01:43 PM carabia: would be nice to go into pyro rocketry and build a guidance system with fins, but maybe one day. Bench engineering.
01:43 PM enh: Recife is two hours from here, Tom_L
01:43 PM Tom_L: enh it's all in how you raise them
01:44 PM enh: her battery holds a lot of charge
01:44 PM enh: amazing
01:45 PM enh: I live just a bit above recife. In the extreme east of brazil. Joao pessoa
01:46 PM enh: carabia: Lets go hydrogen
01:49 PM enh: We are soon going to have military intervention in this country. Only a miracle will avoid that.
01:52 PM carabia: enh: i'm not familiar with the situation, apparently there was quite a clusterfuck in the aftermath of the previous president
01:53 PM carabia: and also i'm not familiar how much power does the president wield over there
01:53 PM enh: This code https://pastebin.com/tmjW9vB4 refers to this paper https://www.sparkfun.com/tutorial/news/DCMDraft2.pdf . If anybody is interested in aircraft attitude calculation and have some time to help, can you please have a look and try to find a mistake?
01:54 PM enh: Current president has a 3% acceptance rate
01:54 PM carabia: hahah
01:55 PM carabia: enh: without actually taking a look, are you interested in checking the imu data passed or the linear algebra side of things?
01:55 PM enh: federal police and very few judges are working to remove corrupts from government, but to my view the machine is rotten.
01:55 PM enh: there must be an error in the linear algebra, carabia
01:55 PM enh: The integration is giving wrong results.
01:55 PM carabia: alright, i can take a look
01:56 PM enh: If I use only accelerometer and magnetometer I get good euler angles. If I use the gyro, the angles come out completely wrong
01:58 PM enh: Thanks a lot, if you can. I wrote the code using floats, instead of integers to avoid a higher order of problems. When it works, I'll convert to integer math.
02:00 PM bss36504: Emil: Like I said, not everyone will notice.
02:00 PM bss36504: s/will/can
02:01 PM carabia: enh: i would almost certainly suggest you to write a vector and matrix -funcs (or classes) to clean it up
02:01 PM carabia: but, as said, i'll take a look
02:01 PM carabia: gonna do it a bit later though, i'll be heading home soonish
02:01 PM enh: i thought about that, but each operation is used only once
02:02 PM carabia: well i guess you could inline them then
02:02 PM enh: I'll do it
02:16 PM Emil: bss36504: did you even look at the simulator bro?
02:24 PM Emil: bss36504: come at me bro
02:25 PM polprog: im having a dejavu
02:25 PM enh: what do you see, polprog
02:25 PM enh: ?
02:26 PM polprog: < Emil> bss36504: come at me bro
02:27 PM polprog: ;)
02:32 PM JanC is now known as Guest38427
02:32 PM JanC_ is now known as JanC
02:41 PM enh: Would it be possible to raise a rocket with balloons, and launch it only when the highest altitude is reached by the balloons?
02:41 PM Lambda_Aurigae: yes
02:41 PM Lambda_Aurigae: it's been done.
02:41 PM Lambda_Aurigae: high altitude sounding rockets as I recall.
02:42 PM enh: can it be put in orbit like this?
02:42 PM Lambda_Aurigae: with big enough balloons, yeah.
02:42 PM Lambda_Aurigae: accuracy of where you launch from is bear whiz though.
02:42 PM enh: i believe 4000mph are needed to reach orbit
02:42 PM Lambda_Aurigae: so your actual final orbit is not exactly guaranteed to be where you want it.
02:43 PM Emil: The issue is
02:43 PM Emil: mostly
02:43 PM Emil: that it's not _that_ efficient to raise the thing by balloons
02:43 PM Lambda_Aurigae: raising a rocket to 10KM altitude would eliminate some of your air drag and such.
02:43 PM Emil: Getting up is not hard
02:43 PM Emil: It's gaining the horizontal speed that's a pain
02:43 PM Lambda_Aurigae: to get a rocket the size of the shuttle up to 10KM would require balloons the size of rhode island.
02:43 PM Emil: s/not hard/"not hard"
02:44 PM Lambda_Aurigae: well, not quite rhode island...maybe new york city.
02:44 PM Lambda_Aurigae: they would be flippin huge at any rate.
02:44 PM Lambda_Aurigae: and do you use hydrogen or helium?
02:44 PM Lambda_Aurigae: that much hydrogen and you are in the serious dangerous areas.
02:45 PM Lambda_Aurigae: that much helium and you are in the no-more-mri-for-a-month area.
02:45 PM enh: i was thinking more of a small rocket. small enough to reach orbital speed with a few hundred grams payload
02:47 PM Emil: that's still huge
02:47 PM Emil: Like I said
02:47 PM Emil: It's not the climbing up that's the issues
02:47 PM Emil: it's the gaining enough horizontal velocity to beat gravity
02:48 PM Emil: that's the issue
02:48 PM Emil: For earth, orbital speed is 30km/s
02:48 PM Lambda_Aurigae: the altitude you gain with the balloon really doesn't make all that much difference in how much rocket you need to get to orbit.
02:48 PM Emil: Thirty kilometers per second
02:48 PM Emil: yeah
02:48 PM Emil: exactly
02:49 PM Lambda_Aurigae: I've done the tests with KSP..hehe
02:49 PM Lambda_Aurigae: there is a balloon mod
02:49 PM Lambda_Aurigae: and you can do just exactly that...lift a rocket to 20km and try to launch.
02:50 PM Emil: If you just need a dip in space with a ballistic/parabolic trajectory, that _does_ benefit quite a lot from balloons
02:50 PM Lambda_Aurigae: what it does give you is the ability to lower your heat shielding but generally on launch you don't need a lot of that.
02:51 PM enh: Would be something, already
02:51 PM Lambda_Aurigae: unless your orbital insertion is long and low.
02:51 PM Lambda_Aurigae: you would be better off launching from a plane...ala whiteknight and spaceship one.
02:51 PM Lambda_Aurigae: with a plane you have some momentum to start with.
02:52 PM enh: interesting too
02:52 PM carabia: Lambda_Aurigae: while that's true it's besides the point
02:53 PM carabia: launching from 10 km is still better than launching from 0, the momentum doesn't matter as you wouldn't be launching it with a fucking slingshot from sea level either
02:53 PM carabia: launching from sea-level* rather
02:53 PM carabia: though, if you've got the $$$ to launch it from a moving plane well then good riddance
02:54 PM Lambda_Aurigae: yes...every meter higher you start saves on fuel for launch.
02:54 PM Lambda_Aurigae: and ever meter per second speed you have at launch saves on fuel.
02:54 PM carabia: but as i recall, enh had a project a long time ago which was basically to take pictures from borderline "space"
02:54 PM enh: Some people were willing to pay for it
02:55 PM enh: TIM, as I recall. But they stepped back.
02:55 PM carabia: and something like a weather balloon + rocket would be economically doable and systemically simple
02:55 PM enh: you have good memory
02:56 PM carabia: unless you want to start venturing into the realms of maximum bench engineering and wanting to build a slingshot launcher or get the military to strap your rocket onto a jet fighter
02:56 PM Lambda_Aurigae: getting to altitude is much easier than getting to orbit.
02:56 PM carabia: MACH III FIRE
02:57 PM carabia: maybe not 3, heh
02:57 PM Lambda_Aurigae: you can get to 100KM altitude without actually being able to orbit...
02:57 PM carabia: of course
02:57 PM Lambda_Aurigae: hell, you can get to 1000km altitude and not be in orbit...
02:57 PM carabia: if you just drill upwards then sure
02:57 PM Lambda_Aurigae: well, you would be but your periapsis could still be below sea level.
02:57 PM enh: You can hit the moon like that
02:58 PM enh: or miss it.
03:01 PM enh: I guess there is a limit altitude from which you do not return to Earth because the planet will not be there any more
03:01 PM Lambda_Aurigae: yeah.
03:01 PM Lambda_Aurigae: if you hit that altitude then you have hit escape velocity too.
03:01 PM enh: they are the same?
03:02 PM Lambda_Aurigae: related
03:02 PM Lambda_Aurigae: to hit escape altitude you have to hit escape velocity.
03:02 PM enh: this one is smaller than escape velocity
03:02 PM Lambda_Aurigae: orbital velocity is different.
03:02 PM enh: yep
03:03 PM enh: What i mean is that earth is moving. escape velocity is classically calculated with a fixed earth
03:03 PM Lambda_Aurigae: orbit means you are going forward fast enough to miss the planet as you fall toward it.
03:05 PM enh: if you launch perpendicular to earth orbit around the sun, earth will me moving to the side while the rocket will be going upwards
03:05 PM Lambda_Aurigae: but you will be moving along with the earth too...you will have that momentum.
03:05 PM Lambda_Aurigae: you don't lose that forward momentum just because you are disconnected from the planet or atmosphere.
03:06 PM Lambda_Aurigae: ok...time to go do something useful..have fun.
03:06 PM enh: you too
03:06 PM polprog: yall should play kerbals if you already dont ;)
03:07 PM carabia: boring
03:07 PM enh: just a point... earth momentum is corrected by gravity, in a circular orbit. rockect momentum will follow a tangent
03:09 PM carabia: yeah if you shoot "forward" or "backward"?
03:09 PM enh: i thought about perpendicular
03:09 PM carabia: ah momentum
03:09 PM carabia: yeah, sure
03:11 PM carabia: but, the vector of the gravitational pull of earth will rotate too, as earth moves along its orbit
03:11 PM enh: yep
03:12 PM enh: i wonder if a long elliptical orbit could be reached by using a high altitude vertical launch and this momentum difference
03:13 PM carabia: i don't know. at least it would be easier to do so by adding a slight "horizontal" component to it
03:14 PM carabia: i'm not all that familiar with terminology in 3D
03:14 PM carabia: but that sounded plausible :)
03:15 PM carabia: time to go home!
03:15 PM carabia: and most likely getting mugged as I live on the shadier parts of the town!
03:15 PM carabia: in the shadier parts, I guess
03:17 PM enh: Have a nice evening, carabia
03:19 PM carabia: won't be that nice!
03:20 PM carabia: I think i'll work on a silly project on a cm7 and I'm not even having any booze. I'll take a look at your math later.
03:22 PM enh: Thanks a lot
03:37 PM polprog: good job android, dropping my ssh by jumping around two APs
05:35 PM carabia: Lambda_Aurigae: i have a question
05:35 PM carabia: could I hear your take on women?
05:35 PM carabia: pros and cons
05:51 PM Lambda_Aurigae: pros are not worth the money.
05:51 PM Lambda_Aurigae: cons,,,well,,,so long as they aren't in prison, go for it.
05:52 PM Lambda_Aurigae: people are people, male, female, black, white, green, yellow...I treat everybody equally.
05:52 PM Lambda_Aurigae: I have a wife.
05:52 PM Lambda_Aurigae: not sure what else you want to know.
05:52 PM Lambda_Aurigae: in general, I hate everybody equally unless they provide me some reason not to do so,,or to hate them more than others.
07:09 PM enh: what is this woman talk?
07:11 PM Lambda_Aurigae: woman: a mythical creature dreamed of by nerds.
07:12 PM thardin: feels like the late 90's in here
07:14 PM Lambda_Aurigae: hehe.
07:15 PM thardin: anyone in here happen to know if there's a way to make avr-gcc not generate crap? like pushing registers that never get touched
07:16 PM Jartza: what version?
07:16 PM thardin: going to toss myself into rewriting stuff next week, including getting USART transfers rolling nicely in the background
07:16 PM thardin: uh, whichever is in debian stable. hold a tic
07:17 PM thardin: 5.4.0
07:18 PM thardin: it often misses what I think are obvious optimizations. I like to think gcc is smarter, but maybe that's only for x86
07:21 PM thardin: almost feel like taking a peek inside gcc, but then I remember I'm fluent enough in asm to write the critical parts myself
07:22 PM thardin: of course it would be nice not to have to
07:22 PM thardin: I'm rambling
07:22 PM Jartza: what do you mean by registers that never gets touched?
07:23 PM Jartza: if you mean r0 and r1 in ISR, that is known from 2005 :)
07:23 PM Jartza: and it's not handled as bug but improvement idea
07:24 PM Jartza: I think even in 7.2.0 the r0, r1 and sreg always gets pushed in ISR and there was bug report in 2005 of 4.something version
07:24 PM thardin: that sounds familiar
07:24 PM Jartza: gcc 8 finally fixes that for AVR, lol
07:24 PM Jartza: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20296
07:26 PM Jartza: didn't even take long, only 12 years, haha
07:26 PM thardin: nice! gotta upgrade to bleeding edge avr-gcc I suppose (:
07:27 PM Jartza: if you want better opyimized avr code, look for IAR
07:27 PM Jartza: optimized*
07:30 PM Lambda_Aurigae: try the different optimization levels.. -O2, -O3, etc
07:30 PM thardin: I think I'll start with the latest avr-gcc
07:30 PM thardin: I tried -O3 of course
07:31 PM Lambda_Aurigae: some of those optimization levels can generate some serious crap..hehe
07:31 PM Lambda_Aurigae: but, yeah, the newer versions are much better.
07:32 PM thardin: gcc crappiness has caused some grief in ffmpeg-devel. missing obvious optimizations
07:32 PM Lambda_Aurigae: then program in assembly like a real man!
07:32 PM Jartza: umm
07:33 PM thardin: yes that tends to be the path taken
07:33 PM Jartza: -O3 usually isn't that good in embedded
07:33 PM Jartza: most often it's -Os
07:33 PM thardin: also why their ./configure gets really upset if you don't have nasm or yasm
07:33 PM Lambda_Aurigae: Jartza, my point exactly...with my usual trying to cause trouble and all doncha know.
07:34 PM thardin: I've seen -Os recommended too. which seems strange to me
07:34 PM Jartza: but anyway, the r0, r1 + sreg push-pull is known
07:35 PM Jartza: why -Os is strange? that's where the effort is in avr-gcc
07:36 PM Lambda_Aurigae: gotta love how people are trying to push the envelope on AVR chips with C.
07:36 PM Lambda_Aurigae: then we have people who blow the envelope away with assembly like Jartza
07:36 PM Jartza: I mostly code avrs with asm nowadays
07:36 PM thardin: ah, that would explain it
07:37 PM thardin: hey, at least it's not cc65 :]
07:37 PM Lambda_Aurigae: last weekend I dug out some old 68000 boards and started playing with them.
07:37 PM thardin: I'm fluent in 6502, but gave coding NES in C a go for fun. absolute garbage output
07:38 PM Lambda_Aurigae: I haven't done any serious 6502 or 68000 programming in years.
07:38 PM Lambda_Aurigae: but have both to play with if I ever feel like it again.
07:39 PM Lambda_Aurigae: lately I've been horking on an 8052 system with 128Kbytes of external nvsram mapped in 32Kbyte blocks via bank switching for program and data.
07:39 PM thardin: luxurious
07:39 PM Lambda_Aurigae: yeah.
07:39 PM Lambda_Aurigae: considering it is an 8bit processor in a 40 pin dip package with an external ram interface.
07:39 PM thardin: 128 bytes ought to be enough for anyone
07:39 PM Lambda_Aurigae: 128KBytes!
07:41 PM Lambda_Aurigae: ds1245y
07:41 PM Lambda_Aurigae: 128K by 8bit (1mbit) parallel nvsram module.
07:41 PM Lambda_Aurigae: I got maxim/dallas to send me half a dozen of them a while back to play with.
07:42 PM thardin: sram is still crazy expensive right? if you want decent amounts of it that is
07:42 PM Lambda_Aurigae: yeah.
07:42 PM Lambda_Aurigae: and crazy power hungry...sometimes.
07:42 PM Lambda_Aurigae: I often use microchip serial sram chips.
07:42 PM Jartza: well. 512 bytes of flash and 6-pin mcu is enough for vga
07:42 PM Jartza: haha
07:43 PM Lambda_Aurigae: 1Mbit serial sram is under a dollar.
07:43 PM thardin: Jartza: sounds like it'd take up all pins. better stick with composite so you have some left over :)
07:43 PM Lambda_Aurigae: thardin, it does take all the pins.
07:43 PM Lambda_Aurigae: but Jartza's toys rock.
07:44 PM Lambda_Aurigae: I have one of his official octapentaveega color modules.
07:44 PM Lambda_Aurigae: and now 4 of them I made myself.
07:44 PM thardin: I'm still a bit amazed lft got color composite out of an avr
07:44 PM Lambda_Aurigae: it's doable.
07:44 PM Lambda_Aurigae: hell, you can make an avr bitbang usb.
07:44 PM thardin: yes
07:45 PM thardin: guess task for tomorrow is try to compile gcc. woo!
07:45 PM Lambda_Aurigae: and I've seen a pic do composite pal and ntsc...so an avr of the same class should handle it easily.
07:52 PM enh: http://www.instructables.com/id/Command-Line-Assembly-Language-Programming-for-Ard/
08:05 PM enh: https://www.codeproject.com/Articles/712610/AVR-Assembler
08:26 PM enh: We could open a repo for this channel on github or bitbucket, with useful documents and code snippets for avr.
08:26 PM rue_shop3: ard?
08:26 PM enh: would be useful for any avr user
08:26 PM enh: contributions from many people
08:27 PM enh: would make the library bigger and more complete
08:27 PM enh: knowledge usually helps
08:31 PM enh: bad idea, it seems.
08:48 PM NoHitWonder: its a good idea
08:49 PM NoHitWonder: like basic drivers for avr's
08:50 PM NoHitWonder: so we could just link that when someone needs help to use uart for example
08:50 PM enh: like that
09:23 PM Jartza: well yes. in that 6-pin avr I have 3 usable pins
09:23 PM Jartza: because vcc, gnd and oscillator take 3
09:23 PM Jartza: and whopping 512 bytes of flash
09:23 PM Jartza: 32 bytes of ram
09:23 PM Jartza: https://youtu.be/WdBNR0JEDcY
09:23 PM Jartza: and it does that
09:23 PM LeoNerd: I expect there'll be as many variations as there will be contributors
09:23 PM LeoNerd: Everyone has their own idea
09:24 PM Jartza: ^ thardin
09:25 PM LeoNerd: Imean, you could have mine for example; but maybe some folks won't like the tasklet-based main IO loop