#avr Logs

Jan 24 2021

#avr Calendar

04:06 AM Helle: hey, I am looking at the ATTiny814 and those ofcourse have both "core independent peripherals" and a new programming interface
04:12 AM Helle: now, first thing, is there any gotcha using the open source toolchains with those? or is everything working and there are full header files and all (except for QTouch and maybe the CCL ofcourse)
04:12 AM Helle: Aaaand, anyone know a cheapy programmer? ideally one with HV capability for UPDI, my AVR programmer for choice has so far been a USBTinyISP with a good old STK-500 as fallback if I needed HV programming (ATTiny85's with reset as I/O mainly)
04:44 AM rue_mohr: gcc and nedit
04:44 AM rue_mohr: and make
04:45 AM rue_mohr: with avrdude
04:45 AM rue_mohr: cheap programmers, you can use a few usb hubs, a parallel port, a serial, port, or an pata port
04:45 AM Helle: so yes, there is full support
04:45 AM rue_mohr: you can also use an arduino
04:46 AM Helle: also appaerently the answer to cheap programmer is any TTL serial and a resistor, unless I need HV programming, which appaerently Microchip has fucked up
04:46 AM rue_mohr: that makes sense
04:46 AM rue_mohr: I completely avoid HV programming
04:47 AM rue_mohr: and microchip fucks things by policy, so move over to stm32
04:47 AM Helle: It's lovely how fucked up it is, with different timings and behaviours from chip to chip
04:47 AM rue_mohr: stm32, a tiny bit more cost, and 72Mhz
04:47 AM Helle: rue_mohr: wanted to avoid doing that for this, I really don't need much and I'd like the robust I/Os
04:48 AM rue_mohr: ok, and programming stm32's takes a LOT more setup
04:48 AM rue_mohr: but yea
04:48 AM Helle: and yes, STM32s basically replaced ATMega in my toolkit, because of Microchip fuckery
04:48 AM Helle: but ATTiny's are a little harder to replace
04:48 AM rue_mohr: yea :(
04:49 AM rue_mohr: I'm hunting for something in that 14 pin area
04:49 AM rue_mohr: but prefably at less than $1 ea
04:49 AM rue_mohr: I'm still finding a place for fpgas
04:50 AM Helle: my other option is MSP430
04:50 AM rue_mohr: and I might have to move away from 5V logic :/
04:50 AM rue_mohr: oh yea they make those small msp430s
04:50 AM rue_mohr: and 8051 is quite strong latley
04:50 AM Helle: 8051 is a paaaaain
04:50 AM Helle: MSP430 is also tolerable in terms of development tooling
04:51 AM rue_mohr: yes, but I ask you, MORE than all the clock initialization code for an stm32?
04:51 AM Helle: eeeeh
04:51 AM Helle: yes
04:51 AM rue_mohr: I mean, dear god, how many clocks can one system need to have enabled!
04:52 AM rue_mohr: I moved a fn to an alternate pin and it didn't work cause I had to turn on a clock just for moving it
04:53 AM Helle: but generally, I avoid 5V already, 3.3V is high :P though sometimes you just have to interface with old stuff
04:53 AM rue_mohr: I'm still mostly standing on 5V platforms
04:54 AM rue_mohr: I have a QMtech spartan6 board, and I'm sure glad it goes all the way up to 3.3v!
04:54 AM rue_mohr: :/
04:54 AM Helle: I always cringe at Arduino "compatible" devkits, because that means I have to make sure it doesn't expect or worse, give me, 5V
04:54 AM Helle: also with MSP430 you get to have FRAM on the recent parts
04:54 AM rue_mohr: hah, cool
04:54 AM rue_mohr: do you do msp430 under linux?
04:54 AM Helle: yep
04:55 AM rue_mohr: gcc/make?
04:55 AM Helle: official toolchain for the few times I've used it so far
04:55 AM Helle: it works, bit bulky
04:55 AM rue_mohr: whats used to program them? $$$?
04:56 AM Helle: rue_mohr: there is now full gcc support for it
04:56 AM Helle: so I am probably switching to that if I do use them
04:57 AM Helle: But thanks for reminding me to check for slightly less whacky MCUs, I always forget that I have most of the stuff for MSP430
04:57 AM Helle: (need to check if my programmer can do the current gen of them)
04:58 AM Helle: rue_mohr: oh, for you, MSP430 in most cases is 5V tolerant I/O
04:58 AM rue_bed: is msp430 jtag programming?
04:59 AM Helle: rue_mohr: UART, JTAG or SBW
04:59 AM Helle: I think my programmer uses SBW
04:59 AM rue_bed: ah, do they have a fixed-in serial bootloader?
05:00 AM rue_bed: https://www.aliexpress.com/item/32922499511.html
05:00 AM rue_bed: hmmm
05:00 AM Helle: https://www.ti.com/lit/ug/slau319ad/slau319ad.pdf?ts=1611408146683
05:01 AM rue_bed: https://www.aliexpress.com/item/1005002044697066.html <- ~$1ea...
05:02 AM Helle: cheaper from TI :P
05:02 AM rue_bed: in volumes of 10?
05:03 AM Helle: iirc the most basic device is sub $1 in qty 10
05:05 AM rue_bed: ah, TI wont sell them as DIP tho will they...
05:06 AM Helle: They do offer PDIP of some models ?
05:06 AM rue_bed: hmmm
05:06 AM Helle: most of them come in TSSOP or the like, which is not too bad to solder to a little adapter if need be
05:06 AM rue_bed: I wonder what the odds are I can recycle an msp430 out of something
05:07 AM rue_bed: I'm sure I'v seen some on some hard drives
05:07 AM rue_bed: hmmm
05:07 AM rue_bed: do I need another controller to play with?
05:08 AM Helle: not for the BSL I think
05:08 AM Helle: TI also sells their own cheap kits
05:08 AM rue_bed: hmm
05:09 AM rue_bed: I'll see if I have any and explore out from there maybe
05:09 AM rue_bed: gnight
05:12 AM rue_bed: heh, 8051 with 8 bit adc, heh
05:13 AM rue_bed: https://github.com/wuxx/nanoCH55x/software
05:03 PM vmt: LeoNerd: i'd like to bother you for one more thing wrt. vtxxx, as you seem very well-versed in the subject. i know you can set a vertical scroll rect, but is there anything with which you can set horizontal margins as well?
05:40 PM LeoNerd: vmt: DEC VT... something later than 300. maybe 500 or so, defined VSSM, vertical splitscreen mode.. when enabled you can set arbitrary rectangles
05:40 PM LeoNerd: libtickit already uses that if available, to do arbitrary scrolling regions
05:52 PM vmt: thank you kindly yet again!
05:55 PM vmt: it seems there isn't much support for that, apart from xterm
05:56 PM LeoNerd: xterm and friends, and most of the modern terminals (my own libvterm / pangoterm, kitty, iTerm2, ...)
05:58 PM vmt: support for that simplifies drawing by quite a lot. you can just blit things wherever from a buffer, which no doubt you do with libtickit
06:00 PM vmt: but then again, it just kind of kicks line wraps further down to road to the terminal itself
06:00 PM vmt: either or, thanks!
06:11 PM twnqx: is that for avr over serial, or some native piece of software?
06:17 PM vmt: twnqx: ah, this is posix, not related to avr whatsoever. but it's just a handy place to get in touch with paul :D
06:19 PM twnqx: in that case i would like to point out the (n)curses is pretty nicely abstracting all of that for you
06:20 PM vmt: yes, i'm aware. but if i was to use a library, i would definitely use libtickit rather than ncurses
06:26 PM twnqx: which then sits between your program and the libtermkey - ncurses stack :P
06:26 PM twnqx: but hm, gonna take a closer tlook tomorrow, ncurses directly is not the nicest thing to program
06:26 PM LeoNerd: Hah... ncurses is late-80s and has no idea about any of the modern fancy things like VSSM or alternate mouse encodings or... italics..
06:26 PM LeoNerd: 256 or 24bit colours
06:26 PM vmt: twnqx: nope.
06:27 PM twnqx: do you use terminfo directly, then`
06:27 PM twnqx: ?
06:27 PM twnqx: or how do you support all of the hundreds of terminals
06:27 PM LeoNerd: In places... but terminfo is lacking a lot of data
06:27 PM LeoNerd: "hundreds". hah. if they support fancy things, they do it in a standard way
06:28 PM LeoNerd: and terminfo knows nothing about it
06:28 PM vmt: twnqx: also, there's nothing inherently wrong with ncurses, apart from the biggest painpoint with terminals, which is input handling
06:28 PM twnqx: though admittedly i don't care beyond urxvt and linux tty
06:28 PM vmt: the input handling in ncurses is dogshit, and that's probably an overestimation
06:28 PM vmt: even when you use ncurses, you'd be far better off using something else for that, or then doing it yourself
06:28 PM twnqx: maybe, my program only receives signals and displays interpreted data from a serial port
06:29 PM vmt: and that would pretty much mean libtickit
06:29 PM LeoNerd: terminfo grew out of termcap which honestly was mostly a database of things not to tell your glass-and-phosphor teletype machine to do because it would crash
06:29 PM twnqx: hm, i thought it was a "how to do X if it is supported" thign
06:30 PM LeoNerd: vmt: also, #tickit may be more appropriate for questions ;)
06:30 PM twnqx: input handling is a huge pain anyway, i had "fun" last year writing my first ascii parser after 20 years
06:30 PM twnqx: ansi*
06:30 PM LeoNerd: it kinda is but in practice the strings are always the same
06:30 PM twnqx: except backspaces.
06:31 PM vmt: LeoNerd: thanks!
06:31 PM twnqx: oh, there's a mac? better expect 255
06:31 PM twnqx: *sighs*
06:31 PM LeoNerd: terminfo has lots of old boring things that maybe if you do have a real glass-and-phosphor teletype machine that comes with a physical paper manual, from IBM or Wyse or whatever, then maybe the strings differ
06:32 PM twnqx: but yes, i ignore most of ansi, i just parse enough to eat the garbage and not return it to the termeinal program
06:32 PM LeoNerd: But it's 2021 now. your "terminal" is likely a program that lives in /usr/bin that you compiled from a tarball. those are all the same
06:32 PM twnqx: i know enough collectors of old hardware that would tell you differently :P
06:33 PM LeoNerd: Ohsure - real physical ones do differ
06:33 PM vmt: well, problem solving 101, solve for the most common case first. not the most general one.
06:33 PM twnqx: like the guy who just complained that buillding somethings on his irix/mips is too slow :P
06:33 PM LeoNerd: But those don't do mouse or 256 colours or italics or VSSM or ...
06:33 PM vmt: err i mean. don't try to instantly generalize the problem.
06:33 PM LeoNerd: So they're kinda boring
06:33 PM twnqx: sure
06:34 PM vmt: if you expect your shit to be ran on some actual dec machine and an x86 well...
06:34 PM twnqx: yeah.. i guess i have only arm (which is basically linux), PC and C64 (which doesn't matter for anything)
06:35 PM vmt: mouse coords in any vt are always constrained in 1...255 on both axes right?
06:35 PM twnqx: at least, currently
06:35 PM twnqx: hm. i have way larger VTs than that
06:35 PM LeoNerd: not at all
06:36 PM LeoNerd: can do waaay more columns than that
06:36 PM twnqx: hah
06:37 PM twnqx: midnight commander fails on X > 512
06:37 PM twnqx: funny
06:37 PM twnqx: i guess that's a curses limitation, 512 wide
06:37 PM twnqx: jumps to 80 as soon as i pull the wndow to 513
06:39 PM vmt: i thought the control seqs are always 8-bits wide and reported in some funky fashion with an offset added to them, so in effect it'd be less than 255
06:39 PM vmt: but apparently i was wrong
06:40 PM LeoNerd: The original scheme can't cope with >224 (256-32)
06:41 PM vmt: yeah, that's the one
06:41 PM LeoNerd: xterm's SGR encoding mode fixes that, while adding other abilities too
06:41 PM vmt: twnqx: what kind of monitors are you using?:D
06:42 PM twnqx: 2x 2560x1440
06:42 PM vmt: what's the phys size?
06:42 PM twnqx: 25"
06:42 PM twnqx: sufficient for 568 char wide terminals at my font size (i use neither right nor left borders)
06:43 PM twnqx: fonts for terminals is one of my biggest gripes
06:43 PM vmt: yeah i don't use any borders either, that's almost twice the size i have on a 24"
06:43 PM twnqx: :(
06:43 PM vmt: my poor eyes probably couldn't handle that :D
06:44 PM twnqx: i can't take the blurriness of any truetype font
06:44 PM twnqx: so i am stuck on pixelfonts
06:44 PM vmt: what terminal emu do you use?
06:44 PM twnqx: urxvt
06:45 PM twnqx: aka rxvt-unicode
06:45 PM vmt: i wonder if it does some AA on the fonts?
06:45 PM twnqx: nah, it's a side effect of rendering vector fonts
06:45 PM vmt: well i mean, i'm well aware, most foss stuff uses freetype and its hinter can be configured
06:46 PM twnqx: they simply don't fall perfectly into pixels, so you can AA or end up with even uglier effetcs :P
06:46 PM twnqx: e.g. disappearing or double lines
06:46 PM vmt: you can reduce it with playing around with freetype's settings
06:46 PM vmt: but, rendering really small fonts is problematic to begin with
06:47 PM twnqx: i use a 9x15 font
06:47 PM vmt: yeah, that's pretty damn small
06:47 PM twnqx: still not even 100 lines
06:48 PM vmt: rasterizing vector fonts that is. but, pixel fonts can and probably will get interpolated as well
06:48 PM vmt: though i don't know about urxvt. i use kitty for everything
06:48 PM twnqx: urxvt doesn't have such features. it's ooooold
06:48 PM twnqx: you configure it by editing and reloading your .Xdefaults :P
06:49 PM vmt: kitty is a horrible piece of python mess, but it's still smoother than the competition
06:49 PM twnqx: but at least it lets me override colors to a point where midnight commander isn't the total mess it is with default X colors
06:50 PM vmt: mc, what a blast to the past
06:51 PM twnqx: haven't found a better file manager o linux yet
06:51 PM twnqx: can't take those "drag and drop between two windows with mouse" things
06:52 PM twnqx: https://i.imgur.com/WFrcTVa.png this was one of my last attempts to change terminal emulator
06:52 PM vmt: i use ranger which is another piece of python mess, but it has vim binds so i'm happy
06:52 PM twnqx: :D
06:52 PM vmt: rm -rf /mnt/anime
06:53 PM twnqx: nah