#avr Logs

Jul 31 2017

#avr Calendar

12:02 AM day_ is now known as daey
02:03 AM Haohmaru: on the product page of HEF4050 on nexperia's site, it says "Unused inputs must be connected to VDD, VSS, or another input"
02:04 AM Haohmaru: unused inputs should be connected to other inputs?!
02:04 AM Thrashbarg: lol
02:04 AM Haohmaru: oh, i guess it means other *used* inputs?
02:04 AM Thrashbarg: they can all float around together (o/
02:06 AM Haohmaru: and when you come down here with me.. then YOU'LL FLOAT TOO!
02:12 AM Haohmaru: then i wonder.. if you connect your signal to all of the inputs, is it a dumb idea to also connect all their outputs together
02:13 AM dgriffi2: I suppose you could let cmos inputs float and use the resulting oscillations to make an interesting synth module
02:14 AM Haohmaru: quasi-random square waves are not interesting
02:17 AM dgriffi2: I saw one design that used a blown transistor
02:18 AM Haohmaru: for.. what?
02:18 AM dgriffi2: a noise generator
02:18 AM Haohmaru: i've seen a design that uses an electric eel
02:19 AM Haohmaru: what happens if you put a working transistor into that circuit?
02:20 AM dgriffi2: I don't know. I never built it.
02:21 AM dgriffi2: I forget the name and the other details about the circuit.
04:36 AM Haohmaru: "#ifdef WORKAROUND" huh
05:07 AM Gerritjan: what kind of oscilloscope is the best to take of avr chips and stuff?
05:07 AM Gerritjan: 20 mhz or more?
05:51 AM Haohmaru: that's probably kinda low-ish
05:54 AM Haohmaru: dgriffi2, btw, if you ever need a nasty noise source to test for bugs and side effects in systems - use a small mp3 player and load it with speed metal music
05:54 AM Haohmaru: or skrillex
01:35 PM JanC is now known as Guest68181
01:35 PM JanC_ is now known as JanC
02:36 PM Gerritjan: is it hard to make the pca9685 work on a stm32?
02:48 PM NoHitWonder__: i dont think so
02:48 PM NoHitWonder__: i have used it with raspi with no problems
02:48 PM NoHitWonder__: and i have used all kinds of sensors with stm32
02:51 PM Jartza: https://www.youtube.com/c/JariTulilahti/live
02:51 PM Jartza: back online
02:54 PM xentrac: oh cool
02:55 PM xentrac: NoHitWonder__: Gerritjan was trying to use the pca9685 on a RasPi and I thought he was trying to bitbang PWM, which is a thing that is not going to work on a RasPi
02:55 PM xentrac: so I guess I was confused and wron
02:55 PM xentrac: g
02:57 PM Gerritjan: stange i did had contact with a dealer of adafruit and told me that its possible with this and there is no troule with anything
02:57 PM xentrac: yeah, I think I was confused about what you were trying to do and gave you bad advice as a result. sorry!
02:58 PM Gerritjan: lol np :D
02:58 PM xentrac: you should be able to make it work on an STM32 too
02:59 PM Gerritjan: but still i can get it working on RPI IOT but i have it running on mega2560
03:02 PM Gerritjan: xentrac: where is the 0 degree on the servo? on the label part?
03:02 PM Gerritjan: and im geussing that it is running clockwise
04:11 PM Emil: I want a vacuum sealer
04:11 PM Emil: That can seal those anti static esd metal foil pouches
04:12 PM antto: s.. s.. stick em in the microwave oven! >:)
04:12 PM Emil: :D
04:13 PM Emil: I ordered that heater wire
04:13 PM antto: or put some anti matter inside
04:14 PM Emil: Now I just need to make a vacuum chamber and experiment with the heater
07:18 PM Jan-: hihi
07:19 PM Jan-: we have an application which involves an atmega328 reading an analogue serial waveform, it's at about 200 transitions a second.
07:19 PM Jan-: we're timing the periods between the transitions. is it worthwhile or possible to have the avr go to some sort of reduced power mode inbetween transitions at that rate?
07:20 PM Jan-: I guess the main clock would be running because we need the timer to work.
07:20 PM tpw_rules: what's doing the timing?
07:20 PM xentrac: how's the OTXO timecode thing going?
07:20 PM Jan-: this is the tcxo timecode thing, it's going fine, I really am getting to the stage of needing the tcxo.
07:20 PM xentrac: cool!
07:21 PM Jan-: right now we have it displaying timecode okay
07:21 PM xentrac: you could certainly wake up the CPU with pin transition interrupts
07:21 PM tpw_rules: you could do a SLEEP
07:21 PM tpw_rules: yeah
07:21 PM Jan-: https://drive.google.com/file/d/1sQbtqyslGgtO6xL3EcxCf2DfoDqX0aFsFA/view
07:21 PM xentrac: I don't know if it will actually save power
07:21 PM xentrac: it seems like it ought to
07:21 PM Jan-: the idea would be to save power, as this is likely to run on battery power being carried around (with the display off)
07:22 PM Jan-: that should be a picture of the display board with sensible numbers on it
07:23 PM Jan-: in answer to what's doing the timing, timer/counter 1.
07:24 PM Jan-: via the input capture mode on ANALOG_COMP_vect
07:24 PM xentrac: aha
07:24 PM Jan-: oh no wait
07:25 PM * Jan- scratches her head
07:25 PM Jan-: how the hell does this thing work again?
07:28 PM Jan-: Right I'm using the analog comparator to trigger an input capture event on timer/counter 1.
07:28 PM Jan-: Does that make sense?
07:28 PM Jan-: so it all happens in timer1_capt_vect but it's actually triggered by the analog comparator. I think.
07:37 PM xentrac: I think you're right, but I haven't actually used the analog comparator at all; I'm just relying on my recollection of reading datasheets
07:37 PM xentrac: if you want a thing to try on that is maybe easier to debug than the actual chip, you might try simavr
07:38 PM Jan-: I shall play around anyway.
07:39 PM Jan-: one other thing I want to do is to learn how to do a bit of assembly. I have a 10-byte buffer I have to rotate one bit left a lot, and I notice that the avr has a "rotate left through carry" instruction which seems made to do that.
07:39 PM Jan-: I suspect gcc isn't unrolling my loop to use that instruction so I shall look into how to do it
07:39 PM tpw_rules: -funrool-loops
07:40 PM Jan-: sure, but I doubt it's using that particular instruction, especially as I've had to code it as a bunch of rotates and concatenates.
07:41 PM tpw_rules: it was just a joke ;P
07:43 PM xentrac: gcc does use that instruction for multibyte rotates
07:43 PM Jan-: tpw_rules: be gentle, I are an n00b.
07:44 PM Jan-: xentrac here's what I have https://pastebin.com/VTscF8Nz
07:45 PM Jan-: If gcc is smart enough to use ROR for that, I'm not sure it can get much better.
07:45 PM xentrac: take a look at the assembly gcc is emitting
07:46 PM Jan-: gimme a break, I wouldn't have a clue
07:46 PM xentrac: -Wa,-adhlns=foo.lst
07:46 PM xentrac: with -g
07:47 PM Jan-: once again, in a major european language?
07:47 PM Jan-: I'm doing this with the arduino IDE
07:47 PM xentrac: heh
07:48 PM xentrac: heh
07:48 PM xentrac: argh
07:48 PM xentrac: sorry
07:48 PM xentrac: oh, yeah, I don't know how to persuade the Arduino IDE to pass extra flags
07:49 PM xentrac: this mouse sucks, I keep sending the wrong lines
07:49 PM Jan-: I can get an .a file if that helps
07:50 PM Jan-: core_arduino_avr_nano_cpu_atmega328_e56cf3e2f809829c1ee6ca4fc10b7ff2.a
07:50 PM xentrac: yeah, take a look at your .a file to see if it says "ror" in the loop for that thing
07:50 PM Jan-: what is that, text?
07:50 PM xentrac: yes
07:50 PM xentrac: you should be able to at least find the function by name in the .a file
07:50 PM Jan-: well it's in timer1_capt_vect
07:51 PM Jan-: no matches for that
07:51 PM Jan-: this just looks like mush
07:51 PM Jan-: I can't find function names in this
07:51 PM xentrac: oh, sorry
07:51 PM xentrac: .s
07:51 PM xentrac: not .a
07:52 PM Jan-: I don't have a .s
07:52 PM xentrac: .a is a compiled library
07:52 PM xentrac: you can google "how to persuade the Arduino IDE to pass compiler flags"
07:52 PM xentrac: the compiler flags necessary to produce a useful assembly listing are -g -Wa,-adhlns=foo.lst
07:53 PM xentrac: where "foo.lst" is the name of the listing file that it will produce
07:53 PM Jan-: eh screw this
07:53 PM xentrac: if you want to learn how to do a bit of assembly, looking at GCC's generated assembly is a really good way
07:54 PM xentrac: because it shows you how to do the particular things you want to do in assembly language
07:54 PM xentrac: and usually it shows you a very good way
07:54 PM xentrac: to do them
07:54 PM xentrac: if you say "eh screw this" people may feel offended
07:55 PM Jan-: It's just more trouble than it's worth
07:55 PM Jan-: premature optimisation and all that
07:55 PM xentrac: probably
07:55 PM Jan-: although I'd have liked to do it as an exercise.
07:55 PM Jan-: it does seem that I have a command called avr-gcc available to me.
07:55 PM xentrac: actually writing and debugging the thing in assembly is probably going to take longer than 14 minutes
07:56 PM xentrac: which is how long we've been talking about it :)
07:56 PM Jan-: er... so
07:56 PM Jan-: so what?
07:59 PM Jan-: this is what it says when it's compiling: https://pastebin.com/Q7S9Uud9
08:00 PM Jan-: does any of that help?
08:04 PM Jan-: okay well anyway I have to sleep
08:04 PM Jan-: nini all
08:33 PM Casper: hmmmm anyone on gentoo?
08:34 PM Casper: does cross-avr/gcc come from the vmware overlay for you? sound so wrong