#avr Logs

Jan 02 2018

#avr Calendar

02:12 AM _ami_: is repeated start mandatory in i2c master to read data from i2c slave device?
02:15 AM _ami_: i2c_start(address, WRITE);
02:15 AM _ami_: i2c_write(reg);
02:15 AM _ami_: i2c_start(address, READ);
02:15 AM _ami_: val = i2c_read() << 8 | i2c_read(); //read two bytes
02:15 AM _ami_: /send NAK
02:15 AM _ami_: i2c_stop();
02:15 AM _ami_: ---
02:21 AM _ami_: hmm.. http://www.i2c-bus.org/repeated-start-condition/
02:21 AM _ami_: i think i get it.
03:09 AM polprog: all my monitors except TV take only VGA
08:44 AM rue_mohr: _ami_, stm32?
08:52 AM _ami_: rue_mohr: yes.
08:53 AM rue_mohr: _ami_, you have master working?
08:53 AM _ami_: yes,
08:53 AM rue_mohr: can I see the code?
08:54 AM _ami_: rue_mohr: using libopencm3?
08:54 AM rue_mohr: as a side note, I like the way fleury did the i2c for avrs
08:54 AM rue_mohr: _ami_, yes
09:11 AM _ami_: rue_mohr: its better to use i2c_write7_v1() and i2c_read7_v1() instead.
09:11 AM _ami_: check i2c_common_v1.c file in libocm3
10:14 AM nohit_: _ami_ have you used the DAC's on stm32 ?
10:15 AM nohit_: im gonna buy a nucleo with 3 DAC's and mess around with them
10:46 AM _ami_: nohit_: not yet. plan to explore DAC soon.
10:47 AM _ami_: i am little weak in analog field. :)
11:07 AM Jartza: evening
11:08 AM Jartza: nuxil: got your LCD menu working already? :)
11:31 AM nuxil: Jartza, no not yet. just written down some ideas. been assembling parts (display, keypad etc) into my DDS box the last days. i want to get it done so i can focuse just on the firmware afer box assembled.
11:44 AM nuxil: still have a psu to make and the the output stage from the r2r network. but parts are still in mail. i will probably start on making a simple linear psu tonight. dont want a noisy buck converter in my DDS :p
11:53 AM nohit_: so you made your own DAC
11:53 AM nuxil: :)
11:56 AM nuxil: jup.. finding matching resistors was a pain :p
12:22 PM polprog: finally done linux serial sending program
12:28 PM Jartza: hmmh
12:28 PM Jartza: darned
12:28 PM Jartza: gmail doesn't allow sending mail from thunderbird anymore, something gone wrong
12:58 PM AndrevS: sending from my gmail address using thunderbird appears to work fine here.
01:01 PM Jartza: for some reason it didn't accept my password for sending
01:01 PM Jartza: I had to generate app password
01:16 PM AndrevS: Nowadays it prefers OAuth2 authentication in stead of passwords.
01:18 PM AndrevS: Thunderbird nowadays supports OAuth2, so that would work. A while back you had to enable "unsafe apps" or something like that somewhere on the google website. Oh well...
01:19 PM AndrevS: Is it really safer to use OAuth2? I suppose, in a way, the client doesn't store the password but rather a token. Meaning access could be revoked per application.
01:20 PM AndrevS: as in -- instance of application --
03:25 PM polprog: dunno. ive setup mutt on my gmail recently
04:10 PM exosdel: Q: Let´s say i have a byte with the value 0b00001111 and i want to move bit 3 and 4 1 step to the left, so it becomes 0b00011011 how do i do it, ?
04:16 PM exosdel: fixed it.
04:19 PM nuxil: yea?
04:20 PM Jartza: yea
04:22 PM Jartza: AndrevS: well, this app password really is just app specific and can be revoked any time
04:24 PM polprog: Jartza: pardon my mistake, that mutt setup ive done was a month ago
04:24 PM polprog: i need to check if it work.. not that i need it really
04:24 PM Aslak3: mutt eh polprog? I could never get "into it"
04:25 PM polprog: me neither
04:25 PM Aslak3: More a pine user, back in the good ol' days when you never got spam
04:25 PM polprog: i mean, i just installed it copied a working config from some blog
04:25 PM polprog: shot myself an email
04:26 PM Aslak3: I'm sure some die hards have got that working with google :)
04:26 PM polprog: it all just enforced my view that webmail is superior
04:26 PM polprog: i mean, mutt worked
04:26 PM polprog: but webmail is the only way for mw
04:26 PM polprog: ne*
04:26 PM polprog: me*
04:27 PM Aslak3: It depends. If you're fixed on one computer I think a dedicated client still rules. I hate the gmail UI though I do use it
04:28 PM Jartza: gmail ui is horrendous :)
04:28 PM AndrevS: I don't like the gmail ui either
04:28 PM Aslak3: it's not so clear cut as it once was. without heavy javascript webmail is attrocious
04:28 PM polprog: when i was 6 my dad set me a personal (myname@hisdomain.net) mail. i remeber using squirrelmail webmail... the greenish one, although many people told me it wasnt green.
04:28 PM AndrevS: I mean... if I am forced to access it my a browser, I switch it to the simple html mode, so it makes sense
04:28 PM Aslak3: squirrel is exactly what I'm reffering too. without JS....
04:29 PM Aslak3: mind, the modern web itself is just one huge ball of puss anyway
04:30 PM polprog: i dont think gmail ui is horrendous. it has its flaws but after you disable all the bullshit like auto categorization (fu google i just want to have the In folder). and the view that gives me one email per line
04:30 PM AndrevS: I got squirrel and roundcube on my server... just in case I need to access my mail from someone else' machine. Oh well...
04:30 PM Aslak3: I pitty guys who do web dev for a living :( It's got to be hell on earth
04:30 PM polprog: i like the html ui too
04:30 PM polprog: Aslak3: thanks mate. it is. i sometimes do it...
04:30 PM AndrevS: Once I was thinking about doing web stuff.... oh well.. I realised my mistake and do embedded now.
04:30 PM Aslak3: polprog: I prefer threaded, though it takes some getting used too...
04:30 PM polprog: haha. me too
04:31 PM polprog: Aslak3: you mean that? oh hell yeah love threaded views. we have that in zimbra at work
04:32 PM polprog: tbh you guys make me want to set up thiunderbird again. it was the only mail client that doesnt suck
04:32 PM Aslak3: AndrevS: if you got to make a living, sure. but doing web for fun? not me :)
04:32 PM polprog: well at least i know what i will be doing tomorrow
04:32 PM Aslak3: I confess to being an AppleMail user :/ in my defence it was originally written for NEXT so that makes it kind of cool
04:32 PM polprog: hihi
04:33 PM Aslak3: Yahoo owns Zimbra now?
04:33 PM polprog: we have an internal server
04:33 PM polprog: no idea. im not in an IT position
04:33 PM Aslak3: Gmail is better with G Suite. Takes some of the crap away from free gmail accounts
04:33 PM AndrevS: Aslak3, is it derived from the original NEXT client?
04:34 PM Aslak3: AndrevS: Yeap. It's less obvious now, but if you look on yahoo there's a vid of Steve himself demoing an email client on NEXT and you can see the resemblence
04:34 PM AndrevS: cool
04:34 PM Aslak3: wikipedia: riginally developed by NeXT as NeXTMail, a part of their NeXTSTEP operating system, it eventually became Mail after Apple's acquisition of NeXT.
04:35 PM Aslak3: s/yahoo/youtube , up there ^^
04:35 PM Aslak3: I hate winter. Just wanted to say...
04:36 PM AndrevS: I'm off to bed. g'night
04:36 PM polprog: Aslak3: where you at?
04:36 PM polprog: night!
04:36 PM Aslak3: night
04:36 PM Aslak3: polprog: southampton, uk
04:36 PM polprog: hah nice quit msg
04:37 PM jragon: yay soton
04:37 PM Aslak3: Its cute but invalid. umount is called with a mountpoint, not a devnode :P
04:37 PM polprog: oh thats close to where i used to go on holidays
04:37 PM Aslak3: Oh, where was that?
04:37 PM polprog: poole
04:37 PM jragon: yay poole
04:37 PM Aslak3: Nice town
04:37 PM polprog: i thought i ran umount with a devnote
04:37 PM polprog: node*
04:38 PM Aslak3: umount [-dflnrv] {directory|device}...
04:38 PM Aslak3: you are right :)
04:39 PM polprog: indeed. very nice. i used to take long walks from hamworthy to the quay. and the whole bay is lovely. wareham steam boat and arne fields
04:40 PM polprog: old harry, cove, the tank museum, new forest. beautiful places
04:40 PM dev1990: sounds like umount from device is umount binary feature
04:40 PM jragon: dorset as a whole is wonderful
04:40 PM polprog: i never visited the isle of wight though
04:40 PM dev1990: posix call accept only(?) target path: https://linux.die.net/man/2/umount
04:40 PM Aslak3: Mrs Asak wants to move over to hythe, just outside the new forrest. I'm looking forward to that
04:42 PM Aslak3: devl990: I was wondering about posix. I don't think posix expends to the umount command, only the syscall
04:42 PM dev1990: I'm wondering if busybox version of umount have same feature
04:42 PM Aslak3: hmmmm
04:43 PM Aslak3: Usage: umount [OPTION]... DEVICE|DIRECTORY
04:43 PM Aslak3: it does
04:43 PM polprog: yeah its not much code that youd need to add to posix
04:43 PM dev1990: yeah already checked, it does
04:44 PM Aslak3: Anyone got a shell on some ancient SunOS ? ;)
04:44 PM learath: sorry, got rid of my sparc 10
04:44 PM learath: (quad 100mhz!)
04:44 PM polprog: Aslak3: i have a solaris 11 vm
04:44 PM Aslak3: Unix history is fascinating. Did you know that mkdir used to be setuid? The kernel had no support for making directories so mkdir twiddled the disk directly
04:44 PM dev1990: anyway this might be helpful to check what busybox set of coreutils supports: https://busybox.net/live_bbox/live_bbox.html
04:45 PM polprog: Aslak3: ikr, i love unix history. shame many unices are not free (xenix, hpux, etc)
04:45 PM polprog: so you would have to torrent them to learn about them
04:46 PM polprog: i could teach computing history someday. i like history
04:46 PM Aslak3: I dunno. I'm not a OSS/Free biggot myself. commercial software is criticial to the industry's success in changing society etc.
04:48 PM polprog: me neither
04:48 PM Aslak3: I used HPUX at Uni. 128MB workstations, PA-RISC processor. I think they were about £20,000 quid each or something, 1995
04:49 PM Aslak3: When the average PC was lucky to have 16MB :)
04:49 PM Jartza: https://twitter.com/VaderSan/status/947787405649678336
04:49 PM polprog: wow. 1995 wasnt that long ago for me (2000)
04:50 PM Aslak3: polprog: hmm?
04:50 PM dev1990: 1995 ;p playstation premiere
04:50 PM Aslak3: How old are you polprog? Just curious now :)
04:51 PM Aslak3: It was an amazing time to be online. Glad I was there when the internet was not a every-man-and-dog thing
04:53 PM polprog: Aslak3: i was born in 2000
04:53 PM Aslak3: now i feel old :/
04:53 PM dev1990: hahaha
04:53 PM learath: ....
04:53 PM dev1990: me too
04:53 PM learath: fuck
04:54 PM polprog: haha
04:54 PM learath: I was a unix admin in 2000
04:54 PM polprog: i am was a linix admin on 2017
04:54 PM polprog: linux*
04:54 PM polprog: s/am//g
04:54 PM Aslak3: I've had the same job since 2001, which Ive just recently, last week, in fact, left :D
04:54 PM polprog: oh. what happened?
04:55 PM Aslak3: long story, tell you some day. suffice to say I'm very happy about it :D
04:55 PM Aslak3: linux admin? where do you do that polprog? shouldn't you be at university or something?
04:55 PM polprog: what was your job? if i may ask
04:56 PM polprog: Aslak3: at home
04:56 PM Emil: GAH
04:56 PM Emil: Feature creep is god damn real
04:56 PM Emil: and also the habit of building from primitives
04:56 PM Emil: god damn it
04:56 PM Aslak3: Emil: that came out of nowhere :)
04:56 PM Emil: Aslak3: I know
04:57 PM polprog: Aslak3: i have two VMs, a vps, a vpn, some old wrt54gl that all make together a data science playground for me and dad
04:58 PM Emil: Aslak3: it went from building a svg "editor" to designing plotter code to now god damn building a fucking mini programming language
04:58 PM Emil: And optimising language primitives
04:58 PM polprog: and soon my pentium box (my first pc that ran suse back then) as a worskop computer
04:58 PM Emil: All in like half an hour
04:58 PM Aslak3: Emil: I have no idea on the context here, but cant you use Lua or something?
04:58 PM polprog: Emil: rough day i see :P
04:58 PM Aslak3: Emil: is this a personal project, somethign for a customer, work?
04:58 PM Emil: Personal of course
04:59 PM Aslak3: polprog: what kind of data?
04:59 PM Emil: polprog: It's ridiculous :D
04:59 PM Emil: It also results in nothing getting really done
04:59 PM Aslak3: polprog: I now throw google bigtable at you
05:00 PM polprog: Aslak3: hmm, ill take a look at that. rn we use mysql
05:01 PM Emil: polprog: now it's turning from a god damn programming language to fucking assembly
05:01 PM Emil: REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
05:02 PM dev1990: I'm glad this chanel is off topic freindly
05:02 PM polprog: the best programming language
05:02 PM Aslak3: Hmmm. I'd have a break Emil, you might be having a meltdown :)
05:03 PM polprog: Emil: you need to cool off, go to that corridor where the water was leaking
05:03 PM polprog: :P
05:03 PM Emil: polprog: no I mean this literally happened in 30 minutes :D
05:03 PM polprog: wow
05:03 PM Emil: Like I said
05:03 PM Aslak3: polprog: assembly is awesome. so refreshing. shame there's very few jobs doing it
05:03 PM Emil: feature creep is real
05:04 PM polprog: Aslak3: you are right! i didnt use any assmebly in my project! o:
05:04 PM Aslak3: Email: so what is this project then?
05:04 PM polprog: that must change
05:05 PM Aslak3: I write 6809 assembly for pure fun. I guess I'll have to add "learn avr asm" to my task list
05:05 PM polprog: http://polprog.net/blog/asm/
05:06 PM polprog: now i will have to learn 8051 assembly
05:06 PM Emil: Aslak3: original plan: write a web svg editor (for a plotter project). Then I notice that "hmm, this svg syntax is too long and has shit defaults and I could style it but gah so instead lets implement a small interpreter that takes simpler primitives and outputs svg with some default values
05:07 PM Emil: Aslak3: and now we are in a god damn interpreted land which quickly turns into data structure theory, control theory and what's at the bottom? God damn assmembly
05:07 PM Emil: also
05:08 PM Emil: there are two hard things in programming: naming things, cache invalidation and off-by-one errors
05:08 PM Emil: and thus naming things turns into primitive optimisation and so on :D
05:08 PM polprog: cache invalidation?
05:09 PM Emil: polprog: "big" processors have cache that you don't touch directly, the cpu handles it for yourself mostly. Sometimes you need to flush it or change it though
05:09 PM Emil: this is hard to do
05:09 PM Aslak3: naming things!!! I spend half my damn life coming up with decent names
05:10 PM Emil: so, like
05:10 PM Emil: now
05:11 PM Emil: instead of drawing primitives like "line x1,y1 x2,y2" and "circle(x, y, r)" we have "vector(l, a)", "arc(r, a)", "rotate(somethinghere)", "translate(...)" and "scale(...)"
05:12 PM polprog: yeah its hard. i once wrote a minecraft server plugin that called System.gc() on demand and later someone told me it doesnt make any sense. but i think it helped reduce lags on those crap-tier 2-eur-per-month servers with 256mib memory
05:12 PM Emil: and then we can use custom functions to define those user likable commands like rect and circle from vector and arc
05:12 PM MrMobius: polprog, 8051 assembly is fun if you can a) use less than 256 bytes of RAM or b) enjoy implementing all addressing modes other than direct manually
05:13 PM polprog: i got caught up writing primitives like Point and Vector for my simple physics sim only to find later i need a mass property for the point. and that point is basically two ints i made a c++ class :S
05:13 PM Aslak3: That's why I love the 6809. Got just about enough functionality without spoiling you with too many registers and addressing modes :)
05:14 PM dev1990: polprog: you got really nice site there :) is your dad doing electronics too?
05:14 PM polprog: MrMobius: in my small asm program i used .equ variable adress on to of the file in order to be able to save them to ram
05:14 PM polprog: dev1990: he does a bit
05:14 PM MrMobius: Aslak3, I made the mistake of learning 6502 assembly first so I was whining when I went to the 8051. I just ordered a 6309 to play with last week
05:14 PM Aslak3: polprog: F=G*M1*M2/r^2?
05:15 PM dev1990: you got bunch of tools I wonder if I got those on your age
05:15 PM polprog: MrMobius: good to know. i will learn 8051 first the
05:15 PM Aslak3: MrMobious: I dunno why people love the 6502 so much. It's the pits
05:15 PM polprog: Aslak3: way simpler
05:15 PM Emil: polprog: DO NOT waste your time with 8051 :D
05:16 PM Emil: This is from wiser men than me
05:16 PM Aslak3: 6309 is cool. It's less orthogonal then the 6809 which I why I stick with it for my projects
05:16 PM polprog: dev1990: what do you mean? i got most of those in last 4 years
05:16 PM polprog: Emil: i already found the chip
05:17 PM polprog: mistakenly packes as atmega8 that turned out to be not even isp programabble (thats why i found ponyprog2000)
05:17 PM polprog: and i have the whole toolkit just need to install it
05:18 PM polprog: i will just write a simple HH MM clock on it i guess
05:18 PM dev1990: polprog: in your age my wallet was limited...
05:18 PM polprog: mine is too
05:19 PM polprog: most of those i got preowned
05:19 PM MrMobius: ya not many reasons to learn 8051 unless you like playing with them
05:19 PM MrMobius: the modern pipelined 8051s are ~10x faster than the old ones though if you just want to play around
05:20 PM MrMobius: Aslak3, interesting, the 6309 is supposedly an improved 6809. how is less orthangonal?
05:22 PM Aslak3: MrMobius: stuff like phshs (push to s stack) : there is a second opcode for pushing the extended registers, since they lacked bits in the param byte
05:22 PM Aslak3: pshs sorry
05:22 PM Aslak3: register exchange, transfer etc the same
05:24 PM MrMobius: so it takes more bytes of firmware to do the same thing?
05:25 PM Aslak3: http://www.6809.org.uk/dragon/6309.txt
05:25 PM Aslak3: looking at the opcodes, if you wanted to push all registers you'd do pshs a,b,x,y,u,cc,pc followed by pshsw to push the w register, which is another index register
05:27 PM Aslak3: On the other hand, you have a 16bit shifting, register to register arithamtic, and a load of other nice stuff
05:27 PM polprog: do you know any good howto/book on 8051?
05:28 PM MrMobius: Aslak3, thats cool. I did read somewhere that the 6809 is actually faster for some routines
05:28 PM polprog: i remember i had a machine printed copy of commodore 64 programming manual my dad printed back then. it had all of the system subroutines and memory adresses listed
05:32 PM Aslak3: Oh hell, is the 8051 one of those MCUs that has a "register context stack" of very limitd depth?
05:32 PM MrMobius: Aslak3, I dont think so. you have 4 sets of 8 registers
05:33 PM MrMobius: and then a stack you can set somewhere in the first 256 bytes of ram
05:33 PM MrFahrenheit: why are panel mount usb connectors so rare
05:33 PM MrMobius: dunno if you would consider that a stack though
05:34 PM Aslak3: That's the same as the 6502 then, yes I'd call that a stack.
05:34 PM MrMobius: its actually totally different from the 6502. are you thinking about the 65816? you can change the stack location on that one
05:35 PM Aslak3: The 6502 stack is 0x01 + the S register or something, isn't this the same?
05:35 PM polprog: i dont know how much ram it has but you could just write some subroutines that would simulate an avr-like stack
05:35 PM MrMobius: Aslak3, no the stack on the 6502 is hardwired to 0x100 - 0x1FF
05:36 PM MrMobius: the stack pointer is only 8 bit
05:36 PM Aslak3: MrMobius: that's what I tried to say, sorry
05:36 PM MrMobius: Aslak3, oh i suppose it is the same. sorry, I thought you were talking about the register set
05:37 PM Aslak3: np
05:37 PM MrMobius: ya, all of 8051 world happens in the first 256 bytes except one op code to read from program memory and two to read/write beyond 256 bytes
05:38 PM Aslak3: It looks like it's "registers" are mostly in RAm.. weird
05:39 PM Aslak3: MrF: I've never seen a panel mounted USB port myself....
05:41 PM MrMobius: you can address that memory directly too if you like
05:50 PM Aslak3: FWIW /bin/umount in SunOS takes a devnode too. :) for anyone who cares
06:26 PM MrFahrenheit: Aslak3, I'd like one like this so I don't have to cut a square hole in an enclosure https://i.ebayimg.com/images/g/pzYAAOSwo-NZqXLg/s-l300.jpg
06:49 PM rue_mohr: MrFahrenheit, na, you want a 'nibbler'
06:49 PM rue_mohr: then you wont care about square holes
06:50 PM rue_mohr: https://www.ebay.ca/itm/Hand-Nibbler-Sheet-Metal-Cutter-Tool-Trim-Cuts-Modify-PC-Case-Window-Electronics/352234930589
06:50 PM rue_mohr: maybe a cheaper one, I didn't look
06:53 PM rue_mohr: strange, cant find them on harbour freight
10:10 PM _ami_: https://hothardware.com/news/intel-cpu-bug-kernel-memory-isolation-linux-windows-macos#ZqBym63oZEo8gAtX.99
10:14 PM cehteh: the rumors about that are around since some days now
10:15 PM cehteh: i only hope that it doesnt affect the performance on my ryzen :D
10:16 PM cehteh: oops .. just reading ..
10:16 PM cehteh: rebuilding the kernel with page table isolation disabled
10:18 PM learath: AMD is free and clear, based on current reports
10:19 PM _ami_: learath, which version of kernel are u running?
10:19 PM _ami_: check if you have this patch: http://lkml.iu.edu/hypermail/linux/kernel/1712.3/00675.html
10:20 PM _ami_: earlier they have applied the patch for all cpus
10:20 PM _ami_: but AMD had recently raised a patch to fix this.
10:22 PM _ami_: <Kamilion> _ami_: if you go amd, and use linux, add to kernel cmdline: pti=on <-- try this
10:22 PM Casper: really, from what I read, the issue affect "only" servers. I mean a desktop that such exploit run is already compromised and the extra gain they get with it is kinda minimal
10:22 PM _ami_: thats true. but the worry is the performance hit
10:22 PM Casper: and mostly virtualised environnement
10:22 PM _ami_: by the software fix.
10:23 PM Casper: yeah, which is sad that on windows you won't have the option to not patch
10:23 PM _ami_: iam not bothered about security bug.
10:25 PM cehteh: now i wonder if, with 30% performance degration we can ask intel for refunds
10:25 PM * cehteh remembers the FDIV bug
10:31 PM _ami_: https://www.theregister.co.uk/2018/01/02/intel_cpu_design_flaw/ <- this explains the bug in little detail.
10:42 PM _ami_: ommit 41f4c20b57a4890ea7f56ff8717cc83fefb8d537
10:42 PM _ami_: Author: Borislav Petkov <bp@suse.de>
10:42 PM _ami_: Date: Tue Dec 12 14:39:52 2017 +0100
10:42 PM _ami_: i can see this patch for pti=on in kernel.
10:43 PM _ami_: pti=off if u want this to be disabled.
10:44 PM _ami_: or nopti
11:02 PM _ami_: cehteh, i think you can disable at runtime too?
11:02 PM _ami_: disable pti*
11:03 PM cehteh: i just rebuild the kernel w/o
11:06 PM cehteh: good thing with the ryzen, kernel builds take only a few minutes :)
11:46 PM rue_mohr: I'v used amd for ages now
11:49 PM day__ is now known as day