#avr Logs

Aug 19 2020

#avr Calendar

03:12 PM TechChristoph: which microcontrolller from the avr-series do you recommend to start with ?
03:18 PM cehteh: the one that has the features you need
03:18 PM TechChristoph: oh ok
03:18 PM cehteh: the 328p is a good choice because its very common and has enough space
03:18 PM TechChristoph: ok, i start with that
03:18 PM TechChristoph: thank cehteh
03:18 PM cehteh: get some arduino nano clones and go on
03:18 PM cehteh: also except for hardware features AVR's dont differ much
03:18 PM cehteh: only tinys and older cores have some redcued or different instructions and registers
03:18 PM TechChristoph: ok.
03:19 PM TechChristoph: well i have an usbasp in case
03:20 PM LeoNerd: Any of the new UPDI chips are also flashable with just a UART adapter
03:20 PM LeoNerd: (the tiny 0- and 1-series and also mega3208 / 4809 / etc..)
03:21 PM TechChristoph: andok
03:21 PM cehteh: dunno if i invest much into learning the -0 and -1 series
03:21 PM cehteh: i rather going 32bit and leave AVR land. for small things the old ones are nice enough
03:21 PM TechChristoph: my final goal is to understand whats underneath assembly
03:22 PM cehteh: underneatch assembly?
03:22 PM TechChristoph: so far, no one ever answered me that question
03:22 PM TechChristoph: yeah
03:22 PM LeoNerd: ??
03:22 PM TechChristoph: well there must be transistors right ?
03:22 PM cehteh: hardware :D well then you should read about procesor design
03:22 PM LeoNerd: You're not really going to see any of that unless you go in for -building- your own CPU designs out of logic gates or similar
03:22 PM TechChristoph: so how do you programm a mcu even if you don't have a programming language
03:23 PM cehteh: and take a look at risc-v because its an open architecture with some freely available and tinkerable implementations
03:23 PM TechChristoph: so how do you implement a programming language even you don't have one
03:23 PM cehteh: you can get vhdl or other hardeware descriptions and put that on a fpga to get a risc-v core
03:23 PM TechChristoph: yeah i know
03:24 PM TechChristoph: but that is even a language
03:24 PM TechChristoph: you know what i mean ?
03:24 PM cehteh: well even on todays µC there are millions of transistors, no one can cope with programming / connecting that manually anymore
03:25 PM TechChristoph: yeah i know
03:25 PM TechChristoph: i played around with some logic gates
03:25 PM cehteh: there are proven building blocks and hardware languages like vhdl absstract that
03:25 PM TechChristoph: made a adder/subtractor etc.
03:25 PM cehteh: yes its all logic gates
03:25 PM TechChristoph: so how do you implement a programming language for logic gates ?
03:25 PM cehteh: but in such amounts that its not really understandable for a human being
03:26 PM cehteh: you dont
03:26 PM TechChristoph: in the end its all 0 and 1's right ?
03:26 PM cehteh: you make an ISA and implement that
03:26 PM TechChristoph: so how where chips programmed in the beginning ?
03:26 PM cehteh: the isa includes the machine language
03:27 PM TechChristoph: isa stands for ?
03:27 PM cehteh: how the hardware dispatches on instruction buts
03:27 PM cehteh: https://en.wikipedia.org/wiki/Instruction_set_architecture
03:27 PM cehteh: look at brainfuck for example
03:27 PM cehteh: https://en.wikipedia.org/wiki/Brainfuck
03:28 PM cehteh: that gives a good example for a very simple computer (and its machine language and assembly)
03:28 PM TechChristoph: yeah opcode
03:28 PM TechChristoph: and how you get those 0 and 1 into the chip ?
03:29 PM cehteh: logic gates
03:29 PM TechChristoph: programmmable logic gates ?
03:29 PM cehteh: https://en.wikipedia.org/wiki/Arithmetic_logic_unit#/media/File:74181aluschematic.png
03:29 PM cehteh: not programmable
03:30 PM cehteh: at lowest level thats hardwired
03:30 PM TechChristoph: yeah i "programmed one with 0 and 1
03:30 PM TechChristoph: very frustrating to do
03:30 PM TechChristoph: 0 was 0V and 1 was 5V
03:30 PM cehteh: now scale that 100000000000000000000 times more complex
03:31 PM cehteh: and you have a computer
03:31 PM TechChristoph: yeah but it openend my mind
03:31 PM cehteh: there is no magic, just complexity and lots of lots of logic gates
03:31 PM TechChristoph: i got a better understand of whats underneath my computer
03:32 PM TechChristoph: i mean i learned python 5 years ago
03:32 PM cehteh: soem people build old processors in discrete logic for fun
03:32 PM TechChristoph: but it has layers of layers underneath it
03:33 PM TechChristoph: must be very funny to implement a programming language for logic gates
03:33 PM cehteh: thats vhdl
03:33 PM TechChristoph: in the end its al math right ?
03:35 PM cehteh: https://eater.net/8bit/ .. just some random google hit
03:35 PM LeoNerd: 22:00 *** Quits: rjbs [~rjbs@rjbs.manxome.org] (Quit: leaving)
03:35 PM LeoNerd: er... wrong paste
03:36 PM LeoNerd: https://youtu.be/EDQu0msc63E?t=51m06s -- Full Stack in Five Minutes (from that timestamp). You might be amused
03:36 PM cehteh: anyway i am rather more interested in higher level and more modern stuff than building my own cpu :D
03:37 PM TechChristoph: yeah ben eater
03:37 PM TechChristoph: he must be a genius in some way
03:37 PM TechChristoph: well i wann know things from the ground up :)
03:38 PM cehteh: i am happy just knowing the basics, otherwise it would be too much distractions
03:38 PM cehteh: it is a good idea to know these things, but its way too much to go into details
03:45 PM TechChristoph: yeah, must take decades
04:14 PM Evidlo: can anyone remind me of the name of the function that gracefully handles overflows when computing time differences?
05:36 PM cehteh: is there such a thing?
06:03 PM LeoNerd: tv_interval ?
06:19 PM day_ is now known as day
09:39 PM adu: hi
11:10 PM day_ is now known as day