#avr Logs

Sep 01 2017

#avr Calendar

12:33 AM rue_shop3: _ami_, I should ask you about that sometime
12:36 AM _ami_: ls
12:49 AM rue_house: (wrong window)
12:50 AM _ami_: rue_house, sure.
12:50 AM _ami_: yeah. :P
12:51 AM _ami_: some issue with my connman module.. it disables the network if i am away from pc few mins.
12:52 AM rue_house: they change so foten you need a manager?
12:54 AM rue_house: or they do for someone else, who is so important its worth you being stuck with a peice of software that messes up your computer
12:55 AM rue_house: hmmmm, interesting, china prices seem to be going up with the collapsing US dollar
12:57 AM _ami_: rue_house, the tff module prices are now pretty high.
12:57 AM _ami_: this is my observations over past few months.
12:57 AM rue_house: I'm noticing the supply of lots of cheap stuff is drying up
12:57 AM _ami_: rue_house, i have similar setup at home as well.. don't see this problem happening there.
12:58 AM _ami_: rue_house, yes, indeed.
12:58 AM _ami_: time to try new kernel. 4.12.8-2-ARCH
12:58 AM _ami_: rebooting
12:58 AM rue_house: ooo
02:00 AM rue_shop3: ok
02:01 AM rue_shop3: from the 12V supply, the servos are getting their 6, the stm32 gets its 3.3V via a linear regulator that uses the diode amalgimation of the 3x 6V supplies, and I'll feed the 4017 off the 3.3 toooooo
02:05 AM rue_shop3: I should do an RGB status led
02:16 AM rue_shop3: of course I should, the more colourfull flashy lights, the cooler the project is
03:41 AM Emil: rue_house: wtf?
03:42 AM Emil: rue_house: you don't know how to manage a channel if you are kicking people like that
03:58 AM polprog: huh, i should try the new kernel too
04:19 AM ohsix: new kernel?
04:26 AM rue_house: Emil, actually, clearing out people keeps the channel alive longer
04:26 AM rue_house: most channels seem to have a 6-8 year life
04:27 AM rue_house: then they fill up with zombies and die
04:27 AM Haohmaru: who did you sweep out? ;P~
04:30 AM polprog: Haohmaru: enh was kicked but he wanted to
04:30 AM polprog: :P
04:30 AM Haohmaru: oh, that sounds naughty
04:31 AM polprog: ohsix: sudo pacman -Syu
04:31 AM polprog: anyway, back to making breakfast
04:31 AM Haohmaru: do you have a makefile for that too? ;P~
04:34 AM Emil: rue_house: ...
04:34 AM Emil: rue_house: you have absolutely no logic in your thought
04:34 AM rue_house: Emil, how long you been on irc?
04:34 AM rue_house: we made this channel dude
04:35 AM rue_house: it existed, we stole it fromthe creator, but we made it
04:35 AM Emil: So? It's a community channel for AVRs
04:35 AM Emil: not your private thing
04:35 AM rue_house: and I made robotics beofre there was anyone there
04:35 AM rue_house: indeed
04:35 AM rue_house: but we know a lot about irc channel life cycle
04:35 AM Emil: What you did or didn't do is of no importance
04:36 AM rue_house: we keep the channel alive
04:36 AM Emil: lol
04:36 AM rue_house: thats important
04:36 AM Emil: Absolutely bonkers
04:36 AM Haohmaru: rue_house actually, an #avr irc channel is innevitable
04:36 AM rue_house: Emil, if you think so, go sit in #linuxhelp for a few weeks
04:36 AM Emil: Haohmaru: exactly
04:36 AM rue_house: Haohmaru, oh is it? then why isn't there just #microcontrollers?
04:37 AM Emil: there is
04:37 AM rue_house: we created this channel to peel all the avr stuff from #electronics
04:37 AM rue_house: I know
04:37 AM Emil: "we" "we" "we"
04:37 AM Emil: "me" "me" "me"
04:37 AM rue_house: but if there is #microcontrollers, there need not be #avr need there?
04:37 AM rue_house: hah, gnight
04:38 AM Emil: rue_house: there is no "I" in good channel management
04:38 AM rue_bed: I dont think you know anything about it
04:38 AM Emil: :D
04:38 AM Emil: superb argumentation there
04:39 AM rue_bed: so far your just nay saying
04:39 AM Emil: I'm saying your line of thought is absolutely bonkers. Having many people on a channel encourages peopel to join
04:39 AM Emil: If they don't talk then that's unfortunate
04:40 AM Emil: You are just appealing to your authoritas, which you don't have
04:40 AM rue_bed: I'm not here as much as I ought be, but I do have an interest in the channel being a neat, productive, educational, helpfull place
04:40 AM Emil: But having people idling doesn't kill anything
04:40 AM rue_bed: Emil, no your wrong about lots of people
04:40 AM Emil: superb argumentation
04:41 AM rue_bed: the life cycle of a channel is that its created,
04:41 AM Haohmaru: wait, enh was kicked because he was sitting here and not talking much?
04:41 AM Emil: Haohmaru: no, he wanted to be
04:41 AM rue_bed: there are a few key people that make it an awesome place
04:41 AM Emil: Haohmaru: just for lulz
04:41 AM rue_bed: more and morepeople join
04:41 AM rue_bed: then the key people leave/ etc
04:41 AM rue_bed: the channel number go up, but people stop talking all togethor
04:41 AM Emil: that's a bunch of assumptions you are throwing there
04:42 AM Emil: None of which are factual
04:42 AM Emil: gg
04:42 AM rue_bed: the channel sits dead for a year or more without anyone saying much of anything
04:42 AM rue_bed: then slowly, all the people leave
04:42 AM Haohmaru: that's all true
04:42 AM rue_bed: what stage is #linuxhelp at anyhow?
04:42 AM Emil: rue_bed: you don't seem to understand how to manage channels
04:42 AM polprog: do you want this to become a second #raspberrypi?
04:43 AM Haohmaru: nah, he he has a point
04:43 AM rue_bed: 25, its reached the final stage
04:43 AM Haohmaru: but what's wrong with a channel dying?
04:43 AM rue_bed: there were hundreds for a while, few years ago, after it died
04:43 AM rue_bed: Haohmaru, if you clean out the dead wood, the channel life is extended
04:43 AM Emil: absolutely bonkers
04:43 AM Haohmaru: is it?
04:44 AM Emil: rue_bed: are you living in the opposite world?
04:44 AM Haohmaru: rue_bed why do you have to do it?
04:44 AM rue_bed: Emil, I'm not saying it makes sense, but its the truth
04:44 AM Emil: rue_bed: absolutely not
04:44 AM rue_bed: Haohmaru, we have extended #avr and #robotics several times
04:45 AM Emil: :DDDDDD
04:45 AM Emil: What kind of Matrix-like sion do you think this is
04:45 AM Haohmaru: "extended" x_x
04:45 AM Emil: holy shit that's
04:45 AM Emil: :DDDDDDDD
04:45 AM rue_bed: it works, I dont know why
04:45 AM Emil: rue_bed: please stop
04:45 AM polprog: there are a total of 166 people here, and from what ive seen here since i joined it's max 40 people active
04:45 AM Emil: rue_bed: you are embarrassing yourself further
04:45 AM rue_bed: polprog, 40 is ok
04:46 AM rue_bed: it helps if there are a few guru who are available to answer questions all the time
04:46 AM rue_bed: and those come and go
04:46 AM polprog: 40 is the number that is not too small and not too big
04:46 AM polprog: same thing can be seen on reddit but on a different scale
04:46 AM rue_bed: I keep an eye on the channel tho, and its active, so its doing ok
04:46 AM Haohmaru: rue_bed all i was trying to say is.. this channel is innevitable as there are people using "avr" .. if you didn't create it, then someone else would have, and it might have been named #atmel or something else.. doesn't matter
04:47 AM Haohmaru: the channel will die when people stop discussing avr
04:47 AM Haohmaru: and that's f*cking normal
04:47 AM Emil: Haohmaru: you can say it
04:47 AM rue_bed: I wont disagree
04:47 AM Emil: Haohmaru: we are all on the internet here
04:47 AM rue_bed: tho, have you noticed the influx of stm32 conversations?
04:47 AM Haohmaru: anything else you want to do to extend its life past that point is keeping a franken-zombie alive
04:47 AM polprog: a channel is a community!
04:47 AM Emil: rue_bed: you have no point
04:48 AM Haohmaru: yes, the channel is not the #name and the @creator .. it's the people that sit and talk on it
04:48 AM Haohmaru: if those go to some other place - it's fine
04:48 AM polprog: it takes time for those people to find themselves
04:48 AM rue_bed: I'm not going to say I can inevitably extend the life of ANY channel, but its been interesting maintaining it
04:48 AM rue_bed: esp after pulling it out of the ashes a few times
04:48 AM rue_bed: (#robotics is in ashes)
04:49 AM Haohmaru: robotics aren't cool
04:49 AM Haohmaru: sorry ;P~
04:49 AM rue_bed: hah
04:49 AM * Haohmaru runs
04:49 AM polprog: maybe it just needs some "marketing" :D it's not like people stopped building robots
04:49 AM rue_bed: what about #linuxhelp
04:50 AM rue_bed: back in 2001, it was a flurry of activity
04:50 AM rue_bed: ask LoRez
04:50 AM Haohmaru: i've never went there because there are more topical linux channels
04:50 AM polprog: show me a general linux channel that is active
04:50 AM Haohmaru: like #debian
04:50 AM polprog: i said general
04:50 AM Haohmaru: polprog who on earth sits on a "general linux channel" ?!
04:50 AM polprog: linux world is so diverse that you cant have a single channel
04:50 AM Haohmaru: to talk about.. what?
04:50 AM rue_bed: ifconfig
04:51 AM polprog: yeah, that's the point!
04:51 AM rue_bed: turning off screensavers
04:51 AM Haohmaru: rue_bed but that's distro-specific
04:51 AM rue_bed: no
04:51 AM Haohmaru: desktop specific even
04:51 AM rue_bed: na
04:51 AM polprog: for example, polish linux channels are active. that's because they are more "specialized"
04:51 AM Haohmaru: it's not?
04:51 AM rue_bed: consoles have screen blanking too
04:51 AM * polprog points at GNU screen
04:52 AM rue_bed: sed one liners
04:52 AM Haohmaru: rue_bed do you sit on channels which you have not created nor have any control over?
04:52 AM rue_bed: no, I only join them while using them
04:53 AM Haohmaru: that explains ;]
04:54 AM rue_bed: if it takes someone 4 days to notice they were bumped out of a channel, then was there any point to them being there?
04:54 AM Haohmaru: there is a point where a channel is big and popular or logically-named, and by that time you don't really need moderation
04:54 AM Haohmaru: to steer the channel
04:55 AM polprog: you do
04:55 AM polprog: kill spam for starters
04:55 AM rue_bed: how often do you see me or tom do ANYTHING to this channel?
04:55 AM rue_bed: its been ages since I even changed the topic
04:55 AM Haohmaru: exactly
04:55 AM polprog: agreed
04:56 AM rue_bed: Its funny, I tried to organize things like code snippet repositories too, no interest by anyone
04:56 AM Haohmaru: i saw that.. i thought you're crazy
04:57 AM rue_bed: crazy is good, it means new
04:57 AM Haohmaru: pasting #define macros in the channel o_O
04:57 AM Haohmaru: i was gonna call the ops to ban you ;P~
04:57 AM rue_bed: people still dont know howto set and clear bits properly
04:57 AM rue_bed: :P
04:57 AM polprog: i witnessed that at work :D
04:58 AM * Haohmaru gives polprog eye bleach
05:00 AM Haohmaru: the first time i needed help with an atmega and a programmer i think i went to #electronics
05:00 AM Haohmaru: and then to #arduino .. i have no idea what arduino is but it sounded weird and familiar
05:01 AM Haohmaru: i think i was redirected to #arduino by someone from #electronics after i've said that i have "something with an atmega2561"
05:01 AM Haohmaru: and he might've assumed it's an arduino given that i don't know sh*t about any of it
05:02 AM Haohmaru: when i began to realize what arduino is, i figured there is a more suitable place for me
05:02 AM polprog: i used to lurk at ##electronics
05:02 AM polprog: but, hell, that was a terrible channe;
05:02 AM polprog: never got any help there lol
05:02 AM Haohmaru: there are more topical electronics channels too ;P~
05:03 AM Haohmaru: like about electronics and music.. which is the real SERIOUS SH*T
05:03 AM Haohmaru: where component values matter
05:04 AM Haohmaru: where conductors don't all sound the same
05:04 AM Haohmaru: where tubes are the heavens
05:04 AM polprog: are you into synths?
05:04 AM Haohmaru: yeah, but what i said above was semi-joking
05:05 AM polprog: :P ihave a synth
05:05 AM polprog: roland sh-101
05:05 AM Haohmaru: i think we've talked about that
05:05 AM * Haohmaru == antto
05:06 AM polprog: i havent caught that :D
05:06 AM Haohmaru: i got a 303 and 808 clone
05:06 AM Haohmaru: * clones
05:06 AM polprog: sweet
05:06 AM Haohmaru: but this is off-topic here
05:07 AM Haohmaru: i can recommend you a channel for such electronics (which is still small) when i get back from work
05:07 AM Haohmaru: cuz i don't remember the exact spelling
05:07 AM Haohmaru: yes, that's a flaw
05:08 AM polprog: :)
05:08 AM rue_bed: the administration of #electronics went to the dogs, when the trolls were allowed to overrun it, I left
05:11 AM Haohmaru: you abandoned ship?
05:11 AM polprog: wonder what's it like now there
05:40 AM polprog: terrible
05:48 AM kvik_: I hear good stuff about audiophool grade USB cables, may get one of those $1000 white ones to get more depth and clarity on the lead guitar sections
05:49 AM polprog: i want to believe youre sarcastic
05:50 AM twnqx: nah, it's super important to have less latency and flipped bits
05:51 AM polprog: :D
05:53 AM polprog: http://www.wireworldcable.com/hdmi-2.0-cables.html
05:53 AM kvik_: my $450 audio grade USB cable left me wanting, just not enough sense of space on those lead guitar sections. i use this recording for comparison of audio grade USB cables https://www.youtube.com/watch?v=bnNWUUZ7cEA
05:56 AM Haohmaru: get your cables from coconut-audio
05:56 AM Haohmaru: they are the bestest
05:57 AM polprog: that's amateur hour!
05:57 AM polprog: my cables are manufactured by nude virgins on cyprus, and crimped on a lap of a cuban woman
05:58 AM kvik_: "The cables are down right stunning!!!!!"
05:58 AM Haohmaru: aaah, you can smell the quality of that
06:04 AM comptroller: _ami_, thanks for the help! the datasheet says that there is a hardware trigger that must be enabled for spi, and I've enabled it for both RX and TX. I have also configured it for mem2per on the tx side, and per2mem on the rx side. The part that I don't understand is what would actually initiate this transfer
06:11 AM _ami_: comptroller, not sure abt SAME ICs
06:11 AM _ami_: the stm32 DS is very clear about it
06:12 AM comptroller: ok I was thinking of just reading through an stm32 datasheet to at least tell me how it should work
06:15 AM _ami_: comptroller, http://www.keil.com/dd/docs/datashts/st/stm32f10xxx.pdf
06:15 AM _ami_: page no. 188
06:16 AM _ami_: channel5@DMA1 -> TIM1_UP triggers it.
06:16 AM _ami_: there are other events too.
06:19 AM comptroller: thanks _ami_
06:32 AM _ami_: comptroller, i did that for GPIOs
06:32 AM _ami_: but in stm32, there are separate channels for SPI RX and TX
06:33 AM _ami_: its ch2 and ch3
07:40 AM polprog: im learning opamps
07:41 AM polprog: would such a circuit be OK? it's my solution to an excercise from the art of electronics
07:41 AM polprog: https://puu.sh/xoRPh/25cbf0ecfd.png
08:01 AM cehteh: i dont know, but 100M sounds rather like a noise generator
08:05 AM polprog: the aim is to design a 100x gain inverting amp and then add some components to make it have it's input impedance >= 100M
08:07 AM cehteh: my gut feeling just says the higher the resistance the more noise you get
08:08 AM polprog: yeah, let's forget the first amp then
08:08 AM cehteh: and 100M is very high what resistance has the pcb material? :)
08:08 AM polprog: im curious if the second amp :)
08:08 AM Haohmaru: that 100M resistor in the feedback can't be right
08:09 AM cehteh: http://tinyurl.com/ydcd7zrl .. it works :D
08:09 AM cehteh: but thats idealized
08:11 AM polprog: thanks
08:11 AM cehteh: and it very much depends on parts tolerances. in reality i bet it will be a mess
08:12 AM * Haohmaru injects some cosmic radiation around polprog's 100M resistor
08:12 AM cehteh: even a expensive 0.1% resistor +100 gives 10%
08:12 AM cehteh: x100
08:12 AM cehteh: using trimmers ..mkay .. but still pita, drift with aging, temperature, humidty
08:13 AM polprog: it's not a real circuit
08:13 AM cehteh: i know
08:14 AM cehteh: i dont know much about opams either
08:15 AM Haohmaru: connect the opamp feedback using audiophool-grade audio cable
08:15 AM Haohmaru: use long enough cable so you get 100M resistance
08:15 AM Haohmaru: boom, success!
08:26 AM polprog: a 100M resistor would take only 1'187'648 and a half kilometers of 24 awg copper cable (at 20 C) :P
08:35 AM NoHitWonder: guitar pedal pre-amps need very hi input impedance for example
08:40 AM NoHitWonder: one good exercise would be to design a guitar distortion pedal that runs on 9V(battery) supply
08:41 AM polprog: no idea how somethin glike this work
08:41 AM Haohmaru: you take a battery and drain it with an opamp pretending you're making music
08:41 AM Haohmaru: * rock music
08:42 AM polprog: a bit of time ago somebody here came up with a guitar distortion thing that reads analog, converts it to digital, and then abck to analog. so a bitcrusher essentially
08:42 AM NoHitWonder: yes
08:42 AM Haohmaru: i am designing an actual decimator.. not for guitars tho
08:43 AM Haohmaru: but i need a fancy oscillator first
08:44 AM polprog: calf plugins have a decimator and a resolution degrader plugin
08:44 AM polprog: sounds like a gameboy :D
08:45 AM Haohmaru: i've made a decimator plugin too, but this time i want to make an analog(ue) one
08:45 AM polprog: yeah, analog stuff is cool
08:45 AM polprog: unfortunately i dont know much about this
08:46 AM polprog: but it's gonna change in the next years or so
08:46 AM polprog: 4/12 chapters read so far :|
08:46 AM Haohmaru: it's very simple, you feed the audio into a sample and hold circuit.. then you clock the s&h with a generator
08:47 AM Haohmaru: so it creates the famous stepped signal that is (wrongly) associated with digital audio
08:47 AM Haohmaru: ;P~
08:47 AM NoHitWonder: you can do the distortion part with simple diode clipper http://www.learningaboutelectronics.com/images/Diode-clipper-circuit-clipped-positive-unbiased-amplitude.png
08:48 AM NoHitWonder: http://www.learningaboutelectronics.com/images/Diode-clipper-circuit-clipped-positive-and-negative-unbiased-amplitudes.png
08:50 AM Haohmaru: you'll need big diodes if you wanna distort the mains voltage ;P~
09:04 AM polprog: just build a ring modulator, it's the coolest thing in analog audio ever
09:06 AM * Haohmaru pukes
09:13 AM polprog: a decimator is a cool idea
09:13 AM polprog: if it's just a sample and hold with a clocking signal
09:13 AM polprog: i might try and make one
09:26 AM rue_house: resistor, capacitor, 4066, and a tiny13 :)
09:26 AM rue_house: cause 555 is obsolete
09:28 AM Haohmaru: no >:/
09:29 AM polprog: i was planning to use a 555 cos i have them in the tiny organizer drawer and i havent touched them for 2 years...
09:30 AM rue_house: you will have to mess witht eh values for the 55 like all hell, if you use a tiny13, you can just program them and they will stay
09:30 AM rue_house: you have great duty control too
09:30 AM rue_house: not ONCE have I been able to calculate values for a 555 circuit and have it come out right
09:31 AM polprog: i know, but, arguably, this could be done fully digital way
09:31 AM rue_house: always have to put pots in and dial them
09:31 AM rue_house: pff, the 4066 and RC sample/hold in muuuuuch easier
09:31 AM rue_house: and higher res.
09:31 AM polprog: ive beed doing digital or semi digital electronics ever since it became my hobby :/
09:32 AM rue_house: ... if your running more than 10V, I have a PN2222 based relaxation osc you could use
09:32 AM polprog: it's a bit silly to know how a compute works in and out but not being able to make an amplifier :D
09:32 AM polprog: relaxation osc?
09:33 AM polprog: interesting thing
09:34 AM rue_house: http://ruemohr.org/~ircjunk/tutorials/elex/micropwm/p1080966.jpg
09:34 AM rue_house: see the RC on the left and the first transistor with the missing lead?
09:34 AM rue_house: well, its an osc
09:35 AM polprog: so far i only understand the buffer parts...
09:35 AM rue_house: you know how to make a 555 osc with just 1resistor and one cap? 50% duty?
09:35 AM polprog: i tried once and i think i succeeded...
09:35 AM polprog: but i dont remember much
09:36 AM rue_house: you use 3 as the feedback and 7 as the output
09:36 AM rue_house: so, cap betwwen 1&2
09:36 AM rue_house: 2 to 6
09:36 AM rue_house: and resistor between 2 &3
09:36 AM rue_house: done
09:36 AM polprog: hmm
09:37 AM rue_house: but yea, I just use a t13
09:37 AM polprog: let me think about it...
09:37 AM rue_house: usually cause I want more than one timer,
09:37 AM rue_house: a t13 can give you up to like 5 timers if you want :)
09:38 AM rue_house: as for the relaxation osc,
09:38 AM rue_house: the 2222 has an interesting curve in reverse like that
09:39 AM rue_house: it breaks down before the 10V and keeps conducting till the voltage is down to about 1 or 2
09:40 AM rue_house: enough homework?
09:40 AM polprog: ill save that schematic and try to crack it :D
09:40 AM rue_house: there is nothing to crack
09:40 AM polprog: for you
09:41 AM polprog: i think i see why the leftmost transistor has no base connected.
09:42 AM polprog: are you using it's breakdown voltage? you mentioned something about breakdown and that's why the supply cant be less than 10V
09:43 AM rue_house: yup
09:44 AM polprog: hmm
09:44 AM polprog: interestin
09:44 AM rue_house: there are no reverse breakdown specs for the pn2222, but it has negitive resistance
09:45 AM NoHitWonder: how much is t13?
09:45 AM rue_house: depends, my answer is 66c
09:46 AM NoHitWonder: how much is the cheapest arms?
09:46 AM rue_house: I'll say $1.72
09:47 AM Haohmaru: rue_house for a decimator you don't want to use a microcontroller
09:47 AM Haohmaru: you've missed the whole point of the decimator
09:48 AM Haohmaru: it needs a fine control over the s&h clock
09:48 AM Haohmaru: forget about timers
09:48 AM rue_house: yes and no
09:48 AM rue_house: I really do prefer t13 over 555
09:48 AM Haohmaru: imma slap you
09:49 AM rue_house: I'm not saying to use it as a dsp
09:50 AM Haohmaru: anyway.. i've not finished my decimator because i'm having trouble figuring out how to make a generator with logarithmic voltage control
09:50 AM Haohmaru: i used a relaxation osc, but.. yeah
09:50 AM polprog: gotta go, have fun
09:52 AM rue_house: a pot on the relax would work
09:52 AM Haohmaru: iirc it gave a linear frequency response
09:52 AM rue_house: the trigger time might be narrow enought o not drag the sample either
09:52 AM Haohmaru: plus, i really need to sum that with another signal
09:52 AM rue_house: ?
09:53 AM Haohmaru: basically, i need a VCO
09:53 AM rue_house: change the resistor to a current srouce
09:53 AM Haohmaru: i found a bunch of circuit examples for VCOs with V/Hz response
09:53 AM rue_house: and varry with current with voltage
09:53 AM Haohmaru: you're saying that as if i know how to do it
09:53 AM rue_house: :/
09:53 AM rue_house: I do
09:53 AM Haohmaru: i come from dsp
09:54 AM rue_house: and I'm leaving for work 10 mins ago
09:54 AM Haohmaru: i'm still learning my ohm law ;P~
09:54 AM rue_house: I'll be abck in 9 hours
09:54 AM polprog: Haohmaru: it's actually simple
09:54 AM polprog: i can draw it out for you when im back
09:54 AM polprog: at least try cos im not sure :D
09:55 AM Haohmaru: i prototype it in falstad ;P~
09:59 AM NoHitWonder: VCO?
09:59 AM NoHitWonder: what kind of VCO
09:59 AM Haohmaru: yeah
09:59 AM NoHitWonder: what's the waveshape
09:59 AM Haohmaru: preferably with 1V/Oct response
09:59 AM Haohmaru: square
09:59 AM NoHitWonder: oh
09:59 AM NoHitWonder: ok
10:00 AM Haohmaru: well, it could be anything as long as i can make it into a square afterwards
10:01 AM NoHitWonder^: https://hackaday.com/2015/08/07/logic-noise-4046-voltage-controlled-oscillator-part-one/
10:01 AM NoHitWonder^: http://mickeydelp.com/blog/anatomy-of-a-drum-machine?
10:03 AM rue_house: no, no, just use a current source and the relax, 2 transistors
10:03 AM rue_house: arg, ned to got to work!
10:03 AM NoHitWonder: gtg ->
10:08 AM polprog: Haohmaru: https://puu.sh/xoWuV/b5c6caa659.jpg cc rue_house
10:08 AM Haohmaru: wut's that?
10:11 AM polprog: current source
10:11 AM polprog: the simplest one
10:14 AM Haohmaru: i'll stare at it more when i get back
12:14 PM Tom_itx is now known as Tom_L
01:04 PM JanC is now known as Guest2554
01:05 PM JanC_ is now known as JanC
01:15 PM Emil: https://emil.fi/jako/kuvat/2017-09-01_20-44-00_HOAsazo0.png
01:15 PM Emil: God tier advice
01:21 PM Thrashbarg: heh
02:07 PM polprog: lol
02:08 PM antto: polprog ##music-electronics
02:48 PM dsalychev4 is now known as dsalychev
03:13 PM polprog: antto: thanks
03:44 PM enh: hi
03:54 PM NoHitWonder: hi
04:03 PM dsalychev: hi :)
04:07 PM ohsix: polprog: ah
05:10 PM _kvik: Emil and others, char str[] = "four"; sizeof(str) == 5 and char *str = "four"; sizeof(str) == 8; why is that?
05:11 PM Tom_L: pointer
05:11 PM Tom_L: the first one has a nul terminator on the end of the string
05:12 PM Tom_L: the 2nd one is an 8bit address i think
05:21 PM enh: char * str is a pointer to a char, and you are feeding it with the byte values of f o u r
05:22 PM enh: i think
05:22 PM _kvik: compiler feeds those bytes, I just have a pointer to those bytes
05:22 PM Tom_L: it's still an 8 bit address pointing to the beginning of the string
05:23 PM Tom_L: and the sizeof that string will be 1 more than you think
05:23 PM _kvik: and I can't change them, str[0] = 'c' crashes things
05:23 PM _kvik: but i can change char str[]
05:27 PM enh: _kvik: I believe if you state char * str = "ab" it will understand that str is a pointer to a char, and the value of that pointer is 64. Because 64 is the ascii code for a.
05:28 PM enh: os something similar. If that is correct, it will start looking at address 64 for a 0x00 end of string
05:28 PM enh: and in your case it found one 8 characters later
05:29 PM enh: str[] = "four" is the correct way of loading the char sequence
05:30 PM enh: or declare str[10] and load it with your string using strncpy, i believe.
05:31 PM _kvik: no. if I state char *str = "ab" and I do sizeof(str), then I want to find out how much bytes does str take, str in this case is a pointer to a char so it takes 8 bytes, at least on my machine.
05:31 PM enh: 8 bits
05:32 PM enh: a char is an uint8_t
05:32 PM _kvik: and if I state char arr[] = "ab" and do sizeof(arr), then I ask how much does arr take, arr is an array of char and it's size os 3, because of the \0 that the compiler appends to string literals
05:33 PM enh: and if you state char * myvar, then myvar is a * to a char. depending on how you read it, it will be interpreted as a single char, os as a char array
05:34 PM enh: believe me. a char is an 8 bit word
05:34 PM _kvik: sizeof returns the size of an object in bytes
05:35 PM enh: yep
05:35 PM enh: try this: char a; sizeof(a);
05:35 PM _kvik: 1
05:35 PM enh: so
05:41 PM enh: i believe sizeof() knows how to process c strings. So char * PointerToChar sizeof(PointerToChar) will make the machine go to the *address* loaded in PointerToChar and start looking for a \0. In your case the address loaded in PointerToChar is the byte equivalent of "four", probably truncated to the number of bytes that a pointer to char takes normally.
05:42 PM cehteh: eh what? :D
05:42 PM _kvik: that would be wrong
05:42 PM enh: try changinf "four" for "abx" and you will probably see the sizeof result changed
05:42 PM cehteh: sizeof knows about arrays
05:42 PM enh: yep
05:42 PM cehteh: but thats all
05:42 PM enh: char * a = "FOUR" makes what, cehteh?
05:43 PM cehteh: undefned behaviour
05:43 PM cehteh: because "FOUR" is const char*
05:43 PM enh: I'm defining the bahavior
05:44 PM cehteh: and sizeof(a) would be the size of that pointer
05:44 PM enh: FOUR is translated to the its ascii equivalent
05:44 PM enh: loaded as an address
05:44 PM enh: and sizeof would look for a string at that address
05:44 PM cehteh: no it will not
05:44 PM cehteh: try it
05:44 PM cehteh: and compile with -Wall please
05:44 PM enh: I can't now
05:45 PM enh: -Wall will complain
05:46 PM enh: "FOUR", operator " will transform the sequence FOUR into 0x46 0x4f 0x55 0x52 0x00
05:47 PM cehteh: " is not a operator
05:47 PM cehteh: "FOUR" is just a literal string
05:47 PM enh: what is " ?
05:48 PM cehteh: and in this case const char* a = "FOUR"; and char a[] = "FOUR": make a difference
05:48 PM enh: isn't " treated the same way as a unary operator?
05:48 PM enh: when parsed?
05:50 PM enh: isn't "FOUR" parsed and stored as 0x46 0x4f 0x55 0x52 0x00 in memory?
05:51 PM enh: sorry. I may have confused everything then
05:51 PM _kvik: it is a literal, same as 23 and 0x23. yes, that's how it's stored
05:52 PM enh: when you store that as a pointer, ins't that interpreted as an address?
05:52 PM cehteh: http://paste.debian.net/984089/
05:53 PM _kvik: how come a char is 4 bits?
05:53 PM cehteh: bits?
05:53 PM _kvik: it's a char *, and not a char
05:53 PM enh: bytes, _kvik
05:54 PM _kvik: and you are on a 32 bit machine 32 / 8 bits in a char = 4
05:54 PM cehteh: anyway see the paste, got it?
05:54 PM cehteh: yes this is 64 bit machine
05:54 PM cehteh: http://paste.debian.net/984090/
05:54 PM cehteh: there with 32 bit
05:56 PM enh: I do not get it. No complaints form the compiler?
05:56 PM cehteh: so conclusion you can use sizeof(char[]) - 1 instead strlen .. in very limited cases
05:56 PM cehteh: i writen it correctly as const char*
05:57 PM enh: what if you remove const?
05:58 PM cehteh: actually gcc is smart enough to detect that i dont try to modify it
05:58 PM cehteh: but when one wants to change it then hell breaks loose
06:00 PM cehteh: $gcc -Wwrite-strings test.c
06:00 PM cehteh: test.c:4:11: warning: initialization discards ‘const’ qualifier from pointer target type
06:00 PM cehteh: char* a = "FOUR";
06:00 PM enh: https://stackoverflow.com/questions/1704407/what-is-the-difference-between-char-s-and-char-s
06:01 PM cehteh: exactly
06:02 PM enh: Second answer: I did not know about the secret array allocation. My mistake.
06:03 PM _kvik: so we both learned something
06:04 PM enh: I always do here
06:05 PM enh: cehteh: Can you help me with my code? I'm getting crazy here trying to find out when is the memory getting corrupt.
06:05 PM cehteh: havent looked at it :D
06:06 PM cehteh: pastebin?
06:06 PM enh: repo...
06:07 PM cehteh: ?
06:08 PM enh: https://bitbucket.org/enhering/yauvc/src/aa90bfae47c258b56f421b2024ba3249e5834c51/firmware/src/classes/interfaces/?at=default
06:08 PM enh: SPI class is there. Works perfectly
06:08 PM enh: https://bitbucket.org/enhering/yauvc/src/aa90bfae47c258b56f421b2024ba3249e5834c51/firmware/src/classes/protocols/?at=default
06:08 PM enh: SPIProtocol is there
06:09 PM cehteh: C++ is a different beast :D
06:09 PM cehteh: well i dont want to debug your code, you need to isolate the problem a bit more
06:09 PM cehteh: and compile it with all bells and whistles
06:10 PM cehteh: -Wall -Wextra
06:10 PM enh: I'll try -Wextra
06:12 PM enh: I get only this warning: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
06:12 PM enh: not much extra info.
06:12 PM enh: Thanks anyway
06:17 PM enh: I 'm almost sure I have a stack overflow here.
06:19 PM cehteh: quite possible
06:19 PM cehteh: or some other memory trashing
06:20 PM enh: I just would like to know how to detect it without a windows machine and atmelstudio
06:27 PM cehteh: dunno either of those
06:27 PM cehteh: you may add some stack guard/canary and check for it
06:28 PM cehteh: or better look closely at your code where it overflows
06:28 PM cehteh: comment things out until it works again .. or git bisect it
06:31 PM enh: I'm doing the commenting way. I read about the stack guard but dunno how to use it
06:31 PM enh: Erratic behavior is hard to debug. I 'd guess a buffer overflow, but all my buffers are checked.
06:33 PM cehteh: erratic behaviour *is* what you debug, when everything goes well you dont have to debug
06:33 PM enh: I'm sure I'm doing something stupid
06:33 PM cehteh: i second that :D
06:34 PM cehteh: can you git bisect?
06:34 PM enh: nope. By erratic I mean the kind of bug that makes no sense. You change the position of a statement and the behavior changes
06:35 PM enh: dunno bisect
06:35 PM cehteh: https://git-scm.com/docs/git-bisect
06:35 PM cehteh: let git help you which commit introduced an error
06:36 PM enh: I know which one.
06:36 PM cehteh: ok then look at the changes
06:36 PM enh: It was a major commit. And I did not branch it.
06:36 PM enh: so, many changes.
06:36 PM cehteh: then branch it now .. apply the changes in small parts
06:36 PM cehteh: yes thats a good way to shoot into your own foot
06:36 PM enh: too many of them.
06:37 PM cehteh: look at them
06:37 PM cehteh: i wont do that for you :D
06:37 PM enh: i know, cehteh
06:37 PM cehteh: and happens to me also .. sometimes i just wipe entire work and start anew
06:37 PM enh: and it is too much code to understand in one week
06:38 PM cehteh: commit more often
06:38 PM cehteh: once a hour or so
06:38 PM NoHitWonder: you have given up doxygen?
06:38 PM enh: nope.
06:38 PM enh: it is there
06:38 PM cehteh: doxygen sux :D
06:38 PM NoHitWonder: why
06:39 PM cehteh: well it makes shitloads of browseable docs .. but doesnt tell much
06:39 PM cehteh: hand written documentation is usually better
06:39 PM NoHitWonder: our documentation is combination of both
06:40 PM enh: I change nothing special and I get a bug on protocol signaling. I unchange it and I get a bug on transmitted data.
06:41 PM enh: Looks soo much like memory corruption
06:42 PM NoHitWonder: and doxygen is hand written documentation, what else
06:43 PM enh: is there a command line way to do a memory dump of the avr via ATMEL ICE?
06:43 PM aczid: you can just use avrdude?
06:44 PM enh: i use avrdude
06:44 PM enh: can it do that? Dump SRAM?
06:45 PM cehteh: iirc no
06:46 PM cehteh: just look at your code, where can it recurse, where can it buffer overflow
06:47 PM aczid: oh, ram
06:48 PM aczid: well you can write a program to dump ram, but that program would affect ram too
06:48 PM aczid: you could make a thing to dump ram to eeprom for example
06:48 PM cehteh: some debugers can do that
06:48 PM aczid: oh yeah, you're right cehteh
06:49 PM cehteh: but, usually its way easier to look at your code and analyze whats going wrong instead working backwards
06:49 PM aczid: you can use avarice for that
06:49 PM cehteh: i dont use debuggers
06:49 PM enh: i believe i tried avarice before and it did not work. Pure ignorance probably
06:49 PM cehteh: well except the libs i written by myself
06:49 PM aczid: I got it to work over debugwire
06:50 PM aczid: it required some fiddling iirc
06:50 PM aczid: adding a device class etc
06:56 PM Emil: _kvik: because the compiler is "smart". constant length arrays give the size of the array. Otherwise the pointer reference is to the pointer size
07:03 PM enh: http://www.avrfreaks.net/forum/atmel-ice-avarice-eclipse-and-debugging-ubuntu
07:03 PM enh: there is a tutorial in the end
08:19 PM Emil: GAH
08:19 PM Emil: MFW trying to make this work
08:19 PM Emil: and it's so fucking close
08:20 PM Emil: But fml my dacs are absolutely not 12 bit
08:20 PM Emil: And fml twice this wheelchair has pretty tight tolerances for my shit gear
08:22 PM Emil: But
08:22 PM Emil: But I think that after this final soldering
08:22 PM Emil: it should work
08:44 PM day__ is now known as daey
10:02 PM enh: Did it?
11:28 PM Casper: emil: did it? I will assume that you failed hard and everything went up in smoke
11:54 PM enh: I need help...
11:55 PM enh: Anybody here knows how to use gdb?
11:55 PM enh: I have setup simavr and avr-gdb
11:56 PM enh: they are talking to each other
11:56 PM enh: but how can I simulate an interrupt on gdb?