#avr Logs

Nov 26 2017

#avr Calendar

12:50 AM ElementalWarrior: Hi all. I'm having some issues adding an interface to the usb descriptors for an atmega16u2, anyone knowledgeable with this sort of thing
12:53 AM ElementalWarrior: If I increase the TotalInterfaces in the configuration descriptor the usb device stops enumerating
01:42 AM rue_shop3: i dunno
01:42 AM rue_shop3: i use serial usb adapters, they always work
04:07 AM nuxil: polprog, your workbench/desk is a mess :p
06:26 AM polprog: nuxil: but i have all the necesary stuff at hand :0
06:26 AM polprog: ;)
06:27 AM polprog: actually the scope probe cables could be shorter
06:30 AM polprog: Emil: have you seen my blinker?
06:32 AM polprog: Ameisen: asm volatile("rjmp .-2"::);
07:28 AM nuxil: polprog, exaplain your wizardry.. what does that do? relative jump to ?
08:09 AM fooman2011: Hello. I would like to disable the watchdog on my ATtiny2313A. But to do this I need to know the safety level. In the datasheet it says: To prevent unintentional disabling of the Watchdog or unintentional change of time-out period, two different safety levels are selected by the fuse WDTON. Could you please tell me what is a "fuse WDTON" and how to read it ?
08:10 AM nuxil: fooman2011, the watchdog is part of the high fuse
08:11 AM nuxil: watch this.. https://www.youtube.com/watch?v=jP1NTgs-a-s
08:11 AM nuxil: is rellevant for most chips. atiny/atmega
08:13 AM fooman2011: nuxil: Thanks i'm watching it
08:18 AM nuxil: fooman2011, but. isnt the watchdog off by default ?
08:18 AM _ami_: yup, WDT is off by default.
08:27 AM nuxil: i think that video explains the fuses verry good. it should be in the topic :p
08:31 AM nuxil: fooman2011, so if your unsure if your WDT is on or off. check the high fuse by doing something like.. avrdude -c yourprogrammer -p yourMcu -P yourPort -b 10000 -U hfuse:r:-:i -v
08:54 AM Emil: fooman2011 did you figure out what was the issue?
08:55 AM Emil: Casper: >115200
08:55 AM Emil: Please get to the current_year
08:56 AM Emil: minimum of 250k, 500k preferable and 1MBaud if you can
08:56 AM Emil: polprog: what blinker?
09:32 AM _ami_: does anyone know what is the meaning of 'asp' in usbasp?
09:32 AM nuxil: atmel serial programmer ?
09:34 AM _ami_: yes
09:34 AM _ami_: i was just wondering why creater of this programmer named it USB + ASP
09:35 AM nuxil: becayse its for atmel chips? maybe ther is a usbpic ? idk :p
09:35 AM _ami_: and i named my programmer over this programmer :P
09:35 AM _ami_: https://github.com/amitesh-singh/FASTUSBasp
09:36 AM nuxil: you made it ?
09:36 AM _ami_: nuxil: Yup.
09:37 AM _ami_: time to sleep though.
09:37 AM nuxil: what chip do you use for the usb to serial conversion ? a atmel chip using Vusb or some other dedicated chip.
09:37 AM nuxil: ?
09:38 AM _ami_: stm32f103c8t6
09:38 AM _ami_: ARM
09:38 AM _ami_: cm3
09:38 AM polprog: nuxil: relative jump to itself iirc
09:38 AM _ami_: i am writing 2nd version of this with more features
09:38 AM nuxil: _ami_, does it support hvsp ?
09:38 AM _ami_: nuxil: no.
09:39 AM polprog: Emil: https://www.youtube.com/watch?v=RSmckqwoPc4
09:39 AM nuxil: ok. you should make that
09:39 AM _ami_: hvsp requires difference circuit.
09:39 AM Tom_L: what does it support?
09:39 AM _ami_: Tom_L: its a avr programmer based on stm32/blue pill board
09:39 AM polprog: Emil: i usually debug with 9600, ssh
09:40 AM Tom_L: i don't take blue pills
09:40 AM Tom_L: dunno what they are
09:40 AM nuxil: lol
09:40 AM _ami_: :)
09:40 AM Tom_L: sad for you because you know :)
09:40 AM _ami_: there are black pills also :)
09:41 AM polprog: it's blue pill cos most people use hal ;)
09:41 AM polprog: if it was red pill they'd program it in assembly or C
09:41 AM _ami_: i don't like HAL
09:41 AM Tom_L: does it support all 3 protocols?
09:41 AM _ami_: used libopencm3
09:41 AM polprog: i know a guy who uses Rust on those
09:41 AM _ami_: time to sleep though.
09:41 AM _ami_: nn
09:41 AM polprog: night
09:42 AM Tom_L: wonder why it takes an arm chip to program an avr...
09:42 AM nuxil: me too
09:42 AM nuxil: a bit overkill
09:42 AM nuxil: :p
09:42 AM Tom_L: mine used atmega32u2
09:43 AM Tom_L: was fast too
09:50 AM nuxil: polprog, will your clock have some sort of alarm ? like flashing the display, play a sound using a piezo element. etc. ?
10:00 AM polprog: nuxil: not sure yet
10:01 AM polprog: ill be happy if the initial version just shows time
10:01 AM nuxil: :)
10:32 AM polprog: it will probably also show weekday instead of second fractions, im not sure yet
12:21 PM rue_mohr: is that the epaper clock?
12:21 PM polprog: no, regular led
12:21 PM rue_mohr: polprog, I made a clock
12:21 PM rue_mohr: I used a dallas clock chip
12:22 PM polprog: im sure you did, id expect someone with your amount of experience to make one already ;)
12:22 PM rue_mohr: the built in battery backup means I dont have to reset the timer after a power outage
12:22 PM polprog: dallas clock chip?
12:22 PM polprog: battery backup is a good idea
12:22 PM rue_mohr: http://ruemohr.org/~ircjunk/projects/wallclock/slide.htm
12:22 PM polprog: it sohould shut down the display while on backup power
12:22 PM rue_mohr: I used a parallel bios clock chip just cause I didn't have a serial one available
12:23 PM polprog: i like the displays
12:23 PM polprog: are those cutouts for leds or big electromechanical ones?
12:23 PM polprog: ah leds
12:23 PM rue_mohr: https://www.aliexpress.com/item/DS3231-AT24C32-IIC-High-Precision-RTC-Module-Clock-Timer-Memory-Module/2037934408.html
12:23 PM rue_mohr: I suggest a board like that
12:24 PM rue_mohr: so, on that chip, it breaks the time down into BCD
12:24 PM polprog: hmm
12:24 PM rue_mohr: you just have to wait for it to change and refresh the display
12:24 PM rue_mohr: you can even set it to 12 or 24hr format on the chip
12:24 PM polprog: i wanted a one chip solution, and wanted to learn something about crystals in the process
12:24 PM polprog: at work i use an rtc chip to save the hassle
12:24 PM polprog: those are nice: https://flipdots.com/en/products-services/small-7-segment-displays/
12:25 PM rue_mohr: one chip means wrestling with battery backup, clock skew etc etc
12:25 PM polprog: the company is in Lodz city. i got a 7 flip dot strip as a free sample
12:25 PM polprog: i know, clock skew will probbaly be problematic
12:25 PM polprog: but that's more for decoration purposes
12:26 PM rue_mohr: nice display, neat sound
12:26 PM polprog: also, how big skew do you think those 32k768 watch crystals have? id expect those to be used in watches
12:26 PM rue_mohr: back in 2004 I could NOT get a PIC to either gain or lose about 1min/day
12:26 PM polprog: that's not that bad, it's bad but not very bad
12:26 PM rue_mohr: polprog, its really good, my clock might drift about 1 min/year
12:27 PM polprog: wow
12:27 PM polprog: that's good to know
12:27 PM polprog: so far i managed to blink a led with timer interrupt
12:27 PM rue_mohr: any skew is the fault of the crystal set up on those chinese boards, you can put in a trim capacitor if you want
12:28 PM rue_mohr: the rtc can give you a 1 sec interrupt if you want
12:28 PM rue_mohr: I just poll its time
12:28 PM polprog: i know, im writing drivers for one
12:28 PM polprog: the interrupt is very useful to have
12:28 PM polprog: mine can also do 1 min interrupt
12:32 PM rue_mohr: http://ruemohr.org/~ircjunk/projects/wallclock/clock.tgz
12:32 PM rue_mohr: there is all my code
12:32 PM nuxil: rue_mohr, you set the time by remote ?
12:32 PM polprog: rue_mohr: ill take a look at it
12:32 PM rue_mohr: keep in mind, I'm using a parallel rtc chip, but that the register layout is the same on all the chips
12:32 PM rue_mohr: It includes the sony IR code for the remote to set the time
12:33 PM nuxil: NICE
12:33 PM polprog: yeah, my hardware base is completely different but still, interesting to look at
12:33 PM nuxil: sorry caps
12:33 PM polprog: especially the sony code
12:33 PM nuxil: rue_mohr, is so lazy he nees a remotecontrol to set the time :p
12:33 PM nuxil: just kidding :)
12:33 PM polprog: heh, 595 register <3
12:34 PM rue_mohr: yes, I do NOT strobe the segments
12:34 PM rue_mohr: they are all constant drive
12:34 PM rue_mohr: :) NO FLICKER
12:34 PM polprog: i will
12:34 PM polprog: no space on the pcb lol
12:34 PM polprog: i hate flicker though
12:35 PM polprog: i could see flicker on a 60Hz crt
12:35 PM rue_mohr: well, ya see the size of that driver board :)
12:36 PM rue_mohr: http://ruemohr.org/~ircjunk/projects/wallclock/p1070500.jpg
12:36 PM polprog: sideways bodge chips with resistor. pretty compact, i like it
12:36 PM rue_mohr: so, the middle baord is the drivers, the right baord is the dc-dc supplies, the little yellow thing off to the left is the pro-mini board with the avr on it
12:37 PM rue_mohr: those chips are SIP, they only have the edge pins
12:37 PM rue_mohr: er, oh yea
12:37 PM polprog: SIP. ive seen those only in very old stuff
12:37 PM rue_mohr: uh, well, as it turns out, there was a surprise, the driver chips are transistor arrays WITHOUT BASE RESISTORS
12:37 PM rue_mohr: WTF!?!?!
12:38 PM polprog: lol
12:38 PM polprog: BJTs i suppose
12:38 PM polprog: why
12:38 PM rue_mohr: yea, I was kinda pissed
12:39 PM polprog: those electromechanical displays are expensive as hell
12:39 PM polprog: like really
12:39 PM rue_mohr: http://ruemohr.org/~ircjunk/projects/wallclock/p1070548.jpg
12:39 PM polprog: i asked them for a price list.
12:39 PM polprog: i literally fell from my chair when i saw it
12:39 PM rue_mohr: ok so yea, avr board and rtc hip
12:39 PM polprog: 30 pln for the smallest one
12:39 PM rue_mohr: you know how to make them?
12:39 PM polprog: dallas rtc... isnt it the one with the builtin battery? for older PCs
12:39 PM rue_mohr: yea
12:40 PM polprog: i saw one once with a bodged on 2032 cell
12:40 PM polprog: they must be cool
12:40 PM rue_mohr: same as the one I linked, but that one on my clock is parallel
12:40 PM rue_mohr: I made an hour counter, used one of the serial chips
12:40 PM rue_mohr: I write the hours counted to the nonvolatile RAM every second
12:40 PM polprog: i have a handful of 7 segs, gotta use some of them
12:41 PM fooman2011: hi all
12:41 PM fooman2011: hi polprog
12:41 PM polprog: o/
12:41 PM nuxil: howdy
12:41 PM polprog: usual business
12:42 PM polprog: homework for school
12:42 PM polprog: done
12:42 PM polprog: so nothing really.
12:42 PM rue_mohr: 8-| I didn't post the hour meter
12:42 PM polprog: im waiting for the fab guy to send the price and account no for pcbs
12:42 PM nuxil: fooman2011, hows your fuses going ?
12:42 PM fooman2011: nuxil: thanks the fuses are ok now :)
12:43 PM nuxil: :)
12:43 PM rue_mohr: the hour meter uses a DS1307 and a max7219 display
12:43 PM polprog: max7219
12:43 PM rue_mohr: https://www.aliexpress.com/item/FreeShipping-1PCS-LOT-MAX7219-Led-Module-8-Digit-7-Segment-Digital-LED-Display-Tube-For-Arduino/32221286629.html
12:44 PM polprog: the chip i found an fell in love with it until i found out noone stocks it
12:44 PM rue_mohr: serial displays
12:44 PM polprog: hmm
12:44 PM rue_mohr: https://www.aliexpress.com/item/MAX7219CNG-MAX7219-10pc-lot-DIP-IC/32608431703.html
12:45 PM polprog: yeah
12:45 PM polprog: i didnt look very well
12:45 PM rue_mohr: there is also
12:45 PM polprog: are you portugeal by the way?
12:45 PM rue_mohr: "tm1638"
12:45 PM rue_mohr: no, canada
12:46 PM polprog: that tm thingy is nice
12:46 PM rue_mohr: https://www.aliexpress.com/item/1pc-Key-Display-For-AVR-Arduino-New-8-Bit-Digital-LED-Tube-8-Bit-TM1638-Module/32725359463.html
12:46 PM rue_mohr: i2c
12:46 PM polprog: same thing, more expensive: https://elty.pl/pl/p/Modul-LED-Switch-z-TM1638-/1665
12:46 PM polprog: brb
12:46 PM rue_mohr: with a pro mini (atmega328), the 1638 baord, and the rtc board, your clock is just code
12:48 PM polprog: i know
12:48 PM polprog: i dont know if youve seen my pcb though ;)
12:49 PM polprog: the idea is that it hides behind the 7 segs, so from the front you only see the displays
12:49 PM polprog: although the smallest m8 didnt really fit behind. so it's on a tab, sticking out. fair enough
12:50 PM polprog: it's here if you dont wanna scroll back: https://puu.sh/ys5wE/bd30591805.png
12:50 PM polprog: (the trace outside the edge is fixed now as well)
12:51 PM polprog: stupid kicad pushed it out outside the edge. why doesnt it keep track of it?
01:22 PM rue_mohr: you could save a lot of space if you use a mutlisegemnt dispay thats already internally wired...
01:23 PM polprog: i know... dont like those
01:23 PM polprog: too small
01:23 PM rue_mohr: you might also save space if you used a DIP, cause , offset maybe, it would fit behind the display
01:23 PM polprog: i was thinking about it in fact
01:24 PM polprog: maybe rev3 would have a dip. it would fit i think
01:24 PM polprog: yeah, narrow dip would fit nicely
01:24 PM polprog: well, now i know what to change in rev 3 lol
01:24 PM rue_mohr: "the day smt was bigger than thruhole"
01:25 PM rue_mohr: BUT you can also J the pins of the dip and surface mount it
01:25 PM polprog: ah yeah
01:25 PM polprog: i usually make dip pins in an L when i surface ounted it
01:25 PM rue_mohr: I'v also seen pins just cut short and surface soldered
01:25 PM polprog: J'ing them didnt cross my mind. thanks!
01:25 PM rue_mohr: :)
01:25 PM polprog: actually im J'ing the 7 seg pins
01:26 PM rue_mohr: oh yea, looking closer I can see that
01:26 PM polprog: custom footprint again
01:27 PM polprog: making pcbs is fun. im proud of that one. i barely fit the bus inbetween the edges ;)
01:27 PM rue_mohr: if your not making a bunch, you could also leave some and use them as vias
01:27 PM rue_mohr: yea it looks tight
01:27 PM polprog: leave some of what?
01:27 PM rue_mohr: of the pins as thru
01:27 PM polprog: mm
01:27 PM polprog: i see
01:27 PM rue_mohr: might be pointless, its a thought
01:27 PM polprog: you know why there are resistors are not in line?
01:28 PM polprog: they used to be a 4x0402 arrays
01:28 PM rue_mohr: usaully you use one plane for horiz and the other for vert traces
01:28 PM polprog: vert traces would be from resistors to segments.. but all horiz traces didnt fit on one layer :D
01:28 PM rue_mohr: ah
01:28 PM polprog: therefore via orgy over there.
01:29 PM polprog: 100-something iirc
01:29 PM polprog: they guy at the fab usually does simple tht from what i know
01:29 PM polprog: he must think im crazy somewhat :D
01:29 PM rue_mohr: how many you making?
01:30 PM polprog: 4, as i knew i will most likely have to make another rev
01:30 PM polprog: whya re you asking ;) ?
01:31 PM polprog: this is their gallery page: http://fabrykapcb.pl/galeria.html
01:35 PM rue_mohr: I made alot of 1-offs, so I end up questioning all the effort I put into using mass-manufacturing methods for it
01:35 PM polprog: i resigned from homemade
01:36 PM polprog: i can get them extremely cheap
01:36 PM polprog: in 3 business days even, if i resign from soldermask as wll
01:36 PM rue_mohr: I do my own for about $0.10/square inch
01:36 PM polprog: photoresist?
01:37 PM polprog: the hardest part for me was to transfer the design on the board
01:37 PM rue_mohr: no, but, I'm gonna play with UV nail laquer
01:37 PM polprog: no toner transfer was good.
01:37 PM rue_mohr: I have a plotter right now, direct resist application
01:37 PM polprog: might be i was using wrong paper.. etc
01:37 PM polprog: wow
01:37 PM polprog: i guess if i had a plotter as well this would work
01:37 PM rue_mohr: for the stuff I do, it works
01:38 PM rue_mohr: http://ruemohr.org/~ircjunk/tutorials/elex/etch/pcb_etching.html
01:38 PM rue_mohr: it was a horrid camera
01:38 PM polprog: old pics, yeah
01:38 PM polprog: i saw more of those while bored traversed thru ~/ircjunk ;)
01:39 PM rue_mohr: :)
01:40 PM polprog: that's the kin dof pcbs i like
01:40 PM polprog: did you make the plotter yourself?
01:40 PM rue_mohr: no
01:40 PM polprog: those pics... the huge dip and lots of leds... this reminds me of good times
01:40 PM rue_mohr: that board was a timer that sat on a mountian for years turning a wifi repeater on and off
01:41 PM polprog: on a mountain?
01:41 PM polprog: wow
01:41 PM polprog: tell me more
01:41 PM rue_mohr: yea, there was only one spot they could use as a wifi repeater to get internet to some places
01:42 PM rue_mohr: it would shut down the whole thing as night to save power
01:42 PM polprog: hmm, nice
01:42 PM polprog: very nice
01:42 PM polprog: i like it
01:42 PM rue_mohr: atmega32, only cause its the only chip I had that could run a 32Khz rtc resonator
01:43 PM rue_mohr: the leds would show time in hours, if you were holding down the display-on button
01:43 PM polprog: interesting
01:44 PM rue_mohr: it has two adc channels for watching battery voltages, and rs232, but I dont recall if that was used
01:44 PM polprog: why two channels?
01:45 PM rue_mohr: iirc there were two battery banks
01:45 PM rue_mohr: so, if something went wrong you could talk to half the system
01:45 PM rue_mohr: prolly 8 directional dishes on that station...
01:48 PM rue_mohr: oh, 3 analog channels, one unpopulated
01:48 PM polprog: i found your wall clock video
01:48 PM polprog: it's pretty cool
01:48 PM rue_mohr: oh good
01:48 PM rue_mohr: must be on youtube?
01:48 PM polprog: yea
01:49 PM polprog: why do you talk so quietly
01:50 PM rue_mohr: :) maybe people listen better
01:50 PM polprog: hehe
01:51 PM rue_mohr: oooh I made a video of the force sense for the hobby servos
01:51 PM rue_mohr: damn
01:53 PM rue_mohr: ooooh, I could seed youtube with videos aimed at specfic content to see what people are doing, and get the feedback by watching the hit counters
01:53 PM polprog: youtube has a rather advanced analytics system for uploaders
01:54 PM polprog: i can see (after about 100 views) when people closed the video, how many % of viewers watched up to a point etc
01:54 PM polprog: but i dont care
01:54 PM polprog: i wanna make videos i like, it's not showbusiness
01:54 PM polprog: i could make the 20 second short without any narration public as well... but i already have one or two videos with montage and narration
01:54 PM polprog: it would stand out
01:55 PM polprog: i might make a longer one about the clock
01:55 PM polprog: maybe, if i find the camcorder power cord.
01:56 PM rue_mohr: a producer and some time?
01:56 PM polprog: i can post a link to my channel if you wanna see
01:56 PM rue_mohr: sure
01:57 PM polprog: https://www.youtube.com/channel/UCsxonLIUu9tB8QWNuFIXCwg
01:57 PM polprog: i try to keep them short.
02:02 PM polprog: oh. i got a comment on one of my videos
02:03 PM polprog: someone bought the maxim thermo chip from ebay and is getting strange readings
02:06 PM polprog: i hate listening to myself on those videos
02:15 PM antto: okay.. suggest a cheap atmega with 1 UART that comes in 32-pins, which should probably be in production for a decent amount of time in the future
02:16 PM nohitzzz: use the parametric search on microchip site
02:16 PM nohitzzz: http://www.microchip.com/selection-tools
02:23 PM antto: as if that's not almost completely useless
02:28 PM antto: atmega48A?
02:35 PM Ameisen: so
02:36 PM Ameisen: I have a 32-bit ARM and an atmega2560 I'm stickking in this printer
02:36 PM Ameisen: I'm considering ALSO using an attiny in it
02:36 PM Ameisen: the ARM is going to handle stepper motor control to the drivers, and planning
02:36 PM Ameisen: the atmega will control heating elements
02:36 PM Ameisen: my consideration is to use the attiny to help handle the stepper drivers - the ARM can put out signals at a lower frequency, and the attiny can interpolate over time
02:36 PM Tom_L: 2560 could do it all
02:36 PM Ameisen: meaning the ARM won't have to spend as much time on it
02:36 PM polprog: why do i think using two or three chips is overkill
02:37 PM polprog: especially with the arm
02:37 PM Ameisen: Tom_L - the 2560 will have difficulty with the higher order planning
02:37 PM Ameisen: polprog - probably becuase it is
02:37 PM Ameisen: but I want to do it
02:37 PM Ameisen: be cool to see.
02:37 PM Ameisen: my original goal was to use a multicore ARM
02:37 PM Ameisen: but the maker ran out of them
02:37 PM Ameisen: the only other ARM I could find with a ton of GPIO was an cortex m4
02:38 PM Ameisen: https://www.amazon.com/gp/product/B01FVY8OOS/ref=ox_sc_sfl_title_1?ie=UTF8&psc=1&smid=A2NAP359VON41Y
02:38 PM Ameisen: I wanted that one.
02:38 PM Ameisen: that could trivially handle the entire printer
02:38 PM nohitzzz: antto 48PB or 48A
02:38 PM Ameisen: ?
02:38 PM nohitzzz: are the cheapest with those specs
02:38 PM Ameisen: link?
02:38 PM Ameisen: oh
02:38 PM Ameisen: you're talking to antto
02:38 PM Ameisen: got confused
02:38 PM Ameisen: thought it was a weird brand
02:40 PM polprog: lol
02:41 PM Ameisen: polprog - I do know that the 2560 cannot do everything I want trivially
02:41 PM Ameisen: the higher order planning, at least, will strain it
02:42 PM Ameisen: an ARM board can do it, _and_ using floats/doubles
02:45 PM antto: why does the datasheet smell so microshitty?
02:45 PM antto: :/
03:00 PM Emil: Ameisen: mate
03:00 PM Emil: Ameisen: that sounds convoluted as fuck
03:00 PM Emil: I take it you are not a hardware guy? :D
03:01 PM Emil: Yeah
03:01 PM Emil: you are definitely a pc software guy
03:01 PM Ameisen: I have the 'hardware exists to run the software' mindset
03:01 PM Ameisen: versus the 'software exists to run the hardware' mindset
03:02 PM polprog: im the software and hardware make a complete working thing and each exists for each other mindset
03:03 PM polprog: recently heard people complaining they are short of low-lever programmers
03:03 PM polprog: i had to explain how to toggle a bit in C to one guy once
03:03 PM Emil: polprog: it's because rautaa lähellä olevat programmers know their worth
03:03 PM Emil: polprog: and people are not willing to pay enough for them
03:04 PM Emil: so of course, they are are short on qualified programmers ;)
03:04 PM polprog: he didnt know reg ^= (1<<bit)
03:04 PM Emil: lulz
03:04 PM Emil: how
03:04 PM Emil: can
03:04 PM Emil: someone not
03:04 PM polprog: nor |= and &= ~() trick
03:04 PM Emil: "trick"
03:05 PM polprog: but hey he finished CS! and he knows all sorts of algorhitms lel
03:05 PM Emil: Well, it depends on what your end goal is
03:05 PM polprog: yeah i think it can be called a trick. how many programmeing books focus on setting single bits
03:05 PM Emil: But if a person can't figure out the meaning of |= or &= just by looking at them
03:05 PM Emil: they are not worth their degree
03:06 PM polprog: it was the other way. im not saying he's not worth the degree
03:06 PM Emil: I am
03:06 PM Emil: But really, CS is so much bigger than just low level
03:06 PM Emil: Knowing algorithms is super fucking important
03:06 PM polprog: yeah, that's my weak point
03:06 PM Emil: But if you sacrifice basic understanding for that
03:06 PM Emil: they are just less
03:07 PM polprog: i dont know i never really implemented quicksort. or any sort
03:07 PM Emil: Also
03:07 PM Emil: One of the most important things I've learned
03:07 PM Emil: is
03:07 PM polprog: but i did some competition C writing
03:07 PM Emil: "You don't need to know how it works to apply it, you just need to know it works"
03:08 PM Emil: If you can't apply information you are worth so little it's painful
03:08 PM polprog: if i googled for a while i would probably end up with some algorhitm
03:08 PM Emil: "You don't need to know how it works, you just need to use it"
03:08 PM polprog: but if i ever was to get a whiteboard interview...
03:09 PM polprog: Emil: that is the whole idea behind java ;)
03:09 PM polprog: its a brilliant idea
03:09 PM Emil: They are used as simple (and effective) barriers
03:09 PM Emil: polprog: that's your java nostalgia talking
03:09 PM polprog: maybe
03:09 PM Emil: It is
03:09 PM * Ameisen would just write template <typename T, T... Bits> void set_bits(T &var, Bits... bits) { ... }
03:10 PM Ameisen: set_bits<uint32_t>(val, 0, 2, 3, 4);
03:10 PM polprog: the idea of a well docmented and simple blackbox is well known to me
03:10 PM Emil: Point is, everyone should understand that right next to that is: "If the tool gets in your way, change the tool"
03:10 PM polprog: i dont need to know how GCC changes my C to asm, i just need to know it does
03:10 PM Emil: Which is how we get to C
03:10 PM polprog: ;)
03:10 PM Emil: polprog: and then GCC gets in your way
03:10 PM Ameisen: <polprog> i dont need to know how GCC changes my C to asm
03:10 PM Ameisen: you need to know how it is changing C/C++ to your machine code, just in case you accidently incur undefined behavior
03:11 PM Ameisen: then the resultant output may not match what you expect.
03:11 PM Emil: Ameisen: nope
03:11 PM Emil: Ameisen: undefined behaviour is not asm level problem
03:11 PM Emil: it's C level problem
03:11 PM polprog: i just sometimes need to know how to decompile and check the output
03:11 PM Ameisen: Emil - no, but you absolutely need to know what the compiler is doing.
03:12 PM Emil: Ameisen: lolno. It's another skill to learn (which greatly increases your value as a developer) but you don't need to know how c->asm happens to write functioning software
03:13 PM Ameisen: Well, most compilers don't convert C to asm
03:13 PM Ameisen: or C++ to asm
03:13 PM polprog: LLVM?
03:13 PM Ameisen: neither GCC nor LLVM do.
03:13 PM Ameisen: they convert it to IL, which is then optimized and goes through a backend which directly emits machine code.
03:13 PM Emil: If interacting with hardware you need to know the limitations and features of your hardware and basic principles of commanding those
03:13 PM Ameisen: You can _tell_ it to emit asm
03:13 PM Ameisen: but there's no assembly step.
03:13 PM Emil: Ameisen: mate
03:13 PM Emil: Ameisen: just stop
03:13 PM polprog: he knows compiler design, im curious
03:13 PM Emil: Ameisen: and you know that yourself, also
03:14 PM Emil: polprog: no he was being a smartass
03:14 PM Ameisen: No, I'm not
03:14 PM Emil: polprog: disregarding the context
03:14 PM Emil: Ameisen: yes, you were
03:14 PM Ameisen: I really dislike it when people say "compiler puts out asm". It doesn't.
03:14 PM Ameisen: That implies that the compiler is using an assembler.
03:14 PM Emil: sigh
03:14 PM polprog: what does it put out then?
03:14 PM Ameisen: machine code.
03:14 PM Tom_L: no
03:14 PM Tom_L: just text
03:14 PM Ameisen: unless you tell it to output asm
03:14 PM Tom_L: call it whatever you want
03:14 PM Emil: Ameisen: and in the context, that's what assemnbly is
03:15 PM Ameisen: Emil - there are plenty of architectures where there isn't 1:1 parity between asm and machine code.
03:15 PM polprog: okay, that miscommunication then
03:15 PM Emil: Ameisen: point is, don't complain in a vacuum
03:15 PM Tom_L: it's just what humans perceive it as
03:15 PM Ameisen: x86 has _how_ many instructions that MOV can map to?
03:15 PM Ameisen: like 30?
03:15 PM Ameisen: and has a few pseudo-instructions that represent multiple instructions
03:15 PM Emil: irrelevant
03:16 PM Emil: repl asm interpreter for avr?
03:16 PM Emil: A competition
03:16 PM Emil: polprog: I challenge you
03:16 PM polprog: i wanted to make a sweet16 interpreter
03:17 PM polprog: vm on an avr lol
03:18 PM Emil: done
03:18 PM Ameisen: well Emil
03:18 PM Ameisen: you've successfully given me a headache
03:18 PM Ameisen: congratulations
03:18 PM Emil: Ameisen: top kek
03:18 PM Emil: a) I don't care b) if you got a headache from this top nep c) lulz
03:19 PM Emil: Anycase
03:19 PM Ameisen: k
03:19 PM Emil: REPL AVR ASM simulator challenge
03:19 PM Emil: polprog: you in?
03:19 PM polprog: REPL? the hell does that mean
03:19 PM Emil: read eval print loop
03:20 PM polprog: hmm
03:20 PM polprog: not the avr assembler
03:22 PM polprog: we know it will eventually be a big case block. and probably an area or array in memory that represents the 32 registers. unless you "cheat" and write a bootloader that assembles the input data and flashes it :P
03:23 PM Emil: yes
03:23 PM Emil: it's a simulator
03:23 PM Emil: any way to do that is fine
03:24 PM polprog: how else would you write that, im curious
03:24 PM Ameisen: You could do it _worse_ ways
03:24 PM Ameisen: sort of pointless
03:25 PM Ameisen: If you have boundless memory, you could encode all possible arguments/instructions into a hash map or an array.
03:25 PM polprog: make an FPGA simulator and use existing verilog models
03:26 PM polprog: use the existing x86 simulator and run linux on it, and then simulavr on it?
03:26 PM Ameisen: You could JIT it as you go, but it would be faster to just interpret it.
03:26 PM Ameisen: JIT/AOT
03:26 PM polprog: AOT?
03:26 PM polprog: ahead of time, ok
03:26 PM Ameisen: most of the cost is interpreting what the instruction/args are, so AOT won't benefit
03:26 PM polprog: brainfart
03:26 PM Ameisen: most of the cost will be interpreting arguments.
03:27 PM polprog: yeah. im curious how simulavr is written
03:27 PM polprog: let me look
03:27 PM polprog: simavr, sorry
03:30 PM polprog: https://github.com/buserror/simavr/blob/master/simavr/sim/sim_core.c line 648
03:30 PM polprog: those nested switches dont fit my screen
03:31 PM Ameisen: you could do it like vemips
03:31 PM Ameisen: though vemips is an emulator that runs machine code
03:31 PM Ameisen: and the nsted switches are generated
03:32 PM polprog: huh, it's shorter than i expected
03:32 PM polprog: so additionally he has a state machine
03:32 PM polprog: that makes sense to simulate a machine with a state machine.
03:49 PM polprog: night
03:49 PM Emil: Good night
08:05 PM rue_shop3: ... wtf
08:08 PM Tom_L: rue_shop3
08:08 PM Tom_L: pic of your mill?
08:08 PM Tom_L: how did you attach the vertical column?
08:16 PM rue_shop3: two columns, left and right, welded up from the frame
08:16 PM rue_shop3: http://ruemohr.org/~ircjunk/projects/cnc4/p1080740.jpg
08:16 PM Tom_L: how did you get it square and plum?
08:16 PM rue_shop3: http://ruemohr.org/~ircjunk/projects/cnc4/p1080739.jpg
08:16 PM rue_shop3: technically tack welded as I wasn't sure of the position, I was right that I was wrong, they have to be moved back 2 inches
08:19 PM Tom_L: the round bars on the bottom are for the Y axis right?
08:26 PM rue_shop3: yes
08:27 PM rue_shop3: its curtin rod, turns out its not as round and dimentionally stable as I thought it would be
08:27 PM Tom_L: i thought about pinning the bottom support to the base
08:28 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_base3.jpg
08:28 PM Tom_L: where the crossmember is there
08:28 PM Tom_L: running a bar or bolting from each side
08:28 PM Tom_L: but i think that would make it weaker
08:30 PM Tom_L: getting it square to the base and having the Z face parallel to X is my concern
08:30 PM Tom_L: i suppose we should move to robotics
08:30 PM rue_shop3: :)
11:36 PM day__ is now known as daey