#avr Logs

Jul 20 2019

#avr Calendar

12:18 AM rue_shop1: well make sure ground is ground and if so, your ok
12:57 AM Kliment: soul-d: SED1520 DSs are available
12:58 AM soul-d: yeah got 6 of those one sorta matched my pinout but still guesswork
12:59 AM Kliment: soul-d: These guys have a connection diagram and example code https://www.buydisplay.com/default/2-2-inch-122x32-lcd-display-module-graphic-sed1520
12:59 AM Kliment: soul-d: it's probably not the architecture you want but it's great as documentation
01:00 AM Kliment: They're good people too
01:00 AM Kliment: I've bought stuff in bulk from them for some products
01:02 AM soul-d: not the same pinout got a nc on pin 8 and 18 pin etc
01:03 AM soul-d: but ill take look at the code thats alwasy handy
01:04 AM Kliment: Yeah it's either them or the adafruit libs that I use to figure out how a part works
01:04 AM Kliment: buydisplay are awesome for tfts
01:13 AM soul-d: http://www.edersales.com/eletronic/sed1520/sed1520.php actualy found someone using it already had that datasheet so guess that is the pinout :)
04:39 AM soul-d: then i realized i don't understand avr's port/pin manipulation tried every ^&| combination but it still turns off existing signals :/
04:57 AM cehteh: tri'n'error programmin does rarely good
04:58 AM soul-d: why is it so hard to toggle some bits tried every | for setting and & ~1<< for clearing combination by now but it still doesn't work :/
05:00 AM polprog: wheres rue when his paste is necesary
05:00 AM cehteh: because its not about trying, it is abput understanding
05:01 AM cehteh: you may even fry something wheny you try it wrong (drive pins to opposite potentials)
05:01 AM soul-d: sigh
05:02 AM cehteh: so define what you want to do, then think how you do it, setup the pins and then drive them
05:02 AM cehteh: its pretty easy
05:03 AM polprog: what binary operation sets a given bit? what binary operation clears a given bit?
05:03 AM polprog: i think it was in Hacker's Delight
05:04 AM cehteh: with that display link you pasted earlier you prolly wabt to set a whole port at once
05:04 AM cehteh: parallel bus
05:05 AM polprog: and once you get the PORTs right, dont forget the DDRs
05:06 AM cehteh: ddr, pullups, no alternate functions
05:10 AM polprog: 01:57 < rue_mohr> #define ?????(BIT, PORT) PORT |= (1<<BIT)
05:10 AM polprog: 01:57 < rue_mohr> #define ?????(BIT, PORT) PORT &= ~(1<<BIT)
05:10 AM polprog: its a riddle, one of theese sets and one clears
05:10 AM soul-d: its that it also unsets everthing else :/
05:10 AM polprog: no
05:10 AM cehteh: extra challenge isd the one which toggles :)
05:11 AM polprog: i think i had one which toggles... but i dont have it here
05:11 AM cehteh: soul-d: you are stull talking about the display you posted earlier?
05:11 AM cehteh: polprog: many avrs can toggle in hardware
05:12 AM polprog: oh. neat
05:12 AM polprog: i think XMEGAs?
05:12 AM cehteh: atmegas and irc newer tinys alerady
05:12 AM polprog: yeah, the new series
05:12 AM polprog: cant wait to get my hands on 'em
05:13 AM polprog: probably will have to order online, it will be ages till the local shops here stock up
05:13 AM cehteh: maybe already 25 45 85...
05:13 AM cehteh: forgotten
05:16 AM soul-d: something like that trying to use a hc595 and controll lines on same port
05:17 AM cehteh: there are libraries for that
05:20 AM cehteh: you may even abuse the hardware for that i think usi/usart
05:20 AM cehteh: but bitbanging should work as well
05:21 AM LeoNerd: polprog: I'm making a range of breakout boards for the 1-series ATtinies. Just working on the final 412 now in fact
05:21 AM polprog: LeoNerd: oh. awesome!
05:21 AM polprog: ill oder some when i get the tinys
05:21 AM cehteh: err its spi
05:26 AM polprog: soul-d: for 595 the easiest way to understand what to write is to find a datasheet that shows example waveforms/logic levels
05:27 AM cehteh: i just googled the datasheet and it claims its spi ... so why bitbanging when you can use the hardware?
05:28 AM Kliment: LeoNerd: Not sure if you saw but I resolved my weird temp reading issues
05:28 AM LeoNerd: Ah good :)
05:28 AM Kliment: LeoNerd: Where it was reading all-ones from the temp sensor
05:28 AM LeoNerd: Mhmm?
05:28 AM polprog: Kliment: hmm.. what sensor?
05:28 AM Kliment: LeoNerd: Yeah, adc was returning all-ones
05:29 AM Kliment: polprog: internal temp sensor on the attiny816
05:29 AM polprog: oh wow
05:29 AM LeoNerd: What was the problem?
05:29 AM Kliment: LeoNerd: ADC clock too fast
05:29 AM LeoNerd: Ahh
05:29 AM polprog: (im getting old with all the new avrs)
05:30 AM Kliment: polprog: it's the only part that fits in my design that isn't a WLCSP
05:30 AM polprog: WLCSP?
05:30 AM LeoNerd: I think I'm basically decided on the new AVRs lately... they're nice
05:30 AM Kliment: WLCSP is Wafer Level Chip Scale Package
05:31 AM Kliment: Basically you take the bit of silicon that makes the chip die, put some solder balls on it, and call it a day
05:31 AM Kliment: They're a bit of a pain to rework and need high density PCBs
05:32 AM Kliment: Because they're dense-pitch BGAs
05:32 AM polprog: tight
05:32 AM polprog: right*
05:32 AM Kliment: tight too
05:32 AM polprog: :D
05:32 AM Kliment: Anyway, I had 3mm of space on that PCB for a micro
05:33 AM Kliment: So I went looking for small micros and came across the 816
05:33 AM vmt: Kliment: did you get the new interface working apart from as?
05:33 AM Kliment: I've actually gone with a 416 now (same form factor, half the memory)
05:33 AM Kliment: vmt: yes!
05:33 AM vmt: what did you end up using?
05:33 AM Kliment: vmt: latest avrdude has support for it
05:33 AM LeoNerd: 1616 is nice, really tiny; 3mm VQFN. I managed to solder one yesterday
05:34 AM Kliment: LeoNerd: Yeah that's the package I'm using
05:34 AM vmt: yeah i know, but it did do ocd doo, yeah?
05:34 AM vmt: ocd too, even.
05:34 AM vmt: i figured the problem was more at ocd than flashing it
05:34 AM Kliment: vmt: no, I haven't gotten debug working with proper tools yet - I used mplabx
05:34 AM Kliment: vmt: it's shit but I don't know what I can do about it
05:35 AM Kliment: vmt: now that I have communications going properly I don't need the debugger anymore
05:35 AM vmt: myeah, and i think before (or if ever) openocd picks up support it
05:35 AM soul-d: got that working its just thati have an for(;;) if chipselect (set ctrls for chipselect) then inits trough hc595 ah well ill take coffe break first
05:35 AM vmt: it's always going to be dicey
05:35 AM soul-d: the hc595 part of that i mean
05:37 AM polprog: soul-d: you can post some code snippets
01:21 PM vmt: should really collect an offering for someone to make a proper gdb/lldb frontend for loonix
01:22 PM cehteh: yet another one?
01:23 PM vmt: oh really now, give me a proper one then
01:23 PM cehteh: i already bet my suggestions fail your definition of proper
01:24 PM nohit: :D
01:24 PM vmt: i'm guessing it's ddd
01:24 PM cehteh: i dont use any and rarely use gdb anyway
01:24 PM cehteh: ddd is a but dated
01:24 PM vmt: well, suggest something apart from gdb-tui/ddd
01:25 PM cehteh: not using a debugger
01:25 PM cehteh: assert is your friend
01:25 PM vmt: assert + dump memory?
01:25 PM vmt: that's one way to do it, for sure!
01:26 PM cehteh: https://nobug.pipapo.org/
01:26 PM vmt: dump mem dump regs dump the whole fucking disk while you're at it, information level > 9k
01:26 PM cehteh: i once made that, needs some love and improvement
01:26 PM vmt: i see "library" and not "front-end"
01:27 PM cehteh: why would you want to dump memory?
01:27 PM vmt: because i want to inspect the memory, maybe?
01:27 PM vmt: that's kind of what a debugger does
01:27 PM cehteh: yes you link it with your application an it nan check and log some things even in production builds
01:28 PM cehteh: yes the question is why do you need to inspect the memory?
01:28 PM vmt: that's a horrible way to debug anything of note
01:29 PM vmt: because the causality for something to not-work is often times quite a complicated thing, where different systems interact with eachother
01:29 PM vmt: and you want to be able to debug their states at the same time, given an error condition
01:29 PM vmt: and having to write out exactly what you want to examine into the program is a huge pain in the ass
01:30 PM cehteh: depends, often you want an answer/log for the question "why did it crash, while all tests are passed" probably at the customer
01:30 PM vmt: i see, your love for unit testing would explain why you'd want a library like this, then
01:30 PM cehteh: of course this shouls not impact performance noticeably
01:31 PM cehteh: well do/complain whatever you want
01:31 PM cehteh: glhf
01:32 PM vmt: if (read: when) you do things iteratively, you're going to rewrite the same fucking unit tests 10 times over because the data set can (read: will) change
01:32 PM cehteh: then you dosomething wrong
01:33 PM vmt: only hardcore foss-people would suggest that the solution for the lack of a decent debugger frontend should be to write debugging into the code directly
01:34 PM cehteh: well i admit nobug fallen a buit behind, i may go over it and improve it eventually
01:34 PM vmt: of course i do something wrong, and i do it a lot. so does everyone. that's why we have debuggers, and that's why people should use them.
01:34 PM cehteh: running under valgrind/gdb is on the todo list
01:35 PM cehteh: i thin debuggers are rather poor tools come into place to because of poor languahe semantics .. and i dont care when you disagree, glhf i said
01:36 PM vmt: e.g. algorithms and their implementations are language-independent.
01:36 PM vmt: and sure, if you want to recompile to adjust your debug-library-calls or printfs, yeah good luck and have fun, too
01:37 PM cehteh: as long you implement them correctly, but then you wont need a debugger/assertions in the first place when your code is correct
01:37 PM vmt: sure, but again slight errors might lead to subtle issues somewhere else, and the root cause is often times not obvious
01:38 PM cehteh: also algorithm implementations differ depending on the language/semantic/memory model .. pointers vs inex access just for example
01:40 PM cehteh: there are some nice articles about how hard it is to implement a linked list in rust
01:41 PM vmt: surely, but i'm not just talking about textbook algorithms you pull out of clrs
01:42 PM vmt: namely, all data transforms can be thought of algorithms of sorts
01:43 PM cehteh: even as functions, (in mathematical/haskell sense) which can become scary
01:43 PM vmt: non-trivial functions are data transformations, as previously mentioned
01:45 PM vmt: though i wasn't explicit about that. meh.
01:47 PM cehteh: anyway i had moe fun using gdb directly (scriped) than any gui, maybe generate graphs from the data gathered if ever needed,
01:48 PM cehteh: ddd does a bit of that but its clumsy to use (at least it was 15 years ago) does it got any updates since then?
01:52 PM timemage: if it has, it's difficult to tell.
01:52 PM cehteh: https://www.gdbgui.com/screenshots/ hipster browser gui ..hah
01:52 PM vmt: not trying to be condescending here or anything, but i don't think you've done any non-trivial debugging then
01:52 PM cehteh: i agree, making things trivial is the way to go
01:53 PM vmt: "heh"
01:53 PM vmt: the gdbgui is a step in the right direction, but the interface is really clunky because... it's in a browser
01:54 PM cehteh: may help for remote debugging
01:54 PM vmt: i would probably use it even if he ported it to... _electron_. it would still be miles above ddd/gdb
01:54 PM vmt: but right now it's a pain to use it
01:56 PM cehteh: well i see gdb as low level intergace/api into debugging programs, if i reaally need hardcore debugging i would write a task specific frontend/script to it
01:56 PM vmt: last time i tried it, one window is tied to a gdb process, and it can't open a new one in the same window
01:56 PM vmt: not to mention the interface itself breaks sometimes
01:56 PM cehteh: of course you can use it directly as wellas using telnet for irc or reading mail
01:57 PM vmt: ah, unix bears love the terminal
01:57 PM vmt: beards, even
01:57 PM vmt: the more neckbeard you have, the more terminal you love
01:58 PM cehteh: i like visualization as wlel
01:58 PM vmt: it's not just about visualization, it's about mouse being actually useful in debugging
01:58 PM cehteh: but o dont want to have a click-orgy over and over
01:59 PM vmt: and i don't want to have a type-100-characters-to-cast-this-pointer-and-deref-and-whatever @gdb
02:00 PM cehteh: just script it down to the point you want to assert check invariants, whatever needfs to be done
02:00 PM vmt: it's really time-consuming. especially because the tui-mode up and down arrows scroll the code window and ctrl-p and ctrl-something actually brings up backlog
02:00 PM cehteh: yeah i dont like that either
02:00 PM vmt: and i want to be able to just scroll down to a point and insert a breakpoint
02:00 PM vmt: not having to remember the exact line from the source file
02:00 PM cehteh: i avoid that in the first place
02:00 PM vmt: the tui mode doesn't even support opening source into tabs
02:01 PM vmt: it just has the currently executed source file
02:01 PM cehteh: emacs has a interface for gdb, but you dont have a beard
02:01 PM vmt: yeah i really don't have a beard or any aspirations for learning/using emacs
02:02 PM cehteh: there are about a dozen other frontends anyway
02:03 PM vmt: i wouldn't say a dozen
02:04 PM vmt: that looks like borderline usable actually, something called kdbg
02:04 PM vmt: though last commits 2 years ago, so slightly on the iffier side there
02:04 PM vmt: that's foss for you i guess
02:05 PM cehteh: i prefer funtionality over blink
02:05 PM vmt: there's nothing blinky there
02:06 PM cehteh: k* often involves blink .. but i dont know
02:06 PM vmt: well it's just qt. it's either that or gtk, most of the time.
02:06 PM vmt: gtk with it's retarded oop-system is really a pain to work with. then again, so is cpp... go figure.
02:08 PM cehteh: k is ofte > qt ..and qt is already shitloads, *but* some of these apps are ok so i cant say
02:08 PM cehteh: qt evolved into a complete platform with a lit NIH as well
02:09 PM vmt: well, sure. but the problem with loonix is that it doesn't have a standardized widget system such as... well really, mac
02:09 PM vmt: as windows has a plethora, because they're all into their c# bullshittery now
02:12 PM vmt: if only foss-people would concentrate their off-hours energy into being productive towards a common goal instead of forking everything to do it *my way* or committing to the most popular repo in the coolest-and-latest-language
02:12 PM vmt: ...maybe then we'd have nice things
02:13 PM cehteh: you miss the point
02:13 PM vmt: don't tell me, freedom to choose
02:14 PM cehteh: freedom to do/fork the more
02:14 PM vmt: ;:D
02:14 PM vmt: yeah. i mean there's nothing wrong with that, admittedly
02:14 PM vmt: but then for people to praise how great and efficient system it is to produce quality software
02:14 PM cehteh: i give a shit about what you choose
02:15 PM cehteh: it woks just different
02:15 PM cehteh: no one claims its efficient
02:15 PM vmt: working "differently" is like twisting absolutes into the realm of opinions and then saying all "opinions" are equally valid
02:15 PM cehteh: but at least its not stuck in some monoculture
02:16 PM vmt: it's stuck in a clusterfuck of "multiculture", which is objectively worse
02:16 PM cehteh: thats humans, opinions are as valid as they clain them to be valid
02:16 PM vmt: wrong.
02:16 PM vmt: that's exactly what i was talking about
02:16 PM cehteh: and the free software movement isnt there to fulfill your peronal wished
02:17 PM vmt: i'm not even talking about debugger front-ends anymore
02:17 PM vmt: i'm saying most foss-tools objectively suck ass for this very reason, though mostly too because people do not get paid for them
02:17 PM vmt: this github-era/generation expects everything to be free, so there is no incentive to pay for anything
02:17 PM cehteh: either you take it or not, wellyou may even bark ot complain .. its completely irrelevant anyway
02:18 PM cehteh: mayne you can improve things going into youor desired direction when you contribute somewhere ...0.0000001% or so
02:19 PM cehteh: or you pay someone to improve something
02:19 PM vmt: if i make tools for free, i will make them for myself and/or licensed
02:19 PM cehteh: but complaining here is no more than entertainment
02:20 PM cehteh: just do
02:20 PM vmt: and i'm working on something along those lines, though i'm not exactly sure when should i schedule a release
02:22 PM vmt: cehteh: well, it's a fundamental disagreement, you could call discussion entertainment, sure
02:22 PM cehteh: i am not stallman, when you decide to use or make non-free software, thats your freedom, i am atheist i dont even belive you end in hell for that
02:23 PM vmt: ah yes, the cult of rms
02:23 PM cehteh: but i reseve me the freedom to laugh about your rants as well
02:23 PM vmt: consider yourself entertained, then
02:23 PM cehteh: and i hope you respect software licenses, including gpl
02:24 PM vmt: and i shall remain considering you ignorant, we can both hold on to our afflictions
02:25 PM cehteh: i am not ignorant, its just facts i catnt (an dont want to) change
02:25 PM cehteh: if i could i would change a lot, in c, in linux, in free software as well
02:26 PM cehteh: your point of not having one unified wiget set/ui is pretty valid
02:26 PM cehteh: but thats not to cahe anymore
02:26 PM vmt: i'll rather gouge my eyeballs than use gnu-anything in my codebase
02:26 PM vmt: that's one great thing about software licenses, however. everyone *hopes* real bad for people to respect them
02:28 PM cehteh: well software licenses are politics, not technical things
02:29 PM vmt: if you have half a brain to be subtle about it and don't just go balls to the walls, they're impossible to track.
02:29 PM vmt: when there's big players involved, yes sure then it becomes politics
02:30 PM vmt: smallball, nobody cares, or can keep tabs
11:11 PM day__ is now known as day