#avr Logs

Jun 02 2017

#avr Calendar

12:05 AM day_ is now known as daey
01:43 AM JanC is now known as Guest29977
01:43 AM JanC_ is now known as JanC
02:42 AM Emil: rue_house: stop fucking with the ti
02:42 AM Emil: topic
03:46 AM remkooo1 is now known as remkooo
04:30 AM remkooo1 is now known as remkooo
06:06 AM Lambda_Aurigae: rue_house, if we move to #stm32 we will all have to switch to windows and hate open source.
06:17 AM polprog: lol
06:18 AM polprog: is therr a sensible stm32 toolchain for linux
06:32 AM Emil: polprog: "yes"
06:32 AM Emil: polprog: I mean, gcc-arm-none-eabi is just fine
06:32 AM Emil: polprog: the problem is that things like avr/io.h and so on are very, very shit imho
06:32 AM Emil: libopenmc3 "works"
06:33 AM Emil: well
06:33 AM Emil: look at ami's blog
06:34 AM Lambda_Aurigae: I've built stm32 code on linux.
06:34 AM Lambda_Aurigae: the toolchain wasn't that bad to setup.
06:34 AM Lambda_Aurigae: then went back to pic32.
06:36 AM remkooo1 is now known as remkooo
07:12 AM Emil: Fuck it
07:12 AM Emil: I'll just fucking order new pcbs
07:18 AM polprog: Emil: why is it called arm-none-eabi? whot does none and eabi means
07:18 AM Emil: none means it does not depends on linux syscalls
07:19 AM polprog: and eabi?
07:19 AM Emil: you can google ;)
07:19 AM polprog: yes
07:19 AM polprog: ill google then :P
07:19 AM Emil: eabi means embedded-application binary interface
07:20 AM Emil: Dunno why the embedded is there
07:20 AM polprog: ok
07:20 AM polprog: so if i understand correctly
07:20 AM Emil: abi is abi even if it embedded
07:21 AM polprog: the assembly handler for the 595 i wrote could be called an abi?
07:21 AM Emil: well
07:21 AM Emil: it is a property of the compiler, really
07:21 AM Emil: but sorta
07:21 AM Emil: I guess so
07:21 AM polprog: thanks for the explanation
07:21 AM Emil: like
07:22 AM Emil: if I have int asdf(int asdf, char *kkk);
07:22 AM Emil: abi declares in what register is the return value at (int asdf)
07:22 AM Emil: wait
07:22 AM Emil: int a(int b, int *c);
07:22 AM polprog: so abi says where is a()
07:23 AM Emil: abi declares where int a is placed upon return
07:23 AM polprog: the returned val
07:23 AM polprog: kk
07:23 AM polprog: thanks
07:23 AM polprog: :)
07:23 AM Emil: and where int b and int *c should be placed before calling the function
07:23 AM Emil: registerwise
07:23 AM Emil: https://gcc.gnu.org/wiki/avr-gcc
07:25 AM Emil: polprog: with linux, the api is super stable but abi can actually change
07:26 AM Emil: but even that is also really stable
07:27 AM polprog: nice link
07:27 AM Emil: Hey
07:27 AM Emil: I had forgotten that there's a native int24 on avrs :D
07:27 AM Emil: "native"
07:28 AM polprog: so i can do int24_t in c?
07:29 AM polprog: or do i have to write a handler in asm?
07:30 AM Emil: I shyeah
07:30 AM Emil: no you can do int24_t directly imho
07:30 AM polprog: cool
07:30 AM Emil: or at least there's support for it
07:31 AM Emil: you might need to typedef yourself
07:31 AM Emil: since they are named __int24 and __uint24
07:31 AM Emil: if I'm not completely retarded
07:32 AM polprog: i guess the undersocre are special
07:33 AM polprog: right?
07:33 AM polprog: underscores
07:36 AM Emil: yeah
07:37 AM polprog: uint_fast32_t
07:37 AM polprog: stumbled upon while searching fot double _ types
07:41 AM cehteh: double __ prefix is reserved for implmementation details by the C standard
07:45 AM kre10s: uint8_t a; uint8_t b; return abs((uint16_t)a-b)>128; Is there a way to exploit modular arithmatic to eliminate the need for 16 bit types and abs call?
07:46 AM polprog: i dont see why are you converting the result of substraction of 2 8bit types to 16 bits
07:47 AM cehteh: because of the underflow
07:48 AM cehteh: but what do you *really* want to check .. looks a bit strange
07:48 AM polprog: hmm
07:49 AM cehteh: split that into more simpler expressions might be better, but you have to try
07:49 AM polprog: i think you could rewrite the abs method to take two arguments, compare and return the bigger-smaller
07:49 AM polprog: i think it could help
07:51 AM cehteh: a>b? a-b>128 : b-a>128 ... something along that lines
07:51 AM kre10s: imagine you have a circle and divide it into 256 parts. I want to know if two angles are closer to one another counter clockwise or clockwise.
07:53 AM cehteh: on a very performance senstive part?
07:53 AM polprog: i think cehteh's solution would work for that
07:55 AM kre10s: or. if a and b both represent clock hands I want to adjust the one to be closer to the other going along the short path. maybe somth like int8_t d = a-b; a+=d>>2;
07:55 AM cehteh: you an do that with if's or pure arithmetic
07:56 AM cehteh: dont try to overoptimize, first write read and understandable code which does the right thing
07:57 AM cehteh: dont try'n'code .. think about what arithmetic necessary for that solution
07:57 AM polprog: yeah, coding on paper helps
07:57 AM polprog: this is more fo a geometry assignemnt rather than coding :P
07:58 AM polprog: write out equations that can describe those two "clock hands" and see what you can do
07:58 AM polprog: then think what would be the fastest for the CPU
07:58 AM polprog: and then you can even code that in assembly if you want, :P
07:59 AM polprog: but C would do the trick
07:59 AM cehteh: like for example "turn the clock dial so that one of the hands is under the 12" then the 2nd hand is the direct distance from 12 ...
08:00 AM cehteh: signed
08:00 AM cehteh: bbl
08:00 AM polprog: gtg
08:01 AM polprog: o/
08:54 AM The_CooIest is now known as The_Coolest
11:45 AM Emil: fuck this fuck my life
11:45 AM Emil: Can't fucking find the god damn short on my pcb
11:45 AM Emil: fuck
11:45 AM LeoNerd: Do you have a miliohmeter?
11:45 AM LeoNerd: I find them really useful for track shorts
11:46 AM Emil: I should get one
11:46 AM Emil: or a flir heat camera
11:46 AM LeoNerd: OK, failing that, set you PSU to a constant current of maybe 100mA, and get the most sensitive milivoltmeter you can find
11:46 AM Emil: Tried blasting it with 5A@5V but still the fucker didn't reveal itself
11:46 AM LeoNerd: You should be able to measure resistance gradiant with that
11:46 AM Emil: true
11:47 AM Emil: I'll just order a new patch (fucking 30 euros fuck) where the solder mask clearance is 2mil instead of what it was here
11:48 AM LeoNerd: Ah. yeah. I had a short once due to solder mask fuckup on... partly my, partly software's fault
11:48 AM Emil: 2017-06-02 19:17:54 +0300 < Elepaja> [Emil Fihlman] <photo> https://elepaja.fi/telegram/media/AgADBAADwqkxG7PiiVFAq3gD6tUaUZlKuxkABBiZX7P49dwjfJgBAAEC.jpg
11:48 AM Emil: It even looks quite nice
11:48 AM LeoNerd: Ah I recall you showing mockups of that before
11:49 AM LeoNerd: Nice to see it in the flesh, as it were. In the FR4 anyway ;)
11:56 AM LeoNerd: Hey Emil; what's that tiiiiiny little square chip in about the middle of the board? Appears to have a little .. what might be some sortof RF matching network clustered around it
11:56 AM LeoNerd: That looks fun to solder ;)
12:24 PM twnqx: bss36504: https://imgur.com/r/electronics/i8MEXct
12:26 PM bss36504: twnqx: ahahahaha
12:27 PM bss36504: That is somehow worse than some of my students lol
12:28 PM bss36504: Emil: you'd like that image too ^
12:38 PM DKordic: twnqx: It's a modern art masterpiece!
12:51 PM Emil: LeoNerd: it was a piece of cake actually :)
12:52 PM LeoNerd: You soldered a piece of cake?
12:52 PM Emil: LeoNerd: hehe
12:52 PM LeoNerd: Hmm.. Isuppose buttercream icing might reflow the right way
12:52 PM Emil: LeoNerd: but it is just a max9814
12:52 PM Emil: lol
12:52 PM LeoNerd: Mic preamp?
12:52 PM Emil: and agc, yeah
12:55 PM Emil: bss36504: I probably know what that image is
12:55 PM Emil: lets sww
12:56 PM Emil: bss36504: knew it :D
12:56 PM Emil: twnqx: it is a beauty :3
12:57 PM Emil: I cannot estimate my reaction to it, though
12:57 PM Emil: I'd probably suffer minor brain damage, smile and turn away
12:58 PM kre10s: what is the difference between eeprom_update_ and eeprom_write_ functions?
12:59 PM LeoNerd: update performs read/compare/write-if-different
12:59 PM LeoNerd: To reduce wear on the chip if your value hasn't changed
12:59 PM LeoNerd: But that operation is slower and uses more code
01:01 PM Emil: It is quite a lot slower, too
01:02 PM Emil: but if you are frequently updating eeprom you might be doing something wrong already :D
01:06 PM Emil: LeoNerd: After fixing a chip (Uploading to YT as we speak) I gained enough confidense to do all my designs QFN at least, I'll try bga soon
01:11 PM Emil: the problem with bga though is that you need moar layers :D
01:14 PM kre10s: and that it's harder(impossible) to access the pins when you screw up.
01:17 PM Emil: well
01:18 PM Emil: you can always reflow
01:18 PM Emil: reworking pcbs is for fools ;)
01:23 PM LeoNerd: Emil: QFN is fine yeah. I have a board I put the QFN32 size of ATmega328P
01:23 PM LeoNerd: QFN can do 2layer, but yeah BGAs do sorta require 4+
01:24 PM LeoNerd: I might do my first 4layer soon. Not for BGA. just because I want most of the surface for LEDs and IO pads and I need other routing
01:24 PM Emil: Yeah I have one or two in my storage
01:24 PM Emil: I mean
01:25 PM Emil: 4 layer can actually be cheaper than 2 layer
01:25 PM Emil: at least time wise
01:25 PM Emil: Since you can just fucking cram the chips there
02:13 PM bss36504: Emil: I lol'd at "minor brain damage"
02:14 PM bss36504: boss told us to go home for the weekend. Later folks!
02:14 PM Emil: nice
02:17 PM learath: Nice!
02:20 PM Lambda_Aurigae: I got let go at 9am...
02:20 PM Lambda_Aurigae: after 2 hours work.
02:20 PM Lambda_Aurigae: so I went grocery shopping...at 10 I'm in the store and the boss calls me...needs me to go do another call.
02:21 PM Lambda_Aurigae: so he clocks me back in and I go do another call that takes me to 11....and he left me clocked in from 7 till 11..paid me for an hour shopping.
02:24 PM learath: so, here "let go" means "fired"?
02:25 PM Lambda_Aurigae: hehe.
02:25 PM Lambda_Aurigae: usually does here too.
02:25 PM Lambda_Aurigae: however...not in this case.
02:25 PM Lambda_Aurigae: let go for the day
02:25 PM learath: ok
02:25 PM Lambda_Aurigae: was nice of him to pay me that extra hour today though.
02:25 PM learath: yeah
02:26 PM Lambda_Aurigae: beginning to think that camping in a tent was much easier than with the fucking camper though.
02:26 PM Lambda_Aurigae: every time I take it out something is screwed up.
02:26 PM Lambda_Aurigae: today the tow vehicle battery is dead.
02:26 PM Lambda_Aurigae: and the wife and her friends and family took all the camp chairs and tables and stuff out and didn't put them back last weekend.
02:27 PM Emil: Lambda_Aurigae: that started way too scary :D
02:29 PM Lambda_Aurigae: hehe
02:29 PM Lambda_Aurigae: they can't afford to fire me.
02:29 PM Lambda_Aurigae: I know way too much...have way too much knowledge that nobody else in the company has.
02:29 PM Lambda_Aurigae: and nobody else is capable and/or willing to learn.
02:30 PM Lambda_Aurigae: I try to teach some of this stuff to other techs and their eyes glaze over.
02:30 PM Lambda_Aurigae: and it's all stuff I've figured out on my own.
02:30 PM Lambda_Aurigae: read between the lines then try things until I make it work kinda stuff.
03:01 PM Emil: Hehe
03:01 PM Emil: Well
03:01 PM Emil: if you are comfortable in your position that's not too bad
03:33 PM Lambda_Aurigae: I hate my job with a passion
03:33 PM Lambda_Aurigae: but I'm damned good at it.
03:34 PM Emil: lol
03:35 PM Lambda_Aurigae: thing is, I'm good at whatever I set my mind to.
03:35 PM Lambda_Aurigae: I started this job almost 9 years ago.
03:35 PM Lambda_Aurigae: I was low man in the company.
03:35 PM Lambda_Aurigae: now I've advanced past 32 other techs and analysts to be the company Lead Analyst.
03:36 PM Emil: nice
03:36 PM Lambda_Aurigae: I'm good enough at what I do that I'm also the company specialist for all of the office color copier lines...including machines I've never seen....and I've never been to school on any of them.
03:37 PM Lambda_Aurigae: in fact, having not been to school, I can't take any of the online continuing ed on those models.
03:37 PM Lambda_Aurigae: but I still know more about them than the company trainer who does the classes that I should have taken years ago.
03:38 PM Lambda_Aurigae: and, I don't even work on them anymore!
03:38 PM Lambda_Aurigae: well, not much anyhow.
03:39 PM Lambda_Aurigae: I'm the only analyst in the company who is on the BEI program....which tracks how techs do as far as putting parts in and keeping the machines running and how many calls they have to do on each machine and all that junk.
03:39 PM Lambda_Aurigae: it is supposed to be techs only on that program.
03:39 PM Lambda_Aurigae: however, I do like 20 calls a month that are hardware and not software/analyst calls so my boss left me on the program so I can get bonus money.
03:40 PM Lambda_Aurigae: my overall numbers are higher than all but one other tech in the company and he and I trade off as being the highest.
03:40 PM Lambda_Aurigae: and it's a bitch to keep your averages up when you do so few calls...one callback can kill the numbers hard.
03:41 PM Lambda_Aurigae: they tried to stop giving me my bonus money because I do so few hardware calls...until I pointed out that my total number of calls is up there in the top 5 of all the techs, that most of them were just analyst type calls rather than hardware calls.
03:42 PM Lambda_Aurigae: my bonuses average right around 500 dollars a month.
03:42 PM Lambda_Aurigae: half of what some of the techs get with lower overall numbers but they have more machines on their call list giving them "clicks" which amount to money.
03:42 PM Lambda_Aurigae: ok...time to go camping.
03:42 PM * specing bangs chest
03:42 PM Lambda_Aurigae: you all have loads of funzies.
03:43 PM Lambda_Aurigae: no specing, I'm not running Ada on the copiers...ever...
03:45 PM Emil: Lambda_Aurigae: hmm
03:46 PM Emil: on gcc-avr 4.8.1 it doesn't know about m328pb at least at /usr/lib/avr/include
03:47 PM xentrac: congratulations, Lambda_Aurigae!
03:47 PM xentrac: maybe you should go be good at something you don't hate with a passion
03:51 PM Emil: LeoNerd: that is
03:52 PM Emil: #define __AVR_LIBC_DATE_STRING__ "20111229"
03:52 PM Emil: EWWWWWWWWWWW
03:52 PM day_ is now known as daey
03:53 PM Emil: Lets see what normal repos give (this was on a pine64 with armbian)
03:58 PM Emil: LeoNerd: what do you run if your gcc-avr and libc supports m328pb?
03:58 PM Emil: without any include trickery
03:59 PM Emil: with just #include <avr/io.h>
03:59 PM Emil: since -mmcu=atmega38pb does not resolve or at least grep says that no such string exists in the default include dir
07:45 PM day_ is now known as daey
10:05 PM rue_house: hahah there is stm32 stuff on avrfreaks