#avr Logs

Aug 05 2019

#avr Calendar

01:14 AM diip: hi
01:19 AM diip: I am a bit confused....
01:19 AM diip: do avrdude, avrloader, avrprog and dfu-programmer all do the same/similar things
01:19 AM diip: ?
01:19 AM diip: I am confused by the use of the term "programmer" for both hardware and software
01:19 AM diip: oh and add AVROSP to the list above
02:57 AM day: diip: avrloader seems to be some shareware unfree thing, i doubt it is worth looking into it
02:57 AM day: avrdude afaik does everything that you need. fusebits, flashing etc.
03:00 AM day: dfu-programmer is higher level and manufacturer agnostic. it requires the µC to run a bootloader. dfu is great because it allows users to update the firmware without special equipment
03:18 AM diip: day: Thanks but the avrloader I am looking at is a python clone of AVROSP https://github.com/topptech/AVRLoader
03:20 AM diip: The thing is I am trying to study the code but I am not sure what exactly I am looking at except avrdude which seems pretty broad
03:26 AM diip: btw, I am trying to look at the code for flashing a μC with a bootloader via USB
03:29 AM diip: the micro pro to be exact
03:34 AM KimK: diip: I would guess that avrdude (code) is pretty broad, because it has such a long list of programmers it supports: https://pastebin.com/yeSj3Rhq
03:36 AM KimK: I'm using avrdude with usbtiny. For now anyway, I might get something better later.
04:43 AM diip: KimK: Yes, avrdude is a great program, I am using it as well.
04:45 AM diip: I also want to understand all the "programmer" jargon. I get the basics (kind of) but I am trying to build something more user freindly just for the pro micro (for now) I can't seem to find a way to embed avrdude so I am trying to understand how to comunicate/control a bootloader from a pc
04:46 AM diip: i.e. embed avrdude so the user doesn't need to download it seperately. it would be great if it was a library to link to.
04:47 AM djph: like, I dunno, the Arduino IDE?
04:49 AM diip: yes but not for programmers more user/application specific
04:49 AM diip: and even the Arduino IDE needs avrdude installed seperately doesn't it?
04:56 AM day: that sounds odd.
04:57 AM day: the arduino uses a bootloader, thus it shouldnt be necessary.
04:57 AM day: and i dobut the arduino ide lets you tinker with fusebits lol
05:09 AM diip: so the Arduino IDE has avrdude included in it's executable?
05:11 AM diip: that would be great, means I can do the same. will keep looking, thanks.
05:14 AM diip: though understanding how it controlling the bootloader would still be interesting...
05:17 AM twnqx: "in its executable" probably not, i am pretty sure it executes a separate avrdude binary
05:18 AM twnqx: you could search the installation directory for it.
05:20 AM djph: diip: no, the IDE includes it.
05:21 AM djph: day: it does (at least a little bit)
05:21 AM djph: diip: or rather, the IDE download includes it as part of the "install".
05:28 AM diip: yes it includes an avrdude binary it its linux installation file (and some avrdude.conf files)
05:28 AM diip: Thanks
08:31 AM vmt: diip: why can't you do something more productive instead?
08:31 AM vmt: i think the asdfsadfas-duinos have enough "user-friendly" shit already
08:33 AM vmt: loonix users all love terminal emulators to begin with, so i doubt they need anything more user-friendly. winblows people can use AS
09:19 AM day: but what about the loonix-duinos D:
09:38 AM skz81: <diip> so the Arduino IDE has avrdude included in it's executable? >> Probably not in the IDE itself, but in the installer. It embeds the toolchain too.
09:39 AM skz81: Ha, djph already said that :)
09:53 AM diip: vmt: what is "AS"?
09:54 AM diip: vmt: one reason understanding what is going on....
09:55 AM vmt: atmel studio
10:00 AM diip: vmt: second reason, people don't always want to install ides and avrdudes just to use say ..arduinoboy or a keyboard. even loonix users (like me) just want to automate stuff till it is point and click silly. yes it is great for learning about programming, but most people who would use such things or get it for someone else would run a mile if you mention the word "programming". it is better to get them in first and then explain to those
10:00 AM diip: interested what is going on
10:02 AM diip: one of the reasons people are scared of linux is the idea of the "complicaded" terminal stuff even if it is much more powerful than just point and click tools.
10:04 AM diip: pretty much most people I know have no idea of an arduino, and the word "IDE" will ensure they never give it a second glance.
10:05 AM diip: however a "game loader" doesn't sound so threatning and is more inviting to a child and " non tech savvy" parent. Don't you think?
10:37 AM djph: diip: sounds like you're almost trying to (re-)create something like the Lego Mindstorms (or at least their original "graphical programming(tm)" environment).
11:47 AM diip: djph: Maybe, but I am not trying to teach people how to program, I am trying to give non-programmers a way to customise their tools/toys without being a programmer (or without knowing they are programming (like emacs)).
11:51 AM diip: the aim is to make flashing an avr as simple as loading a file to an sdcard or flash drive.
01:23 PM djph: diip: err ...
01:27 PM cehteh: diip: proper makefile with a 'upload' target and then type 'make upload' in a terminal .. its really complicated :D
01:27 PM cehteh: uf course in theory you can implement a bootloader which acts as usb storage and when one copies a .hex to it it gets flashed
01:28 PM cehteh: .. and discover such a bootloader takes 70% of your available flash and leaves 30% for your application :)
01:29 PM * cehteh thinks proper documentation, fixong bugs, provide a good infrastructure is more important
01:30 PM cehteh: you may even provide a gui driving make where user can click "upload"
01:31 PM cehteh: just driving make
01:44 PM djph: or, y'know; educate people that programmable things require ... well, programming ...
01:57 PM diip: cehteh: sorry you lost me
01:58 PM diip: upload? make upload? which program are we talking about
01:58 PM cehteh: make
01:59 PM diip: I don't mean literally use the avr as a flash drive I mean make flashing as simple as drag and drop
01:59 PM cehteh: yes
02:00 PM diip: make for avr?
02:00 PM cehteh: no on your host os
02:00 PM diip: providing a gui specified for the task/app at hand is what I have in mind
02:01 PM diip: what does make on the host os have to do with avrs?
02:01 PM cehteh: i use makefiles to control all parts of the project
02:02 PM cehteh: one target is 'make upload' that flashes the code
02:02 PM cehteh: another is 'make doc' that generates the documentation
02:02 PM cehteh: etc
02:02 PM cehteh: there is even a 'make publish' that pushes code to the public git repository, generates the website, upload that to the webserver
02:03 PM cehteh: would be easy to hack some simple gui together with buttons for all those targets
02:04 PM cehteh: not that i ever missed that
02:04 PM diip: and then deploy it with all the peripheral binaries in a singl binary?
02:04 PM diip: or directory?
02:04 PM cehteh: deploy what?
02:04 PM cehteh: where?
02:04 PM diip: to non-programmers using avrs
02:05 PM cehteh: on what platform?
02:05 PM cehteh: i mean usually i prefer my code to be portable, checking only source code into git
02:05 PM cehteh: there are some dependencies the user has to fulfill and install
02:05 PM diip: the aim is to make a program that can flash avrs but the user does not need to know a thing about programming
02:06 PM diip: only what they want from the specified tool
02:06 PM djph: diip: so you want to send precompiled hex files to people, and let them upload that to their micro?
02:06 PM diip: eg arduinoboy or a keyboard
02:06 PM cehteh: but it would be a nightmare when i distribute all those binaries because thats just zillin times cruft and i have to care and update that toolchain
02:06 PM diip: no
02:07 PM diip: actually in some cases yes
02:07 PM cehteh: make some container for it, maybe a vm image with all tools preinstalled
02:07 PM djph: so then, "programming" is a requirement (or minimally, hey, here's the source, open it in arduino, select the right board, click upload)
02:07 PM cehteh: arduino does that already .. and it mostly sux
02:08 PM djph: cehteh: which part?
02:08 PM diip: you download a hex file from the net, connect the avr, click reset and then a button and done!
02:08 PM cehteh: because installed arduino IDE's depend on java, they come with their own set if binaries which are often benind the current releases
02:08 PM diip: no programming if you don't want to
02:08 PM cehteh: well thats easy
02:08 PM diip: each application/usecase will have a different program
02:09 PM cehteh: you jut need a bootloader of some sort
02:09 PM cehteh: on the avr
02:09 PM diip: cehteh: pretend you are talking to a noob
02:09 PM cehteh: when you click reset then it goes into bootloader mode and receives the hex 'somehow'
02:09 PM cehteh: this somehow is to be defined by you, could be uplaoding with some standard protocol with avrdude
02:09 PM diip: I know about bootloaders. this is focusing only on pro micro for now
02:10 PM cehteh: could be just binary data send to the serial port
02:10 PM cehteh: could be some usb-flash emulation where you drag'n'drop the hex
02:10 PM diip: that is kind of it
02:10 PM cehteh: the later is often used for stm32
02:10 PM diip: stm32?
02:10 PM cehteh: i think it will be great pain to get that working on avr's
02:11 PM diip: would it be that hard on the pro micro
02:11 PM cehteh: 32 bit arm cortex microcontrollers
02:11 PM diip: all you need is a reset button on the device
02:11 PM cehteh: no matter how it will require precious flash memory
02:11 PM diip: aha
02:12 PM cehteh: avr's dont have so much
02:12 PM diip: only the bootloader, the program is on the host device
02:12 PM cehteh: 'the program'?
02:13 PM cehteh: the program that does the flashing? like avrdude? .. hey how about you just use avrdude lie everyone else?
02:13 PM cehteh: arduino hides that behind a gui
02:13 PM diip: ok... I started by asking about the difference between avrdude, avrloader(python) dfu-programmer, and avrosp
02:13 PM diip: because I wanted to make something to put in a program
02:14 PM cehteh: avrdude is for most avr'S
02:14 PM diip: I was told avrdude is embedded in the aduino IDE
02:14 PM cehteh: its not
02:14 PM cehteh: its a standalone program
02:14 PM cehteh: i use that without arduino
02:14 PM diip: I did not know it could be used inside another program
02:15 PM cehteh: avrloader i dont know, dfu* is for arm-cortex/stm32 avrosb i dont know either
02:15 PM diip: but it is downloaded with the arduino IDE executable so it does not need to be downloaded seperately
02:15 PM cehteh: maybe you want to generate some user inteface for people who dont know programming because thats you? :)
02:15 PM diip: I am hoping to make a program that uses avrdude and hides it
02:16 PM diip: because I want to share tools with people that will be dicouraged by the idea of "programming"
02:16 PM cehteh: iirc the ide comes as some big archive (zip or whatever) with tons for supplementary programs (the whole toolchain) hidden in some folder
02:16 PM diip: I can use avrdude
02:16 PM diip: iirc?
02:17 PM cehteh: imo the best way is to offer a makefile
02:17 PM cehteh: that can easily extended and you can always wrap that in some gui when you really want
02:17 PM diip: makefile embedded in a gui is a great idea
02:18 PM cehteh: not embedded
02:18 PM diip: but it must all be one flat download
02:18 PM cehteh: why?
02:18 PM cehteh: you download a .zip or whatever and unpack it (maybe your gui unpacks it)
02:18 PM diip: because many people don't enjoy that
02:19 PM diip: simple user interface
02:19 PM cehteh: you mix up user interfaces with lower layers that can be hidden from the user
02:19 PM cehteh: do you use firefox?
02:19 PM diip: yes
02:19 PM diip: exactly
02:20 PM cehteh: do you know hoe many files firefox needs to be 'useable?
02:20 PM diip: if the user want to go deeper that is their choice
02:20 PM diip: I guess a lot
02:20 PM diip: but firefox is one flat usable download
02:21 PM cehteh: its an archive that unpacks and installs lots of stuff
02:21 PM diip: then that would be the plan
02:21 PM cehteh: but for doing so you need a solid fundation
02:22 PM cehteh: not riding the horse backwars starting with the gui
02:22 PM diip: in what?
02:23 PM cehteh: you need infrastructure/definitions on how things are structured, what has to be installed, what dependencies etc
02:23 PM cehteh: aka getting that right is aboe a beginnners level
02:23 PM cehteh: looks simple but will end up in a mess
02:23 PM cehteh: to users frustration
02:25 PM diip: the only extra will be avrdude (which I was planning to avoid by only using the relevant atmega32u4 code)
02:25 PM diip: I will do whatever is easiest
02:25 PM cehteh: acrdude needs configuration and external files as well
02:27 PM diip: I know but if I am only focusing on one chip(at first), I am hoping it will be easier
02:27 PM diip: djph: I am not trying to teach anyone to program I just need them to use the tools and leave a door open for those that want to learn
02:28 PM diip: kind of like linux
02:29 PM cehteh: i bet there is already some gui for avrdude somewhere
02:29 PM cehteh: give it a google
02:29 PM diip: many
02:29 PM cehteh: i never needed that
02:30 PM diip: you know about arduinoboy?
02:30 PM cehteh: no
02:30 PM diip: it is a gameboy thing build on the atmega32u4
02:30 PM cehteh: hey making some fuse filesystem for linux that drives avrdude would be doable as well, then you have drag-n-drop flashing
02:30 PM diip: but (i think) needs the arduino IDE
02:31 PM cehteh: i usually dont distribute .hex files but source
02:31 PM diip: what I am thinking would be usable only for the arduinoboy and a gui
02:31 PM diip: no the hex files can be downloaded from the net
02:32 PM diip: installing them would be made easier
02:32 PM cehteh: that is distribution
02:32 PM cehteh: well i dont see a point
02:32 PM diip: no flashing made easy
02:32 PM diip: because you obviously program a lot and do not fear the terminal
02:32 PM cehteh: even flashing from commandline is easy
02:33 PM cehteh: you just give people the avrdude spell they should do (or the make target) and done
02:33 PM diip: not for a parent whose definition of a computer progrm is word
02:33 PM cehteh: plain avrdude may fail becasue you need to detect hardware first, your chip may be connected on different devices
02:33 PM diip: what if there is no terminal?
02:34 PM cehteh: there is always a terminal
02:34 PM cehteh: even windows ship bash meanwhile
02:35 PM diip: ok what if the user doesn't know there is a terminal and doesn't care to know?
02:35 PM vmt: user probably shouldn't use loonix then
02:35 PM vmt: XORG SEGFAULT WAT DO
02:36 PM diip: even if the use android?
02:36 PM vmt: who the fuck flashes chips on android
02:36 PM cehteh: that user would care less about your efforts to flash pcb's with almost bare bones microcontrollers
02:36 PM cehteh: lol
02:36 PM diip: imagine your only operating system use has been adroid
02:36 PM vmt: i think you need to reconsider the market segment
02:37 PM cehteh: install termux :)
02:37 PM diip: yes but they might want to use one of the tools
02:38 PM diip: even then I know many widoze users who don't know about a terminal but would like an arduinoboy for their kids
02:38 PM vmt: i highly doubt your hypothetical user cares much to build a fucking product themselves
02:38 PM cehteh: may/want/could ... do wahtever you want :)
02:38 PM vmt: if you are considering plug-and-play users, then ship your product ready-to-use
02:38 PM cehteh: this is one of the rare cases i agree with vmt :)
02:38 PM vmt: fuck off :(
02:38 PM cehteh: haha
02:38 PM diip: vmt: why do you think everyone using an avr product would want to build it temselves?
02:39 PM diip: vmt: even a ready to use product might need a change of firmware
02:39 PM diip: vmt: cehteh: what do you use avrs for?
02:39 PM vmt: how extensible does a gameboy emulator need to be?
02:41 PM vmt: diip: well your juxtaposition is fucked up to begin with. you're saying you want to provide people who don't want to tinker, something to tinker
02:41 PM vmt: no comprende
02:41 PM cehteh: diip: currently industrial/laboratory stuff
02:42 PM diip: something designed for tinkering that can be used for other things
02:43 PM vmt: err, such as?
02:45 PM diip: arduboy :)
02:46 PM diip: https://arduboy.com/
02:46 PM diip: computers were not designed for watching cat videos
02:48 PM diip: and it seems someone has developed something like what I want
02:48 PM diip: https://github.com/eried/ArduboyUploader
02:48 PM diip: but I have to look at that and the code
02:48 PM vmt: it's yet another thing that uses avrdude, who'd have thought
02:49 PM diip: great but before today I did not know
02:50 PM vmt: if all you want to is to have a program which calls avrdude with a predefined set of args
02:51 PM vmt: ...then you might aswell make it a script
02:51 PM diip: gui script?
02:51 PM vmt: bat/bash, and voilá, you have complete cross-compatibility in like 2 minutes flat
02:52 PM diip: I use linux, other than online, I know no-one else that uses or cares to use it, and maybe one other person that uses the terminal
02:52 PM polprog: rue_bed: just a joke ;)
02:53 PM vmt: that's why you make the bat script too
02:53 PM vmt: and you know, on winblows double-clicky executes it
02:53 PM vmt: boom
02:54 PM vmt: heya polprog what's up
02:54 PM diip: emacs crashed
02:55 PM diip: before I used linux I tried my best not to use the terminal
02:55 PM diip: I know nothing about bat files
02:55 PM polprog: hey vmt
02:55 PM polprog: lots of work at the cabin
02:55 PM rue_mohr: polprog, I still dont get the acronym ! :)
02:55 PM polprog: rue_mohr: GPIB the ancient lab equipment bus
02:55 PM rue_mohr: oh never heard of it!
02:55 PM polprog: used passthrough centronics style connectors
02:56 PM rue_mohr: narrow ones? like 20 pins?
02:56 PM polprog: it think so
02:56 PM polprog: narrower than printers
02:57 PM polprog: diip: good, cause bat files are of little use under linux ;)
02:57 PM polprog: diip: were you using emacs as your irc client?
02:57 PM vmt: diip: well google will tell you all about them
02:57 PM diip: yes
02:58 PM vmt: using emacs is the first wrong step
02:58 PM diip: how about I use a gui that doesn't require bat files
02:58 PM vmt: how about you just have a bat file you execute and that's it
02:58 PM vmt: it doesn't require anything external
02:59 PM vmt: well, avrdude really
02:59 PM rue_mohr: damnit, I modeled stuff for a rose pedal, and nothing can use the splines from the cad program
02:59 PM rue_mohr: anyone have autocad at their fingertips now?
02:59 PM rue_mohr: :( have to remodel it, damn
03:00 PM vmt: rue_mohr: you canuckistan redneck, you
03:00 PM diip: vmt: it is a bit more complicated than that but knowing avrdude can be packaged in an install directory is great
03:00 PM diip: vmt: what is wrong with emacs?
03:02 PM vmt: for maximum comfort get the script looking for a file of a certain name and if found, dump that to the avr
03:02 PM vmt: can't get much easier than that
03:02 PM vmt: also, as we know, the emacs suite(tm) is perfectly fine it just lacks a decent text editor
03:02 PM polprog: nothing is wrong with emacs, the editor war was started by our fathers and we may not let it die
03:02 PM polprog: :D
03:03 PM diip: but yes a script that uses avrdude is the answer evenually just something more extensable than bat/bash
03:03 PM polprog: diip: gimme a sec and ill show you my universal makefile
03:03 PM polprog: provided i have it on my server
03:03 PM vmt: diip: i hardly see the value in it, though
03:04 PM polprog: diip: scroll down to the bottom https://polprog.net/blog/asm/
03:04 PM vmt: polprog: makefiles! so the 80s, now we use modern build tools (tm)(r) like CMAKE which will eventually generate MAKEFILES
03:04 PM polprog: vmt: GRADLE or go home
03:04 PM vmt: then you can use supermodern(tm) build tools which will generate cmake files for you!
03:04 PM vmt: followed by hypermodern buildtools which will generate supermodern build tool files(tm)
03:05 PM vmt: like seriously, i took a look at how long this goes once
03:05 PM vmt: and it's fucking sad, really
03:05 PM polprog: lol true
03:05 PM vmt: you have a million tools which will just do nothing but generate input files for eachother, rofl
03:05 PM diip: I use emacs for org and irc only. vim for most editing
03:06 PM vmt: the cool kids use ed, really
03:06 PM diip: polprog: I have never used makefiles but thanks
03:06 PM vmt: i'm sure you have, at least inadvertantly
03:06 PM vmt: if you're a loonix nigra
03:07 PM diip: tried ed once, then I saw the joke page and it was my history
03:07 PM diip: I have used make
03:07 PM diip: but I have never written a makefile
03:07 PM vmt: all:\n\trm -rf
03:07 PM vmt: all:\n\trm -rf /
03:08 PM vmt: there you go
03:08 PM diip: thanks
03:08 PM diip: maybe not
03:08 PM diip: is that possible on debian?
03:09 PM polprog: diip: what were you using instead
03:09 PM diip: for what?
03:09 PM polprog: for compiling code
03:09 PM diip: bash
03:10 PM polprog: eww
03:10 PM polprog: lol
03:11 PM vmt: i don't really see how writing a bash script is any worse choice
03:11 PM diip: i don't really get the polyglot thing. how many languages can you use? productively?
03:11 PM polprog: hmm
03:11 PM polprog: 5?
03:11 PM polprog: for dofferent tasks
03:11 PM polprog: different*
03:11 PM vmt: 5? list them
03:12 PM polprog: C, python, perl, php, assembly
03:12 PM vmt: python/perl/php, what the fuck
03:12 PM polprog: java but im clean since 2015
03:12 PM polprog: look, mans gotta eat
03:12 PM vmt: well you sure as hell aren't when you're using that triplet
03:12 PM polprog: did i say at once
03:12 PM diip: assembly is already 4, arm, avr x86, x86-64
03:13 PM polprog: x86-64 is pretty much similar
03:13 PM vmt: well, technically it isn't. it's more like you need to rtfm
03:13 PM polprog: well yeah but its more similar to x86 than m68k
03:14 PM polprog: anyway
03:14 PM polprog: C and asm for thr obvious
03:14 PM polprog: perl for scripting shit, python for other peoples projects
03:14 PM diip: stll need to learn avr assembly, thanks for the blog page
03:14 PM polprog: php for other people projects
03:15 PM vmt: i wouldn't touch those projects
03:15 PM polprog: youre welcome diip. made for people like you
03:15 PM polprog: vmt: id love not to, but they pay moneys
03:16 PM polprog: ill happily take money for scripting around a CMS cause the client doesnt like the cms for what hes doing
03:16 PM polprog: lets not talk about webdev.
03:16 PM vmt: web "developers" are a fucking joke
03:17 PM vmt: i like how they talk about optimizing their latest javascript shizzle when just by virtue of using it you're so many factors off that your little (mostly linguistic) tricks don't matter two fucks
03:17 PM polprog: idgaf about javadcript
03:17 PM polprog: javascript*
03:17 PM polprog: and yes i use that too, for some frontend shit
03:17 PM vmt: well, like previously discussed around here, you can't get around it
03:18 PM polprog: whatever gets the job done
03:18 PM vmt: and the new wasm thing is just as bad
03:18 PM polprog: i dont wanna even touch *that* lol
03:18 PM diip: is it? I was hoping it would make thing better.
03:18 PM polprog: hard to say. we are not web developers :p
03:19 PM vmt: it's called *asm*, it's some kind of silly stack execution and not a very effective one
03:20 PM vmt: it is an improvement to javascript, but it's like a turd they've been pushing out for many years and in the end when they get it out, the gains are not really worth the hassle (or the hype)
03:20 PM polprog: i guess javascript would be the seventh, but you could as well call SQL the eighth, but i dont use them that often and have little idea beyond the basics
03:20 PM polprog: lol
03:20 PM diip: what was the sixth?
03:21 PM polprog: jS
03:21 PM polprog: JS
03:21 PM vmt: polprog: for scripting, why'd you need both perl and php?
03:21 PM vmt: i mean
03:21 PM diip: I thought wasm was meant as something to compile to?
03:21 PM vmt: perl, php and python
03:21 PM vmt: diip: it compiles to... ta-da, the wasm format
03:21 PM polprog: vmt: php for web crap, python for some data analysis dirty work and perl for usual stuff
03:22 PM diip: polprog: JS 6, javascript 7 ?
03:22 PM vmt: it's not machine code.
03:22 PM polprog: diip: umm, might got lost there lol
03:22 PM vmt: polprog: okay, so why perl and python
03:22 PM polprog: just told you
03:22 PM diip: virtual machine code?
03:22 PM vmt: they really both operate in the same space
03:22 PM vmt: diip: something the whatever wasm execution environment can run
03:22 PM polprog: yeah but python has some bunch of data science libs
03:23 PM polprog: and people i work with dont write perl
03:23 PM vmt: something they came up with. just like js. just different, who cares.
03:23 PM vmt: polprog: you didn't tell me why
03:23 PM vmt: you told me what
03:23 PM polprog: why perl? i learnt it for shits and giggles and started using out of curiosity
03:24 PM vmt: why both perl and python because they occupy exactly the same space
03:24 PM vmt: writing some one-off scripts or proof-of-concept sorts of things
03:25 PM polprog: they dont, and even if perl has stuff like pandas / matplotlib i dont feel like rewriting the whole project in perl
03:25 PM vmt: well i'm sure nowadays python has more stuff available if that's what you're getting at
03:25 PM polprog: nor doing ODBC and mssql with perl
03:25 PM polprog: im not that crazy lol
03:26 PM vmt: yeah, so drop perl
03:26 PM polprog: why? i already know it
03:27 PM polprog: perl sits better with unix stuff
03:27 PM vmt: it doesn't fall into the category of languages you should(/need) to learn
03:28 PM diip: vmt: which is?
03:28 PM vmt: which is what?
03:28 PM diip: what are the languages you should learn?
03:28 PM polprog: whatever comes handy in your tasks
03:28 PM polprog: C is worth learning
03:28 PM vmt: i don't know, it depends what you want to work on, because rarely you get to choose what you use
03:29 PM vmt: unless that is, you work for yourself
03:29 PM polprog: with what i know i can do microcontrollers in the morning for hobby and stuff for clients in the afternoon
03:29 PM polprog: which is webdev, unfortunately
03:29 PM polprog: or rather backend webdev
03:30 PM vmt: but i mean, i would say learning languages in the same space would be slightly counterproductive
03:30 PM polprog: who am i kidding, i already took money for the backend, ill have to do frontend as well
03:30 PM vmt: like perl and python, go and rust, err c# and java
03:30 PM diip: I don't see perl and python as the same space
03:30 PM polprog: me neither
03:31 PM diip: but I don't know any perl
03:31 PM vmt: do tell me how they differ
03:31 PM polprog: perl is definitely better in text parsing
03:31 PM vmt: they're both fucking scripting languages, and python can get just as easy with it with the gazillion libs you can use
03:31 PM diip: from what I've heard perl for text only
03:31 PM polprog: so is bash, and JS
03:31 PM diip: python covers quite a bit more
03:32 PM polprog: thats true
03:32 PM vmt: JS is mostly used for web shit. you cannot do web frontend niggering with python or perl.
03:33 PM vmt: bash, sure
03:33 PM diip: but you can do perl and python stuff with JS I guess
03:33 PM polprog: possibly
03:33 PM vmt: irrelevant, you can't turn that the other way around.
03:33 PM vmt: ergo, they really do occupy different spaces
03:33 PM diip: don't know JS either which is why I was looking forward to wasm
03:33 PM polprog: if you are working for yourself you can even do i dunno, data science in haskell
03:33 PM polprog: whatever
03:34 PM vmt: of course you can
03:34 PM polprog: but if a client has a mssql based stack then you are going to use c#, or python
03:34 PM polprog: not go on a crusade for perl + mysql whatever
03:34 PM polprog: anyway
03:35 PM polprog: what languages do you know diip?
03:35 PM vmt: as said, what you should learn depends highly on what you want to do, i.e. who you want to work for
03:35 PM diip: what about k?
03:35 PM vmt: also, grasping basics of any language isn't that difficult or time consuming, once you know C, really
03:35 PM diip: polprog: define know?
03:35 PM vmt: that said, learn fortran
03:35 PM polprog: most of them are based on C anyway in this or that way
03:36 PM polprog: diip: wrote something in them, whatever that was
03:37 PM diip: asseblies, C (read and avoid), Java (read and avoid), Python, and the lisps
03:37 PM polprog: i guess python is not that bad for a choice
03:37 PM polprog: why avoid C and java?
03:38 PM diip: and as a lisp user, no they are not mostly based on C
03:38 PM polprog: well lisp is not
03:38 PM polprog: i was to say that, i had no odea youd mention lisp
03:38 PM diip: Java is (insert the worst swear word you cnan think of here)
03:38 PM polprog: i guess i can agree
03:39 PM * polprog did java for 5 years
03:39 PM polprog: as his 1st languagr
03:39 PM polprog: language*
03:39 PM diip: ah yes I used pascal once as well
03:39 PM diip: not an algol fan
03:39 PM polprog: whats wrong with C in your opinion
03:40 PM polprog: algol 68, my grandfather used to program in that
03:40 PM diip: I actually like C's power but I get frustrated debugging it
03:40 PM vmt: do you want to know why?
03:41 PM diip: well algol is C, java pascal etc
03:41 PM diip: why what? and why?
03:41 PM polprog: theres a chapter in unix haters on why c is hard to debug
03:41 PM polprog: its pretty good even
03:41 PM vmt: why do you get frustrated debugging c
03:41 PM polprog: the book is good
03:41 PM diip: you are asking me or telling me why?
03:41 PM vmt: both
03:42 PM diip: polprog: the taught of a better system made me not finish it
03:42 PM diip: vmt: ok, tell me first
03:42 PM vmt: because, as a programmer, you're sub-par
03:43 PM diip: commas
03:44 PM vmt: i don't think there's anything inherently difficult in debugging c
03:44 PM polprog: it just takes some practice using GDB/whatever
03:44 PM vmt: when you have a front-end that can do its business. sadly, these mostly exist for windows only
03:44 PM polprog: as C memory has no meta information about variables or structs
03:44 PM polprog: and is just one big pile of bytes really
03:45 PM polprog: unless you have the source code
03:45 PM vmt: metainfo? RTTI?
03:45 PM polprog: yeah
03:45 PM vmt: fuck that
03:45 PM diip: literally commas I can't stand them in programming
03:45 PM polprog: explains why you like lisp
03:45 PM diip: why I will forever be grateful to steve russel
03:46 PM vmt: syntax is mostly irrelevant
03:46 PM vmt: until we get to lisp
03:46 PM vmt: (((((((((((((())))))))))))))))))))))
03:46 PM diip: I can use GDB, use it with assembly
03:47 PM polprog: yeah so if you load a c program to gdb...
03:47 PM vmt: you must despise writing asm because of all the commas
03:47 PM vmt: commacommacommacommachameleon
03:47 PM diip: no funnilly enough because it is only one a line
03:47 PM diip: ah yes and I forgot forth
03:48 PM vmt: why is it you put such an empasis on syntax?
03:48 PM diip: I wrote forth in assembly
03:48 PM vmt: emphasis, even
03:48 PM diip: because I have to spend hours looking at the code. I did not even know what the problem was till I found lisp
03:48 PM vmt: why is it a problem, though?
03:49 PM diip: and bash becuase linux
03:49 PM diip: because a list written with whitespace is a lot nicer and easier to debug
03:50 PM vmt: "nicer" i get because it's very subjective, easier to debug i would strongly disagree, even on a subjective level
03:50 PM diip: this does not negate your statement of my being subpar but I can be subpar in any language :)
03:50 PM diip: you can debug what you can see. why put whitespace between elements if you are using a comma as well?
03:51 PM vmt: commas are used in natural languages too in separating back-to-back items, or well, lists. it would only seem natural for a programming language to use them for this exact same thing
03:51 PM diip: no it would not
03:51 PM diip: a programming language is not spoken
03:51 PM vmt: it most definitely would, and it provides you with a visual cue of separation
03:51 PM vmt: if we want to dig down on this
03:51 PM diip: space provides that
03:52 PM vmt: spaces occur everywhere in a program, commas do not
03:52 PM polprog: its easier to read well formatted code
03:52 PM vmt: well, in source code anyway
03:52 PM diip: so why add cancer of the semicolon(and comma)
03:52 PM polprog: why add so many parens
03:52 PM diip: why fill code with unneccsary bits and bobs
03:53 PM polprog: they are the same kinda cancer
03:53 PM vmt: like i said. commas give you a visual cue of separation
03:53 PM polprog: basic doesnt need any of that
03:53 PM vmt: as do semicolons
03:53 PM diip: parens are neccesary to identify begin and end
03:53 PM vmt: if you're talking about easy to debug code, then fuck you and fuck lisp x10
03:53 PM polprog: lol
03:54 PM vmt: your eyes must be funny.
03:54 PM polprog: well, semicolons are mecesary to identify the end of statement, what sorta discussion is that
03:54 PM diip: basic yes I used that once but I ended up agreeing with lisp
03:55 PM polprog: ill take out all parens from your list and you take all semicolons and commas from my C and im sure they will work equally well
03:55 PM diip: yes but parens are more visual and hence easier to debug. also only one problem to look out for
03:55 PM polprog: lisp*
03:55 PM diip: other than bad code
03:55 PM vmt: in any case, programming should be about functionality (and performance, really) and not about worrying about irrelevant syntactic sugar
03:55 PM vmt: or lack thereof
03:55 PM polprog: yeah, a good programmer will write in whatever language
03:55 PM vmt: a good programmer won't write in whatever language
03:55 PM polprog: you need to differentiate programming and coding
03:55 PM diip: maybe I can't disagree
03:56 PM polprog: wjatever language does the job the best
03:56 PM polprog: i meant
03:56 PM vmt: i'd disagree there too, but that would be a very long discussion
03:56 PM diip: Have you seen k? Artur Whitneys language?
03:56 PM polprog: nope
03:56 PM diip: have you seen his code? amazing
03:56 PM polprog: ok, anyway,
03:57 PM polprog: is it like the glorious V language?
03:57 PM diip: he is definately a good programmer and has rewritten lisp and C to every symbol as a function
03:57 PM diip: no it is the succesor to J
03:57 PM diip: succesor to APL
03:57 PM vmt: "The following expression sorts a list of strings by their lengths: x@>#:'x"
03:57 PM polprog: i wouldnt call that good then
03:57 PM diip: but only with ASCII
03:57 PM polprog: jesus fuck
03:57 PM vmt: yeah, this seems amazing
03:57 PM polprog: thats some self harm
03:57 PM vmt: needs more special characters
03:57 PM diip: why is it not good
03:58 PM polprog: because its not focusing on the solution
03:58 PM vmt: the following expression calculates the meaning of life: x@>ʒ$£@|:)(=?@@$€
03:58 PM diip: how not it is only focused on the solution
03:58 PM polprog: instead developing stuff that will take ages to understand for another person
03:59 PM vmt: "the logical successor to J would be K":DDDD
03:59 PM polprog: theres a reason why apl failed
03:59 PM diip: I agree with that but it does not make the code bad or his style less focused on a solution
03:59 PM vmt: i'm gonna go with polprog on this one
03:59 PM diip: yes apl is horrible I agree too much trash
03:59 PM vmt: diip: in general, the problem is makeshift
04:00 PM diip: but k gets it right except I like whitespace for readability
04:00 PM polprog: i dont understand the mindset of some people who produce code thats hard to read on purpose
04:00 PM diip: makeshift
04:00 PM vmt: i don't understand the mindset for people to create new languages just because
04:00 PM polprog: its not a temple in the himalayas full of monks
04:00 PM diip: it is not hard to read on purpose. it is fast to write on purpose
04:01 PM polprog: its to get the job done and when youre gone there are other people to take over your work
04:01 PM vmt: but practically, that's impossible to read for anyone not invested in the language.
04:01 PM polprog: and if they cant extend it (for example because the code is shit) they will just wipe it and redo
04:01 PM diip: good lispers (not me) claim a lot of programming languages are still used because they like debugging each others code
04:02 PM diip: vmt: any language is
04:02 PM vmt: diip: no.
04:02 PM diip: ok lisp :)
04:02 PM vmt: no.
04:02 PM polprog: because we have to debug each others code lol
04:02 PM vmt: diip: a lot of programming languages are used because legacy fuckery.
04:02 PM diip: no
04:02 PM polprog: youre not the only programmer on planet earth
04:02 PM vmt: basically what polprog said
04:03 PM diip: if you learn k, I am sure you can debug it.
04:03 PM vmt: duuuuuuude
04:03 PM polprog: why would i learn k
04:03 PM vmt: you appear confused
04:03 PM diip: a lot of programming languages are used because of marketing fuclery
04:03 PM polprog: i dont care for fast to write
04:03 PM diip: l = k
04:03 PM diip: lisp is legacy, fortran is legacy
04:04 PM diip: C is ATandT Java - Sun
04:04 PM diip: C# - micro
04:04 PM vmt: i'd say the amount of programming languages used due to sheer marketing is quite small
04:04 PM diip: python - Google
04:04 PM vmt: mostly C# really
04:04 PM vmt: beacuse of *pure marketing*
04:04 PM polprog: i tought googles pet was Go
04:04 PM vmt: because, even.
04:04 PM diip: Go is part 2
04:05 PM vmt: sure, but there isn't an active marketing push for python nor go
04:05 PM vmt: whereas ms pushes c# like no tomorrow
04:05 PM polprog: yeah thats right
04:05 PM vmt: i figure one day they'd like to drop c++ from msvs altogether, rofl
04:05 PM diip: no but all those python libraries had to come from somewhere
04:05 PM vmt: not because of marketing
04:06 PM vmt: more like because of the FOSS-github-cult
04:06 PM diip: anyway Artur is not a subpar programmer and K is a lisp
04:06 PM diip: Arthur
04:06 PM vmt: i don't know him or his works, so i can't tell
04:07 PM vmt: but why did he feel the need to spend his efforts on a programming language which is both useless and not used?
04:07 PM diip: ask jpmorgan
04:07 PM polprog: yeah
04:07 PM diip: it is used for investment banking. fast and responsive
04:07 PM vmt: that's what i meant, when i said the problem he created was... well, makeshift is the wrong term. artificial would be more correct
04:07 PM vmt: it is now? show me
04:08 PM polprog: its an interpreted language isnt it
04:08 PM diip: makeshift?
04:08 PM diip: yse
04:08 PM diip: yes
04:08 PM polprog: cant be faster than compiled ones
04:08 PM vmt: most likely not even faster than "managed" langs with huge runtimes
04:08 PM vmt: like C#
04:08 PM vmt: ;D
04:09 PM vmt: also i want to know where exactly is this Klang used in
04:09 PM diip: I can't say how fast it is I meant it is fast to write
04:10 PM polprog: are they doing programming races
04:10 PM vmt: :D
04:10 PM diip: https://kx.com/
04:10 PM diip: no but time is money to these types
04:11 PM vmt: i would say, the cost-benefit analysis for needing insanely niche developers who know this language through-and-through, vs the time saved when instead of 100 characters you can write 4 gibberish ones, tells a different story.
04:11 PM diip: he is on version 7
04:11 PM polprog: i guess vmt is right
04:11 PM polprog: definitely niche
04:11 PM vmt: niche doesn't even start to describe it
04:11 PM vmt: it's way beyond that
04:11 PM polprog: yeah
04:11 PM diip: maybe but the "developers" are stock market dudes
04:12 PM polprog: stock market people type that?
04:12 PM vmt: you're telling me that with a straight face?:D
04:12 PM diip: niche does not mean not useful
04:12 PM polprog: they cant afford the time to learn and memorize all the incantations LOL
04:13 PM diip: yes but if you only need one language and the choice is btw that and C++ ....
04:13 PM vmt: KDB which is their DB which they really sell
04:13 PM vmt: As of mid 2018, Kx released a ‘Fusion’ initiative to increase the interface options for kdb+[20]. These include:
04:13 PM diip: Look I can't speak for the language use I am not in stocks
04:13 PM vmt: Python
04:13 PM vmt: Java
04:13 PM vmt: R
04:13 PM vmt: Kafka
04:13 PM vmt: C#oh wow, seems like K isn't that popular, woo!
04:13 PM vmt: Jupyter
04:13 PM vmt: C# being the last on the list
04:14 PM vmt: I wonder why they did this, because K is so vastly superior to all of these
04:14 PM vmt: not to mention Q. Jeez, Q is the bomb!
04:14 PM diip: I agree with the writer about syntax, if you use a comma make it mean something
04:14 PM diip: I though syntax didn't matter?
04:14 PM diip: thought
04:14 PM vmt: first of all, it's an interpreted language
04:15 PM vmt: second of all, yes it does matter when it gets convoluted like shit. i already told you, lisp e.g.
04:15 PM diip: I like lisp and it simple parens
04:15 PM polprog: i wouldnt call lisp simple
04:15 PM diip: and whitespace
04:15 PM diip: the syntax is
04:15 PM polprog: just for the counterintuitive RPN
04:15 PM vmt: (mostly) anyone can read a language the syntax of which derives from C
04:15 PM vmt: (nearly) nobody can read fucking K
04:16 PM polprog: sorry, i meant PN not RPN
04:16 PM diip: reading, typing and debugging are all different things
04:16 PM vmt: so first you're whining because you can't debug c and because commas are confusing?
04:16 PM diip: I prefer polish notation as well actually
04:16 PM vmt: then you're telling me it's alright as long as you can write a language fast?
04:16 PM diip: frustrating, not confusing
04:16 PM polprog: theres a reason polish notation is not used in maths that often
04:16 PM vmt: like $£@$@£@ there depth-first traversal of a B-tree
04:17 PM diip: I don't use K
04:17 PM diip: I use lisp
04:17 PM vmt: you sure as hell are promoting K for its "effectiveness"
04:17 PM vmt: you're only contradicting yourself and it's starting to get really tiring.
04:17 PM diip: like I said I would prefer whitespaces in K
04:17 PM diip: like forth
04:17 PM diip: I said his code was amazing
04:17 PM diip: and he wasn't subpar
04:17 PM vmt: his code is worthless because it doesn't even aim to solve a problem.
04:18 PM vmt: only to generate one.
04:18 PM polprog: he's not, but thats coding for the sake of it
04:18 PM diip: it solves his problem and fast
04:18 PM polprog: yeah what vmt said
04:18 PM vmt: no.
04:19 PM polprog: lisp is an old language. it was made to be easy to parse for machines
04:19 PM diip: no it wasn't
04:19 PM vmt: it generates a whole host of problems because now he pushes his solution to the market and expects people to conform to it. this is all voluntary, obviously. but that on its own only goes to show further how it doesn't solve any problems at all.
04:19 PM polprog: if i was doing a shell for an embedded system that was meant to be small i would use rpn just because it only takes a stack to parse and execute it
04:20 PM polprog: diip so you know what a lisp machine was
04:20 PM diip: lisp was meant to be m-expressions but Steve Russel made S-exp
04:20 PM polprog: lisp interpreter can be summed up in one sentence
04:20 PM diip: I have heard of the lisp machine
04:20 PM polprog: and can be probably done in hardware
04:21 PM polprog: lisp is as easy as 123 to parse for a machine
04:21 PM diip: my stack parses lisp better than C
04:21 PM polprog: youre just confirming what i wrote LOL
04:21 PM polprog: thats cause lisp is super simple to parse
04:21 PM polprog: it was made with that in mind
04:22 PM diip: maybe if people hadn't been so eager to make programming like "spoken" languages it would be easier for them as well
04:22 PM diip: plus BODMAS or PEDMAS is thaught not a natural law
04:22 PM polprog: i dunno, maybe people parse languages that look like spoken easier?
04:23 PM diip: it can not look like a spoken language because the languge is spoken
04:23 PM polprog: because you say tony is stupid not is tony stupid
04:23 PM diip: spoken writing was invented to look like spoken languages
04:23 PM diip: in English
04:23 PM polprog: thats why its easier to parse 2+3 than (+ 2 3)
04:23 PM polprog: for a human
04:24 PM vmt: exactly.
04:24 PM diip: the Japanese would disagree to my knowledge
04:24 PM polprog: and its people who write the programs
04:24 PM vmt: are you japanese?
04:24 PM diip: add 2 to 3
04:24 PM diip: not Japanese
04:24 PM vmt: were programming languages created by the japanese, for the japanese? do the majority of natural languages share similarities with japanese?
04:24 PM diip: add 2 3
04:24 PM polprog: thats machine speak
04:25 PM vmt: i don't even know how the japanese language works, nor do i care...
04:25 PM vmt: but you're telling me again, a niche should dictate the majority?
04:25 PM diip: maybe the human machine if not miseducated might function beter
04:25 PM vmt: the majority of natural languages aree to 2 + 3.
04:25 PM diip: ask the English Empire
04:25 PM polprog: programming is highly abstract already, why complicate it
04:26 PM vmt: again, you're pulling in completely abstract and irrelevant things
04:26 PM vmt: anecdotes which you think serve as arguments
04:26 PM diip: exactly it is abstact why complicte it
04:26 PM vmt: to what end, i'm not exactly sure. just to be different?
04:26 PM diip: why make maths like a spoken language
04:26 PM polprog: using 2+3 in maths then not using it in programming is the unnecesary complication
04:27 PM diip: just do the maths
04:27 PM vmt: because it's the easiest for people to understand.
04:27 PM vmt: because languages are the way they are. if you want to change them, well you have to rewind the clock back quite a bit.
04:27 PM diip: maybe PEDMAS is nto the best oslution
04:27 PM polprog: because you parse spoken languages in hardware so to speak
04:28 PM diip: which languages are the way they are?
04:28 PM diip: all are human inventions
04:28 PM vmt: every language in existence.
04:28 PM polprog: the glyphs on your screen make sense because you read them in your head, then parse the imaginary sounds
04:28 PM diip: yes
04:28 PM vmt: diip: so i finally get you. your whole view boils down to just being different
04:28 PM polprog: yeah
04:28 PM diip: but that does not make it a logical way to look at the problem
04:28 PM polprog: but its the easiest
04:28 PM diip: I wish it was just me trying to be different
04:29 PM vmt: you refuse to deal with the reality because some abstract (not even tested) idea you hold might be better?
04:29 PM vmt: first of all, what basis do you have for any of it to be better
04:29 PM diip: what abstract Idea?
04:29 PM vmt: for example converting languages to using rpn???
04:29 PM polprog: people build abstractions on top of other abstractions. there is no point in making abstraction disconnected from what you already are used to
04:29 PM diip: I prefer it. maybe I am just different I am not trying to be if I am
04:29 PM Smidge204: What method would be best to check/verify the clock frequency? (attiny814). I'm toggling a pin on and off and I'm getting 3.7MHz based on 1 clock per instruction. Even knowing that the perephrial clock and main clock aren't the same, that number doesn't make sense
04:29 PM vmt: you're a moron.
04:30 PM polprog: Smidge204: try a timer
04:30 PM vmt: i'm starting to grasp also why you like the K-guy so much
04:30 PM polprog: Smidge204: in waveform generation mode
04:30 PM diip: most languages use function args in everything apart from the math
04:30 PM diip: so maybe that is natural
04:30 PM diip: I keep saying maybe you say things must be so.
04:31 PM vmt: i keep saying how things are
04:31 PM Smidge204: So have the timer generate a square wave and try to divine the rfequency from that... worth a shot
04:31 PM vmt: and you keep saying maybe you're unorthodox take might be better just because it's different
04:31 PM vmt: your* even
04:31 PM diip: but your athority is based on opinon
04:31 PM vmt: no, my assertions are based on reality
04:31 PM polprog: Smidge204: yeah exactly :) easier to do than tracing assembly instructions.
04:31 PM polprog: Smidge204: also branches dont take 1 clock cycle
04:31 PM Smidge204: Well I'm writing it in assembly so that's not a problem
04:31 PM diip: I never said anything was better because it is different
04:32 PM vmt: you keep contradicting yourself on so many levels
04:32 PM diip: I tried to expain why I (personally ) like certain thing better
04:32 PM vmt: and the majority of people do not agree with that. which is also why the reason nobody in this fucking world uses K
04:32 PM vmt: or J, K, L, Q or fucking P
04:33 PM vmt: anyway, i'm gonna bail before i contract aids from this discussion
04:33 PM diip: that is not the point
04:33 PM polprog: ill hit the bed soon as well
04:33 PM vmt: toodles.
04:34 PM diip: hyvää yötä
04:34 PM Smidge204: https://pastebin.com/iWkdKuKM Test code, crafted to eliminate branch instruction time :p
04:34 PM polprog: Smidge204: that should work, youll get bursts of square wave
04:35 PM Smidge204: My assumption that the pin will be high for 1 clock, low for 1 clock
04:35 PM polprog: how are you measuring the frequenct
04:35 PM polprog: frequency*
04:35 PM diip: vmt: I said Artur was not subpar and that I personally like whitespace
04:35 PM polprog: never said he was subpar
04:35 PM Smidge204: https://i.imgur.com/CpVEhGu.png LIke this
04:36 PM diip: also lisp is PN not RPN. I tried forth and could not use it
04:36 PM polprog: diip: yes i crrected myself
04:36 PM polprog: Smidge204: that should work
04:36 PM Smidge204: So the clock is 3.7MHz?
04:36 PM diip: I don't think lisp is better (or worse) I just don't use algol decendants regardless of majority
04:36 PM diip: not of that is contradictory
04:36 PM polprog: what clock have you got set ?
04:37 PM diip: polprog: not you vmt
04:37 PM polprog: 8M
04:37 PM polprog: ?
04:37 PM diip: polprog: Thanks for the blog it will be really helpful
04:37 PM Smidge204: I *thought* I set the fuses for 16MHz
04:37 PM polprog: diip: np, feel free to browse
04:38 PM polprog: i think... internal clock?
04:39 PM polprog: i know the internal RC is not the fastest one but im not sure if it can be that much out of whack
04:41 PM Smidge204: Changing the prescaler from 2x to 4x lowers the frequency to 2.17MHz
04:41 PM Smidge204: Maybe 2.2 not trying to be super precise here
04:41 PM polprog: makes sense
04:42 PM polprog: i think you have 8Mhz set and its just on the left side of the gaussian curve
04:42 PM LeoNerd: Smidge204: ATtiny814 starts up with a prescaler of div6
04:42 PM LeoNerd: You'll want to change that
04:42 PM Smidge204: Well I guess I'd have expected doublig the prescaler to halve the frequency?
04:44 PM LeoNerd: Also, nice to see more folks playing with the new xtinies
04:44 PM polprog: gah, youre making me envy
04:44 PM polprog: goodnight folks
04:44 PM Smidge204: 'night
04:44 PM Smidge204: UPDI was kind of a pain to tool up for but it's not so bad after a few bucks worth of parts
04:46 PM LeoNerd: Yah.. I've been making programmers for it
04:46 PM LeoNerd: I have a cheap 5V only one working, and hopefully soon I'll have a 12V kicker version for sale on tindie :)
04:46 PM Smidge204: May that never be necessary :p
04:46 PM LeoNerd: I haven't got software support directly into avrdude yet... I've no idea why they haven't already got it there
04:47 PM LeoNerd: Eh.. I find it useful to put the pin in RESET mode
04:47 PM LeoNerd: Or sometimes GPIO mode if you're on one of the smaller chips - the 412 for example
04:47 PM LeoNerd: Getting a 6th IO pin when you've only got 5 is handy
04:47 PM LeoNerd: Can make all the difference
04:48 PM Smidge204: I use avrdude with a CH340 usb-uart bridge and an arduino pro mini hot glued to it
04:48 PM Smidge204: Gets the job done
04:49 PM LeoNerd: Why do you need the pro mini?
04:49 PM LeoNerd: My cable is literally just a CP2102, doesn't need any other chips
04:49 PM Smidge204: It's what I had
04:49 PM LeoNerd: Literally any USB UART bridge and a resistor is all you need
04:49 PM LeoNerd: UPDI is async serial :)
04:50 PM Smidge204: Yeah, but my intent was to bake in both UPDI and SPI at some point
04:50 PM LeoNerd: Ahh
04:50 PM LeoNerd: Yeah I guess for both you need something fancier
04:51 PM Smidge204: It will probably never happen but at least I left that door open :)
04:52 PM Smidge204: Back to the problem at hand; https://pastebin.com/06Ts8ZpX
04:52 PM LeoNerd: At this point I've decided I'm not going to make anything new on the non-UPDI chips anyhow.. so gradually I'll be migrating all my stuff to the newer ones
04:53 PM LeoNerd: though, currently there's no dual-UART ATtinies :(
04:53 PM LeoNerd: Even the hugeness of the 3217 has only one
04:53 PM Smidge204: I guess they figure it's not enough demand
04:54 PM LeoNerd: The newer ATmegas - 3208 et.al. have three
04:54 PM LeoNerd: I'm still waiting on what I presmue will be an ATmega xx1n series of chips too
04:56 PM Smidge204: Okay so I'm satisfied that the internal clock is running at ~8MHz
04:56 PM LeoNerd: 8? Of what..?
04:56 PM djph: LeoNerd: 1-series megas would be nice ...
04:57 PM LeoNerd: That said I don't know what they'd add on top of the 0-series
04:57 PM djph: though i only have played with the 416-xplained
04:57 PM LeoNerd: About the only notable difference between the 0- and 1-series ATtinies is the addition of the TCD, and that's less interesting on the larger megas
04:57 PM djph: LeoNerd: pins? :D
04:57 PM LeoNerd: Usually just used for H-bridge drivers
04:58 PM LeoNerd: Nah - if you compare the 0 and 1- series ATtinies, for a given size they're still all the same pin count
04:58 PM djph: dunno; I barely use any of the fun features
04:58 PM LeoNerd: I'm verymuch liking the fractional baud generator on the UART
04:58 PM LeoNerd: Means I can get that lovely 115.2k without needing a silly timing crystal
04:59 PM LeoNerd: I keep meaning to write a blog post about the new chips, and what I like / don't like about them
04:59 PM LeoNerd: There's only a couple of small bits I dislike; the rest is all quite good
04:59 PM djph: i really need to get more boards (or ...???) so I can really sink my teeth into the usarts
05:00 PM LeoNerd: I offer a (nearly) full range of them on tindie :)
05:00 PM djph: ha
05:00 PM LeoNerd: 814, 1616, 3217,... and I should have the little 412 in a week or so, once the boards actually arrive
05:01 PM djph: nice
05:02 PM djph: i have the xplaine nano; though I think i need to pair it with something like a 32u4 or something so I can print serial back to the pc ...
05:02 PM LeoNerd: My only complaints about the chips so far, are: that UPDI activation is only reset by POR, nothing else; and the lack of xtal oscillator for main CPU clock
05:03 PM LeoNerd: Surely any USB-UART bridge would do that? I have about 6 of the things of various kinds, lying around
05:09 PM Smidge204: Okay this is special... I tried every prescaler option and I don't know what to make of the results... https://i.imgur.com/hWRp1CP.png
05:11 PM LeoNerd: What is the `f` you are measuring there?
05:12 PM Smidge204: the first f is what's reported by my scope, which is a full cycle of the square wave
05:12 PM Smidge204: Which is two instructions, so that's effectively half the frequency (asusming 1 clock cycle per instruction)
05:13 PM Smidge204: Then I multiply that by the prescaler which should be the main clock frequency unless I'm too confused
05:14 PM LeoNerd: How are you gneerating the frequency?
05:14 PM LeoNerd: (don't forget that JMPs take two cycles)
05:14 PM Smidge204: https://pastebin.com/iWkdKuKM
05:17 PM LeoNerd: Hrm.. well aside from the JMP that should be fine
05:17 PM Smidge204: the JMP is obvious too, so I know to stay away from that when measuring
05:18 PM Smidge204: https://i.imgur.com/KJGf0s6.png Like so
05:19 PM LeoNerd: Righty
05:28 PM Smidge204: If I understand this right, I should be setting a value of 0x8a into the OSCCFG fuse register, which is fuse2 in avrdude
05:29 PM Smidge204: Unless there's no fuse0
05:29 PM LeoNerd: Where did 0x8a come from?
05:29 PM LeoNerd: For the t814 only bits 7, 1,0 appear to be defined
05:30 PM Smidge204: Right, so 0x81 is 10000001 in binary; that sets OSCLOCK to 1 and FREQSEL to 01 (for 16MHz)
05:31 PM LeoNerd: Looks good
05:31 PM LeoNerd: (presuming you want to lock calibration)
05:31 PM Smidge204: I certainly don't want to change it
05:32 PM Smidge204: So fuse0 would be watchdog timer config, right?
05:33 PM LeoNerd: I don't know what avrdude calls it
05:33 PM LeoNerd: But the first fuse, at offset 0, is `WDTCFG`
05:33 PM Smidge204: ya
05:34 PM Smidge204: Assuming that's fuse0 then OSCCFG is fuse2
05:34 PM Smidge204: lemme try reading the fuse state back out
05:45 PM djph: LeoNerd: yes, usb-uart would; but I want to talk between microcontrollers, not "pc and microcontroller" (if that makes sense)
05:47 PM djph: ultimately; the project I have in mind is two (or three) microcontrollers communicating
05:53 PM Smidge204: okay this is interesting... the last fuse byte is a offset 0x0A but avrdude can't seem to access it
06:11 PM Smidge204: oooookay the attiny814 doesn't have a 16MHz clock, just a 20MHz one
06:11 PM Smidge204: This is what I'm gleaning from the tn814def.inf file anyway
06:38 PM djph: Smidge204: not internally, anyway
07:06 PM Smidge204: Okay well, I got thye USART timing working within ~1% of 9600 BAUD
07:07 PM Smidge204: I ended up just shotgunning values into the USART BAUD registers and the final values make no sense whatsoever
07:07 PM Smidge204: But it works so fuck it
07:11 PM cehteh: lol
07:12 PM cehteh: sounds like the mcu runs at the wrong clock/clocksource like 8mhz int divided by 8 or or so
07:23 PM Smidge204: omg it works
07:23 PM Smidge204: happy days
11:51 PM day__ is now known as day